refactor(功能用例): 后端处理评审关联用例列表过滤已关联ids
This commit is contained in:
parent
8e0ff36aef
commit
486575eb6a
|
@ -127,11 +127,10 @@
|
||||||
)
|
)
|
||||||
</when>
|
</when>
|
||||||
</choose>
|
</choose>
|
||||||
<if test="request.excludeIds != null and request.excludeIds.size() > 0">
|
<if test="request.reviewId != null and request.reviewId != ''">
|
||||||
AND functional_case.id not in
|
AND functional_case.id not in (
|
||||||
<foreach collection="request.excludeIds" item="excludeId" separator="," open="(" close=")">
|
select case_id from case_review_functional_case where review_id = #{request.reviewId}
|
||||||
#{excludeId}
|
)
|
||||||
</foreach>
|
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
@ -594,11 +593,10 @@
|
||||||
)
|
)
|
||||||
</when>
|
</when>
|
||||||
</choose>
|
</choose>
|
||||||
<if test="request.excludeIds != null and request.excludeIds.size() > 0">
|
<if test="request.reviewId != null and request.reviewId != ''">
|
||||||
AND id not in
|
AND functional_case.id not in (
|
||||||
<foreach collection="request.excludeIds" item="excludeId" separator="," open="(" close=")">
|
select case_id from case_review_functional_case where review_id = #{request.reviewId}
|
||||||
#{excludeId}
|
)
|
||||||
</foreach>
|
|
||||||
</if>
|
</if>
|
||||||
GROUP BY module_id
|
GROUP BY module_id
|
||||||
</select>
|
</select>
|
||||||
|
|
|
@ -41,8 +41,8 @@ public class FunctionalCasePageRequest extends BasePageRequest implements Serial
|
||||||
@Schema(description = "关联缺陷")
|
@Schema(description = "关联缺陷")
|
||||||
private AssociationDTO associationBug;
|
private AssociationDTO associationBug;
|
||||||
|
|
||||||
@Schema(description = "排除ids")
|
@Schema(description = "评审id")
|
||||||
private List<String> excludeIds;
|
private String reviewId;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -77,7 +77,7 @@ public class CaseReviewFunctionalCaseControllerTests extends BaseTest {
|
||||||
request.setProjectId("100001100001");
|
request.setProjectId("100001100001");
|
||||||
request.setCurrent(1);
|
request.setCurrent(1);
|
||||||
request.setPageSize(10);
|
request.setPageSize(10);
|
||||||
request.setExcludeIds(Arrays.asList("TEST_FUNCTIONAL_CASE_ID_1"));
|
request.setReviewId("wx_review_id_1");
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
map.put("customs", Arrays.asList(new LinkedHashMap() {{
|
map.put("customs", Arrays.asList(new LinkedHashMap() {{
|
||||||
put("id", "TEST_FIELD_ID");
|
put("id", "TEST_FIELD_ID");
|
||||||
|
@ -86,7 +86,7 @@ public class CaseReviewFunctionalCaseControllerTests extends BaseTest {
|
||||||
put("type", "List");
|
put("type", "List");
|
||||||
}}));
|
}}));
|
||||||
request.setCombine(map);
|
request.setCombine(map);
|
||||||
this.requestPost(FUNCTIONAL_CASE_LIST_URL, request);
|
this.requestPostWithOkAndReturn(FUNCTIONAL_CASE_LIST_URL, request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue