feat(功能用例): 增加新增功能用例返回值

This commit is contained in:
guoyuqi 2024-01-08 13:42:46 +08:00 committed by Craftsman
parent e073d53d6e
commit 7ddf7af755
2 changed files with 4 additions and 3 deletions

View File

@ -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) @SendNotice(taskType = NoticeConstants.TaskType.CASE_REVIEW_TASK, event = NoticeConstants.Event.CREATE, target = "#targetClass.getMainCaseReview(#request)", targetClass = CaseReviewNoticeService.class)
@RequiresPermissions(PermissionConstants.CASE_REVIEW_READ_ADD) @RequiresPermissions(PermissionConstants.CASE_REVIEW_READ_ADD)
@CheckOwner(resourceId = "#request.getProjectId()", resourceType = "project") @CheckOwner(resourceId = "#request.getProjectId()", resourceType = "project")
public void addCaseReview(@Validated @RequestBody CaseReviewRequest request) { public String addCaseReview(@Validated @RequestBody CaseReviewRequest request) {
caseReviewService.addCaseReview(request, SessionUtils.getUserId()); return caseReviewService.addCaseReview(request, SessionUtils.getUserId());
} }
@PostMapping("/copy") @PostMapping("/copy")

View File

@ -201,7 +201,7 @@ public class CaseReviewService {
* @param request 页面参数 * @param request 页面参数
* @param userId 当前操作人 * @param userId 当前操作人
*/ */
public void addCaseReview(CaseReviewRequest request, String userId) { public String addCaseReview(CaseReviewRequest request, String userId) {
String caseReviewId = IDGenerator.nextStr(); String caseReviewId = IDGenerator.nextStr();
BaseAssociateCaseRequest baseAssociateCaseRequest = request.getBaseAssociateCaseRequest(); BaseAssociateCaseRequest baseAssociateCaseRequest = request.getBaseAssociateCaseRequest();
List<String> caseIds = doSelectIds(baseAssociateCaseRequest, baseAssociateCaseRequest.getProjectId()); List<String> caseIds = doSelectIds(baseAssociateCaseRequest, baseAssociateCaseRequest.getProjectId());
@ -221,6 +221,7 @@ public class CaseReviewService {
} finally { } finally {
SqlSessionUtils.closeSqlSession(sqlSession, sqlSessionFactory); SqlSessionUtils.closeSqlSession(sqlSession, sqlSessionFactory);
} }
return caseReviewId;
} }
/** /**