fix(用例管理): 修复评审批量取消关联用例有一个用例关联多个评审导致用例最后结果计算错误问题
--bug=1036899 --user=郭雨琦 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001036899
This commit is contained in:
parent
ab678d48c9
commit
cad05038c3
|
@ -137,10 +137,17 @@ public class CaseReviewCaseProvider implements BaseCaseProvider {
|
||||||
} else {
|
} else {
|
||||||
Map<String, List<CaseReviewFunctionalCase>> collect = otherReviewFunctionalCases.stream().collect(Collectors.groupingBy(CaseReviewFunctionalCase::getCaseId));
|
Map<String, List<CaseReviewFunctionalCase>> collect = otherReviewFunctionalCases.stream().collect(Collectors.groupingBy(CaseReviewFunctionalCase::getCaseId));
|
||||||
collect.forEach((caseId, caseList) -> {
|
collect.forEach((caseId, caseList) -> {
|
||||||
|
if (!caseIdList.contains(caseId)) {
|
||||||
|
FunctionalCase functionalCase = new FunctionalCase();
|
||||||
|
functionalCase.setId(caseId);
|
||||||
|
functionalCase.setReviewStatus(FunctionalCaseReviewStatus.UN_REVIEWED.toString());
|
||||||
|
mapper.updateByPrimaryKeySelective(functionalCase);
|
||||||
|
} else {
|
||||||
FunctionalCase functionalCase = new FunctionalCase();
|
FunctionalCase functionalCase = new FunctionalCase();
|
||||||
functionalCase.setId(caseId);
|
functionalCase.setId(caseId);
|
||||||
functionalCase.setReviewStatus(caseList.get(0).getStatus());
|
functionalCase.setReviewStatus(caseList.get(0).getStatus());
|
||||||
mapper.updateByPrimaryKeySelective(functionalCase);
|
mapper.updateByPrimaryKeySelective(functionalCase);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
sqlSession.flushStatements();
|
sqlSession.flushStatements();
|
||||||
|
|
Loading…
Reference in New Issue