From a43dc028e6a329372c1ee49b4d17c72dcc6f0b77 Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Mon, 21 Feb 2022 17:47:18 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E8=84=91=E5=9B=BE=E6=97=A0=E6=B3=95=E6=9F=A5=E7=9C=8B=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E8=AE=A1=E5=88=92=E5=85=B3=E8=81=94=E7=9A=84=E7=BC=BA?= =?UTF-8?q?=E9=99=B7=20--bug=3D1010441=20--user=3D=E9=99=88=E5=BB=BA?= =?UTF-8?q?=E6=98=9F=20=E3=80=90=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA?= =?UTF-8?q?=E3=80=91=E8=84=91=E5=9B=BE=E6=9F=A5=E7=9C=8B=E7=94=A8=E4=BE=8B?= =?UTF-8?q?=EF=BC=8C=E6=B2=A1=E6=98=BE=E7=A4=BA=E5=85=B3=E8=81=94=E7=9A=84?= =?UTF-8?q?=E7=BC=BA=E9=99=B7=20https://www.tapd.cn/55049933/s/1106863?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../base/mapper/ext/ExtTestCaseMapper.xml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml index ab23f7c8ba..f1154f8da7 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml @@ -739,17 +739,23 @@ from ( select tptc.id as s from test_plan_test_case tptc join test_case on tptc.case_id = test_case.id - where tptc.plan_id = #{planId} + where tptc.plan_id = #{planId} and (test_case.status != 'Trash' or test_case.status is null) + union all + select tpas.id as s from test_plan_api_scenario tpas join api_scenario on tpas.api_scenario_id = api_scenario.id - where tpas.test_plan_id = #{planId} and api_scenario.status != 'Trash' + where tpas.test_plan_id = #{planId} and (api_scenario.status != 'Trash' or api_scenario.status is null) + union all + select tpac.id as s from test_plan_api_case tpac join api_test_case on tpac.api_case_id = api_test_case.id join api_definition on api_test_case.api_definition_id = api_definition.id - where tpac.test_plan_id = #{planId} and api_definition.status != 'Trash' + where tpac.test_plan_id = #{planId} and (api_definition.status != 'Trash' or api_definition.status is null) + union all + select tplc.id as s from test_plan_load_case tplc join load_test on tplc.load_case_id = load_test.id where tplc.test_plan_id = #{planId}