fix(用例评审): 修复删除用例时用例评审的状态未及时更新问题
--bug=1048890 --user=郭雨琦 修复脑图排序失败问题 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001048890
This commit is contained in:
parent
0f7fb329bb
commit
268d04f1f5
|
@ -328,11 +328,19 @@ public class CaseReviewCaseProvider implements BaseCaseProvider {
|
||||||
List<String> reviewIds = deletedCaseReviewFunctionalCases.stream().map(CaseReviewFunctionalCase::getReviewId).distinct().toList();
|
List<String> reviewIds = deletedCaseReviewFunctionalCases.stream().map(CaseReviewFunctionalCase::getReviewId).distinct().toList();
|
||||||
//获取与选中case无关的关联关系
|
//获取与选中case无关的关联关系
|
||||||
List<CaseReviewFunctionalCase> caseReviewFunctionalCases = extCaseReviewFunctionalCaseMapper.getListExcludes(reviewIds, caseIdList, false);
|
List<CaseReviewFunctionalCase> caseReviewFunctionalCases = extCaseReviewFunctionalCaseMapper.getListExcludes(reviewIds, caseIdList, false);
|
||||||
Map<String, List<CaseReviewFunctionalCase>> reviewIdMap = caseReviewFunctionalCases.stream().collect(Collectors.groupingBy(CaseReviewFunctionalCase::getReviewId));
|
if (CollectionUtils.isEmpty(caseReviewFunctionalCases)) {
|
||||||
reviewIdMap.forEach((reviewId, caseReviewFunctionalCaseList) -> {
|
for (String reviewId : reviewIds) {
|
||||||
Map<String, Integer> caseCountMap = getCaseCountMap(caseReviewFunctionalCaseList);
|
Map<String, Integer> caseCountMap = getCaseCountMap(caseReviewFunctionalCases);
|
||||||
updateCaseReview(reviewId, caseReviewFunctionalCaseList.size(), caseCountMap, paramMap.get(CaseEvent.Param.USER_ID).toString());
|
updateCaseReview(reviewId, caseReviewFunctionalCases.size(), caseCountMap, paramMap.get(CaseEvent.Param.USER_ID).toString());
|
||||||
});
|
}
|
||||||
|
} else {
|
||||||
|
Map<String, List<CaseReviewFunctionalCase>> reviewIdMap = caseReviewFunctionalCases.stream().collect(Collectors.groupingBy(CaseReviewFunctionalCase::getReviewId));
|
||||||
|
reviewIdMap.forEach((reviewId, caseReviewFunctionalCaseList) -> {
|
||||||
|
Map<String, Integer> caseCountMap = getCaseCountMap(caseReviewFunctionalCaseList);
|
||||||
|
updateCaseReview(reviewId, caseReviewFunctionalCaseList.size(), caseCountMap, paramMap.get(CaseEvent.Param.USER_ID).toString());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue