fix(用例评审): 删除评审时删除关联的用例

This commit is contained in:
shiziyuan9527 2020-09-22 14:35:25 +08:00
parent b65a571a51
commit a88f81de2e
1 changed files with 8 additions and 1 deletions

View File

@ -226,6 +226,7 @@ public class TestCaseReviewService {
public void deleteCaseReview(String reviewId) {
deleteCaseReviewProject(reviewId);
deleteCaseReviewUsers(reviewId);
deleteCaseReviewTestCase(reviewId);
testCaseReviewMapper.deleteByPrimaryKey(reviewId);
}
@ -241,6 +242,12 @@ public class TestCaseReviewService {
testCaseReviewUsersMapper.deleteByExample(testCaseReviewUsersExample);
}
private void deleteCaseReviewTestCase(String reviewId) {
TestCaseReviewTestCaseExample testCaseReviewTestCaseExample = new TestCaseReviewTestCaseExample();
testCaseReviewTestCaseExample.createCriteria().andReviewIdEqualTo(reviewId);
testCaseReviewTestCaseMapper.deleteByExample(testCaseReviewTestCaseExample);
}
public List<TestCaseReview> listCaseReviewAll(String currentWorkspaceId) {
ProjectExample projectExample = new ProjectExample();
projectExample.createCriteria().andWorkspaceIdEqualTo(currentWorkspaceId);