diff --git a/api-test/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.xml b/api-test/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.xml index 44d724afd2..b58467bd6d 100644 --- a/api-test/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.xml +++ b/api-test/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.xml @@ -230,7 +230,7 @@ - and (t1.status + and (t3.status in @@ -238,7 +238,7 @@ #{v} - or t1.status is null or t1.status = '' + or t3.status is null or t3.status = '' ) @@ -250,10 +250,10 @@ #{v} - and t1.status is not null and t1.status != '' + and t3.status is not null and t3.status != '' - or t1.status is null or t1.status = '' + or t3.status is null or t3.status = '' ) @@ -406,7 +406,7 @@ a.path, a.protocol, t1.tags, - t1.status AS execResult, + t3.status AS execResult, t1.last_result_id AS lastResultId, project.NAME AS project_name, t1.delete_time, diff --git a/api-test/backend/src/main/java/io/metersphere/service/TestResultService.java b/api-test/backend/src/main/java/io/metersphere/service/TestResultService.java index 9398cf62c6..8fc3c14d88 100644 --- a/api-test/backend/src/main/java/io/metersphere/service/TestResultService.java +++ b/api-test/backend/src/main/java/io/metersphere/service/TestResultService.java @@ -253,6 +253,7 @@ public class TestResultService { ApiTestCaseWithBLOBs apiTestCase = new ApiTestCaseWithBLOBs(); apiTestCase.setLastResultId(dto.getReportId()); apiTestCase.setId(dto.getTestId()); + apiTestCase.setStatus(record.getStatus()); apiTestCaseService.updateByPrimaryKeySelective(apiTestCase); }