From 7ddf7af7555cf458ce6692e2598e932c19944bba Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Mon, 8 Jan 2024 13:42:46 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E5=8A=9F=E8=83=BD=E7=94=A8=E4=BE=8B):=20?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=96=B0=E5=A2=9E=E5=8A=9F=E8=83=BD=E7=94=A8?= =?UTF-8?q?=E4=BE=8B=E8=BF=94=E5=9B=9E=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../functional/controller/CaseReviewController.java | 4 ++-- .../io/metersphere/functional/service/CaseReviewService.java | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) 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 f4daffba74..9c9127a52e 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 @@ -64,8 +64,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 addCaseReview(@Validated @RequestBody CaseReviewRequest request) { - caseReviewService.addCaseReview(request, SessionUtils.getUserId()); + public String addCaseReview(@Validated @RequestBody CaseReviewRequest request) { + return caseReviewService.addCaseReview(request, SessionUtils.getUserId()); } @PostMapping("/copy") diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/service/CaseReviewService.java b/backend/services/case-management/src/main/java/io/metersphere/functional/service/CaseReviewService.java index be4bc512bd..39e75defd9 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/service/CaseReviewService.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/service/CaseReviewService.java @@ -201,7 +201,7 @@ public class CaseReviewService { * @param request 页面参数 * @param userId 当前操作人 */ - public void addCaseReview(CaseReviewRequest request, String userId) { + public String addCaseReview(CaseReviewRequest request, String userId) { String caseReviewId = IDGenerator.nextStr(); BaseAssociateCaseRequest baseAssociateCaseRequest = request.getBaseAssociateCaseRequest(); List caseIds = doSelectIds(baseAssociateCaseRequest, baseAssociateCaseRequest.getProjectId()); @@ -221,6 +221,7 @@ public class CaseReviewService { } finally { SqlSessionUtils.closeSqlSession(sqlSession, sqlSessionFactory); } + return caseReviewId; } /**