diff --git a/backend/src/main/java/io/metersphere/track/service/TestCaseReviewService.java b/backend/src/main/java/io/metersphere/track/service/TestCaseReviewService.java index 2287dcaaff..ca7e21a0ba 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestCaseReviewService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestCaseReviewService.java @@ -394,16 +394,14 @@ public class TestCaseReviewService { TestCaseReview testCaseReview = new TestCaseReview(); testCaseReview.setId(reviewId); - for (String status : statusList) { - if (StringUtils.equals(status, TestReviewCaseStatus.Prepare.name())) { - testCaseReview.setStatus(TestCaseReviewStatus.Underway.name()); - testCaseReviewMapper.updateByPrimaryKeySelective(testCaseReview); - return; - } else if (StringUtils.equals(status, TestReviewCaseStatus.UnPass.name())) { - testCaseReview.setStatus(TestCaseReviewStatus.Finished.name()); - testCaseReviewMapper.updateByPrimaryKeySelective(testCaseReview); - return; - } + if (statusList.contains(TestReviewCaseStatus.Prepare.name())) { + testCaseReview.setStatus(TestCaseReviewStatus.Underway.name()); + testCaseReviewMapper.updateByPrimaryKeySelective(testCaseReview); + return; + } else if(statusList.contains(TestReviewCaseStatus.UnPass.name())){ + testCaseReview.setStatus(TestCaseReviewStatus.Finished.name()); + testCaseReviewMapper.updateByPrimaryKeySelective(testCaseReview); + return; } testCaseReview.setStatus(TestCaseReviewStatus.Completed.name()); testCaseReviewMapper.updateByPrimaryKeySelective(testCaseReview);