fix(接口测试): 场景引用场景列表排除当前场景
This commit is contained in:
parent
35e9c4828f
commit
fce4f17571
|
@ -7,6 +7,7 @@ import jakarta.validation.constraints.Size;
|
|||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
|
@ -35,4 +36,7 @@ public class ApiScenarioPageRequest extends BasePageRequest {
|
|||
|
||||
@Schema(description = "删除状态(状态为 1 时为回收站数据)")
|
||||
private Boolean deleted = false;
|
||||
|
||||
@Schema(description = "查询时排除的ID")
|
||||
private List<String> excludeIds = new ArrayList<>();
|
||||
}
|
||||
|
|
|
@ -34,6 +34,13 @@
|
|||
LEFT JOIN project_version ON project_version.id = api_scenario.version_id
|
||||
where api_scenario.deleted = #{request.deleted}
|
||||
<include refid="queryWhereCondition"/>
|
||||
<if test="request.excludeIds != null and request.excludeIds.size() > 0">
|
||||
and api_scenario.id not in
|
||||
<foreach collection="request.excludeIds" item="excludeId" separator="," open="(" close=")">
|
||||
#{excludeId}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
|
||||
</select>
|
||||
<select id="getIds" resultType="java.lang.String">
|
||||
|
|
Loading…
Reference in New Issue