diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestReviewCaseMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestReviewCaseMapper.xml index f8daab3bbd..482bb34753 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestReviewCaseMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestReviewCaseMapper.xml @@ -100,7 +100,7 @@ test_case_review_test_case.update_time, test_case_review_test_case.review_id as reviewId, test_case.id as caseId, test_case.name, test_case.priority, test_case.test_id as testId, test_case.type, test_case.node_path, test_case.method, if(pa.type_value = 'false', cast(test_case.num as char), - test_case.custom_num) as customNum, test_case.review_status, + test_case.custom_num) as customNum, test_case_review_test_case.status reviewStatus, test_case.remark as remark, test_case.maintainer, test_case.steps as steps, test_case.node_id as nodeId, test_case_node.name as model, project.name as projectName, diff --git a/backend/src/main/java/io/metersphere/track/service/TestReviewTestCaseService.java b/backend/src/main/java/io/metersphere/track/service/TestReviewTestCaseService.java index 309d1f3177..d84afddd42 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestReviewTestCaseService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestReviewTestCaseService.java @@ -221,13 +221,18 @@ public class TestReviewTestCaseService { checkReviewCase(request.getReviewId()); } - // 更新状态 + // 更新状态{TestCase, TestCaseReviewTestCase} if (StringUtils.isNotBlank(request.getStatus())) { TestCaseExample example = new TestCaseExample(); example.createCriteria().andIdIn(ids); TestCaseWithBLOBs testCase = new TestCaseWithBLOBs(); testCase.setReviewStatus(request.getStatus()); testCaseMapper.updateByExampleSelective(testCase, example); + TestCaseReviewTestCaseExample caseReviewTestCaseExample = new TestCaseReviewTestCaseExample(); + caseReviewTestCaseExample.createCriteria().andReviewIdEqualTo(request.getReviewId()).andCaseIdIn(ids); + TestCaseReviewTestCase testCaseReviewTestCase = new TestCaseReviewTestCase(); + testCaseReviewTestCase.setStatus(request.getStatus()); + testCaseReviewTestCaseMapper.updateByExampleSelective(testCaseReviewTestCase, caseReviewTestCaseExample); } }