fix(功能用例): 修复用例评审状态未及时更新问题

This commit is contained in:
guoyuqi 2024-11-25 19:53:33 +08:00 committed by Craftsman
parent 36f6a41288
commit d1e4c688e3
2 changed files with 11 additions and 0 deletions

View File

@ -339,6 +339,14 @@ public class CaseReviewCaseProvider implements BaseCaseProvider {
Map<String, Integer> caseCountMap = getCaseCountMap(caseReviewFunctionalCaseList); Map<String, Integer> caseCountMap = getCaseCountMap(caseReviewFunctionalCaseList);
updateCaseReview(reviewId, caseReviewFunctionalCaseList.size(), caseCountMap, paramMap.get(CaseEvent.Param.USER_ID).toString()); updateCaseReview(reviewId, caseReviewFunctionalCaseList.size(), caseCountMap, paramMap.get(CaseEvent.Param.USER_ID).toString());
}); });
Set<String> otherReviewIds = reviewIdMap.keySet();
List<String> leastReviewIds = reviewIds.stream().filter(t -> !otherReviewIds.contains(t)).toList();
if (CollectionUtils.isNotEmpty(leastReviewIds)) {
for (String reviewId : leastReviewIds) {
Map<String, Integer> caseCountMap = getCaseCountMap(new ArrayList<>());
updateCaseReview(reviewId, 0, caseCountMap, paramMap.get(CaseEvent.Param.USER_ID).toString());
}
}
} }
return false; return false;

View File

@ -43,6 +43,9 @@ public class PermissionCheckService {
public Boolean checkModule(String projectId, String module, String userId, String permission) { public Boolean checkModule(String projectId, String module, String userId, String permission) {
Project project = projectMapper.selectByPrimaryKey(projectId); Project project = projectMapper.selectByPrimaryKey(projectId);
if (project == null) {
return false;
}
boolean hasPermission = userHasProjectPermission(userId, projectId, permission); boolean hasPermission = userHasProjectPermission(userId, projectId, permission);
if (! hasPermission) { if (! hasPermission) {
return false; return false;