From f0e7e494023908a42e8d070bc6772b749bdaecf1 Mon Sep 17 00:00:00 2001
From: AgAngle <1323481023@qq.com>
Date: Mon, 18 Dec 2023 15:29:58 +0800
Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?=
=?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E5=85=B3=E8=81=94=E6=8E=A5?=
=?UTF-8?q?=E5=8F=A3=E7=94=A8=E4=BE=8B=E9=A1=B5=E9=9D=A2=EF=BC=8C=E6=98=BE?=
=?UTF-8?q?=E7=A4=BA=E4=BA=86=E7=94=A8=E4=BE=8B=E6=95=B0=E4=B8=BA=E9=9B=B6?=
=?UTF-8?q?=E7=9A=84=E6=8E=A5=E5=8F=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
--bug=1033138 --user=陈建星 【接口测试】github#27658,删除接口的用例后,在测试计划关联接口用例弹窗页仍可看到该接口 https://www.tapd.cn/55049933/s/1444814
---
.../base/mapper/ext/ExtApiDefinitionMapper.xml | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/api-test/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionMapper.xml b/api-test/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionMapper.xml
index 437ecd5356..279589b899 100644
--- a/api-test/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionMapper.xml
+++ b/api-test/backend/src/main/java/io/metersphere/base/mapper/ext/ExtApiDefinitionMapper.xml
@@ -597,19 +597,19 @@
-
- and exists (
+ and exists (
select id
from api_test_case c
- where c.api_definition_id = api_definition.id
+ where c.api_definition_id = api_definition.id and c.status != 'Trash'
+
and not exists (
- select id
- from test_plan_api_case t
- where t.api_case_id = c.id
- and t.test_plan_id = #{request.planId}
+ select id
+ from test_plan_api_case t
+ where t.api_case_id = c.id
+ and t.test_plan_id = #{request.planId}
)
- )
-
+
+ )