From 12da96c46f9016d2255c4cc044a111f7894de85f Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Wed, 11 Jan 2023 13:49:22 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E5=AE=9A=E4=B9=89):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8Dcase=E6=90=9C=E7=B4=A2=E6=89=A7=E8=A1=8C?= =?UTF-8?q?=E7=BB=93=E6=9E=9C=E5=A4=B1=E8=B4=A5=E7=9A=84=E7=BC=BA=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1021812 --user=王孝刚 【接口测试】接口case列表,按执行结果搜索,搜索结果错误 https://www.tapd.cn/55049933/s/1325964 --- .../base/mapper/ext/ExtApiTestCaseMapper.xml | 10 +++++----- .../java/io/metersphere/service/TestResultService.java | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) 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); }