diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtCaseReviewMapper.xml b/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtCaseReviewMapper.xml index 0e915fcc5a..61c8a6ad56 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtCaseReviewMapper.xml +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtCaseReviewMapper.xml @@ -65,6 +65,15 @@ + + case_review.module_id in + + #{moduleId} + + + + + ( case_review.name like concat('%', #{request.keyword},'%') @@ -355,7 +364,7 @@ update case_review - set module_id = #{request.moduleId}, + set module_id = #{request.moveModuleId}, update_user = #{userId}, update_time = UNIX_TIMESTAMP()*1000 where id in diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/request/CaseReviewBatchRequest.java b/backend/services/case-management/src/main/java/io/metersphere/functional/request/CaseReviewBatchRequest.java index fe1986d363..13a5ef4fdb 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/request/CaseReviewBatchRequest.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/request/CaseReviewBatchRequest.java @@ -5,6 +5,7 @@ import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import java.io.Serializable; +import java.util.List; /** * @author guoyuqi @@ -15,7 +16,10 @@ public class CaseReviewBatchRequest extends TableBatchProcessDTO implements Seri @Schema(description = "项目ID", requiredMode = Schema.RequiredMode.REQUIRED) private String projectId; - @Schema(description = "模块ID", requiredMode = Schema.RequiredMode.REQUIRED) - private String moduleId; + @Schema(description = "目标模块id", requiredMode = Schema.RequiredMode.REQUIRED) + private String moveModuleId; + + @Schema(description = "模块id") + private List moduleIds; } diff --git a/backend/services/case-management/src/test/java/io/metersphere/functional/controller/CaseReviewControllerTests.java b/backend/services/case-management/src/test/java/io/metersphere/functional/controller/CaseReviewControllerTests.java index 3c82148b1b..4e8a7d0d0f 100644 --- a/backend/services/case-management/src/test/java/io/metersphere/functional/controller/CaseReviewControllerTests.java +++ b/backend/services/case-management/src/test/java/io/metersphere/functional/controller/CaseReviewControllerTests.java @@ -472,7 +472,7 @@ public class CaseReviewControllerTests extends BaseTest { String moduleId = caseReviews.get(0).getModuleId(); CaseReviewBatchRequest request = new CaseReviewBatchRequest(); request.setProjectId(projectId); - request.setModuleId("CASE_REVIEW_REAL_MODULE_ID2"); + request.setMoveModuleId("CASE_REVIEW_REAL_MODULE_ID2"); request.setSelectAll(false); this.requestPostWithOkAndReturn(BATCH_MOVE_CASE_REVIEW, request); request.setSelectAll(true); @@ -482,7 +482,7 @@ public class CaseReviewControllerTests extends BaseTest { Assertions.assertFalse(StringUtils.equals(moduleId, moduleIdNew)); request = new CaseReviewBatchRequest(); request.setProjectId(projectId); - request.setModuleId("CASE_REVIEW_REAL_MODULE_ID2"); + request.setMoveModuleId("CASE_REVIEW_REAL_MODULE_ID2"); request.setSelectAll(false); request.setExcludeIds(List.of(caseReviews.get(0).getId())); this.requestPostWithOkAndReturn(BATCH_MOVE_CASE_REVIEW, request);