From 31368b494ed63185facf3b7b93258a7efaa2452d Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Wed, 21 Sep 2022 16:37:05 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E8=AF=84=E5=AE=A1=E7=94=A8=E4=BE=8B=E5=90=8E=E7=94=A8=E4=BE=8B?= =?UTF-8?q?=E8=AF=84=E5=AE=A1=E5=88=97=E8=A1=A8=E7=8A=B6=E6=80=81=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1017110 --user=宋昌昌 【测试跟踪】用例评审状态不对 https://www.tapd.cn/55049933/s/1248907 --- .../track/service/TestCaseReviewService.java | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) 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);