diff --git a/test-track/backend/src/main/java/io/metersphere/service/TestCaseReviewTestCaseUsersService.java b/test-track/backend/src/main/java/io/metersphere/service/TestCaseReviewTestCaseUsersService.java index 25d98edbc5..6eb6c1a20a 100644 --- a/test-track/backend/src/main/java/io/metersphere/service/TestCaseReviewTestCaseUsersService.java +++ b/test-track/backend/src/main/java/io/metersphere/service/TestCaseReviewTestCaseUsersService.java @@ -17,9 +17,11 @@ public class TestCaseReviewTestCaseUsersService { @Resource TestCaseReviewTestCaseUsersMapper testCaseReviewTestCaseUsersMapper; - public List getUsersByCaseId(String caseId) { + public List getUsersByCaseId(String caseId, String reviewId) { TestCaseReviewTestCaseUsersExample example = new TestCaseReviewTestCaseUsersExample(); - example.createCriteria().andCaseIdEqualTo(caseId); + example.createCriteria() + .andCaseIdEqualTo(caseId) + .andReviewIdEqualTo(reviewId); return testCaseReviewTestCaseUsersMapper.selectByExample(example) .stream() .map(TestCaseReviewTestCaseUsers::getUserId) diff --git a/test-track/backend/src/main/java/io/metersphere/service/TestReviewTestCaseService.java b/test-track/backend/src/main/java/io/metersphere/service/TestReviewTestCaseService.java index ea509eca7e..67cf50b4a4 100644 --- a/test-track/backend/src/main/java/io/metersphere/service/TestReviewTestCaseService.java +++ b/test-track/backend/src/main/java/io/metersphere/service/TestReviewTestCaseService.java @@ -251,7 +251,7 @@ public class TestReviewTestCaseService { String reviewPassRule = testCaseReviewService.getTestReview(testCaseReviewTestCase.getReviewId()) .getReviewPassRule(); - List users = testCaseReviewTestCaseUsersService.getUsersByCaseId(testCaseReviewTestCase.getCaseId()); + List users = testCaseReviewTestCaseUsersService.getUsersByCaseId(testCaseReviewTestCase.getCaseId(), testCaseReviewTestCase.getReviewId()); Set reviewerSet = users.stream().collect(Collectors.toSet()); comments = filterAgainComments(comments); @@ -292,7 +292,7 @@ public class TestReviewTestCaseService { String originStatus = originReviewTestCase.getStatus(); String status = originStatus; - List reviewers = testCaseReviewTestCaseUsersService.getUsersByCaseId(testCaseReviewTestCase.getCaseId()); + List reviewers = testCaseReviewTestCaseUsersService.getUsersByCaseId(testCaseReviewTestCase.getCaseId(), testCaseReviewTestCase.getReviewId()); Set reviewerSet = reviewers.stream().collect(Collectors.toSet());