fix: 用例评审脑图编辑

This commit is contained in:
chenjianxing 2021-03-17 10:54:31 +08:00
parent 9fa89f3a9c
commit caf3f3652c
2 changed files with 20 additions and 0 deletions

View File

@ -49,6 +49,12 @@ public class TestReviewTestCaseController {
testReviewTestCaseService.editTestCaseBatchStatus(request); testReviewTestCaseService.editTestCaseBatchStatus(request);
} }
@PostMapping("/minder/edit")
@RequiresRoles(value = {RoleConstants.TEST_USER, RoleConstants.TEST_MANAGER}, logical = Logical.OR)
public void editTestCaseForMinder(@RequestBody List<TestCaseReviewTestCase> testCases) {
testReviewTestCaseService.editTestCaseForMinder(testCases);
}
@PostMapping("/list/all") @PostMapping("/list/all")
public List<TestReviewCaseDTO> getTestReviewCases(@RequestBody QueryCaseReviewRequest request) { public List<TestReviewCaseDTO> getTestReviewCases(@RequestBody QueryCaseReviewRequest request) {
return testReviewTestCaseService.list(request); return testReviewTestCaseService.list(request);

View File

@ -163,4 +163,18 @@ public class TestReviewTestCaseService {
MSException.throwException("非此用例的评审人员!"); MSException.throwException("非此用例的评审人员!");
} }
} }
public void editTestCaseForMinder(List<TestCaseReviewTestCase> testCaseReviewTestCases) {
if (!CollectionUtils.isEmpty(testCaseReviewTestCases)) {
List<TestCaseWithBLOBs> testCaseList = new ArrayList<>();
testCaseReviewTestCases.forEach((item) -> {
TestCaseWithBLOBs testCase = new TestCaseWithBLOBs();
testCase.setId(item.getCaseId());
testCase.setReviewStatus(item.getStatus());
testCaseList.add(testCase);
testCaseReviewTestCaseMapper.updateByPrimaryKeySelective(item);
});
testCaseList.forEach(testCaseMapper::updateByPrimaryKeySelective);
}
}
} }