diff --git a/backend/services/case-management/src/main/java/io/metersphere/functional/provider/CaseReviewCaseProvider.java b/backend/services/case-management/src/main/java/io/metersphere/functional/provider/CaseReviewCaseProvider.java index 7859fcc9bf..cd9bee2e80 100644 --- a/backend/services/case-management/src/main/java/io/metersphere/functional/provider/CaseReviewCaseProvider.java +++ b/backend/services/case-management/src/main/java/io/metersphere/functional/provider/CaseReviewCaseProvider.java @@ -339,6 +339,14 @@ public class CaseReviewCaseProvider implements BaseCaseProvider { Map caseCountMap = getCaseCountMap(caseReviewFunctionalCaseList); updateCaseReview(reviewId, caseReviewFunctionalCaseList.size(), caseCountMap, paramMap.get(CaseEvent.Param.USER_ID).toString()); }); + Set otherReviewIds = reviewIdMap.keySet(); + List leastReviewIds = reviewIds.stream().filter(t -> !otherReviewIds.contains(t)).toList(); + if (CollectionUtils.isNotEmpty(leastReviewIds)) { + for (String reviewId : leastReviewIds) { + Map caseCountMap = getCaseCountMap(new ArrayList<>()); + updateCaseReview(reviewId, 0, caseCountMap, paramMap.get(CaseEvent.Param.USER_ID).toString()); + } + } } return false; diff --git a/backend/services/project-management/src/main/java/io/metersphere/project/service/PermissionCheckService.java b/backend/services/project-management/src/main/java/io/metersphere/project/service/PermissionCheckService.java index 5104b4b80f..bbf7e8b270 100644 --- a/backend/services/project-management/src/main/java/io/metersphere/project/service/PermissionCheckService.java +++ b/backend/services/project-management/src/main/java/io/metersphere/project/service/PermissionCheckService.java @@ -43,6 +43,9 @@ public class PermissionCheckService { public Boolean checkModule(String projectId, String module, String userId, String permission) { Project project = projectMapper.selectByPrimaryKey(projectId); + if (project == null) { + return false; + } boolean hasPermission = userHasProjectPermission(userId, projectId, permission); if (! hasPermission) { return false;