diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/controller/CaseReviewController.java b/backend/services/case-management/src/main/java/io/metersphere/functional/controller/CaseReviewController.java index 9c9127a52e..294ae76dec 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/controller/CaseReviewController.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/controller/CaseReviewController.java @@ -74,8 +74,8 @@ public class CaseReviewController { @SendNotice(taskType = NoticeConstants.TaskType.CASE_REVIEW_TASK, event = NoticeConstants.Event.CREATE, target = "#targetClass.getMainCaseReview(#request)", targetClass = CaseReviewNoticeService.class) @RequiresPermissions(PermissionConstants.CASE_REVIEW_READ_ADD) @CheckOwner(resourceId = "#request.getProjectId()", resourceType = "project") - public void copyCaseReview(@Validated @RequestBody CaseReviewRequest request) { - caseReviewService.addCaseReview(request, SessionUtils.getUserId()); + public String copyCaseReview(@Validated @RequestBody CaseReviewCopyRequest request) { + return caseReviewService.copyCaseReview(request, SessionUtils.getUserId()); } @PostMapping("/edit") diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/dto/CaseReviewDTO.java b/backend/services/case-management/src/main/java/io/metersphere/functional/dto/CaseReviewDTO.java index feb51016d9..19c2cd2278 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/dto/CaseReviewDTO.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/dto/CaseReviewDTO.java @@ -10,7 +10,7 @@ import java.util.List; public class CaseReviewDTO extends CaseReview { @Schema(description = "评审人") - private List reviewers; + private List reviewers; @Schema(description = "通过数") private int passCount; @@ -29,4 +29,8 @@ public class CaseReviewDTO extends CaseReview { @Schema(description = "关注标识") private Boolean followFlag; + + @Schema(description = "所属模块名称") + private String moduleName; + } diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/dto/CaseReviewUserDTO.java b/backend/services/case-management/src/main/java/io/metersphere/functional/dto/CaseReviewUserDTO.java index 6d6e5003f5..15ac9baf7f 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/dto/CaseReviewUserDTO.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/dto/CaseReviewUserDTO.java @@ -9,4 +9,7 @@ public class CaseReviewUserDTO extends CaseReviewUser { @Schema(description = "用户名") private String userName; + + @Schema(description = "头像") + private String avatar; } diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/dto/FunctionalCaseReviewDTO.java b/backend/services/case-management/src/main/java/io/metersphere/functional/dto/FunctionalCaseReviewDTO.java index c1a01e447a..d11dcc1459 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/dto/FunctionalCaseReviewDTO.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/dto/FunctionalCaseReviewDTO.java @@ -16,7 +16,7 @@ public class FunctionalCaseReviewDTO extends CaseReviewFunctionalCase { @NotBlank(message = "{case_review_functional_case.review_name.not_blank}") private String reviewName; - @Schema(description = "用例评审状态", requiredMode = Schema.RequiredMode.REQUIRED) + @Schema(description = "用例评审状态:未开始(PREPARED)/进行中(UNDERWAY)/已完成(COMPLETED)/已归档(ARCHIVED)", requiredMode = Schema.RequiredMode.REQUIRED) @NotBlank(message = "{case_review_functional_case.review_status.not_blank}") private String reviewStatus; diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtCaseReviewFunctionalCaseMapper.xml b/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtCaseReviewFunctionalCaseMapper.xml index a7c8728e7c..d93c9d95b7 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtCaseReviewFunctionalCaseMapper.xml +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtCaseReviewFunctionalCaseMapper.xml @@ -4,7 +4,7 @@ SELECT - * + case_review.* , case_review_module.name as moduleName FROM - case_review + case_review left join case_review_module on case_review.module_id = case_review_module.id where case_review.project_id = #{request.projectId} diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtCaseReviewUserMapper.xml b/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtCaseReviewUserMapper.xml index b458291791..0e7b882eff 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtCaseReviewUserMapper.xml +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/mapper/ExtCaseReviewUserMapper.xml @@ -4,9 +4,10 @@