From 4f0b2f98800a8764afa4cdf2dbe9beb33cd03fad Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Wed, 24 Aug 2022 13:50:58 +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=8D=E5=9B=9E=E6=94=B6=E7=AB=99=E7=AD=9B=E9=80=89?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=E7=BB=93=E6=9E=9C=E5=A4=B1=E8=B4=A5=E7=9A=84?= =?UTF-8?q?=E7=BC=BA=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1016224 --user=王孝刚 【接口测试】接口定义,回收站,case列表,搜索执行结果是未执行的case,搜索结果是空的 https://www.tapd.cn/55049933/s/1231976 --- .../java/io/metersphere/api/service/ApiTestCaseService.java | 5 +---- .../io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.xml | 5 ++++- .../api/definition/components/list/ApiCaseSimpleList.vue | 4 ---- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/backend/src/main/java/io/metersphere/api/service/ApiTestCaseService.java b/backend/src/main/java/io/metersphere/api/service/ApiTestCaseService.java index 641f2e5b49..15f6549564 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiTestCaseService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiTestCaseService.java @@ -289,10 +289,7 @@ public class ApiTestCaseService { if (updateUser != null) { caseResult.setUpdateUser(updateUser.getName()); } - //检查用例的执行状态是否是null(如果报告被删除)。 如果执行结果是null,取记录最后执行状态的status字段 - if (caseResult.getExecResult() == null && StringUtils.isNotEmpty(caseResult.getStatus()) && !StringUtils.equalsIgnoreCase(caseResult.getStatus(), "trash")) { - caseResult.setExecResult(caseResult.getStatus()); - } + }); } } diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.xml index 76989bf38f..e5fcf5316f 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiTestCaseMapper.xml @@ -473,10 +473,13 @@ - and t1.STATUS in + and (t3.status in (#{value}) + + or t3.status is null + ) and t1.create_user_id in diff --git a/frontend/src/business/components/api/definition/components/list/ApiCaseSimpleList.vue b/frontend/src/business/components/api/definition/components/list/ApiCaseSimpleList.vue index 25475dfa77..3ed1426604 100644 --- a/frontend/src/business/components/api/definition/components/list/ApiCaseSimpleList.vue +++ b/frontend/src/business/components/api/definition/components/list/ApiCaseSimpleList.vue @@ -755,10 +755,6 @@ export default { } this.initCondition(); let isNext = false; - //导入的case执行结果默认为prepare,导致搜索未执行失败 - if (this.condition.filters && this.condition.filters.exec_result && this.condition.filters.exec_result.indexOf('') !== -1) { - this.condition.filters.exec_result.push("Prepare") - } if (this.condition.projectId) { this.result = this.$post('/api/testcase/list/' + this.currentPage + "/" + this.pageSize, this.condition, response => { this.total = response.data.itemCount;