From fe060d67de93570b286e8859c5b74c34170e2ea7 Mon Sep 17 00:00:00 2001 From: limin-fit2 Date: Thu, 24 Feb 2022 11:25:19 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92):?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E5=88=97=E8=A1=A8=E4=B8=AD?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E7=94=A8=E4=BE=8B=E7=BB=9F=E8=AE=A1=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1010560 --user=李敏 【测试计划】-测试计划列表中接口用例统计错误 https://www.tapd.cn/55049933/s/1109531 --- .../io/metersphere/base/mapper/ext/ExtTestPlanMapper.xml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanMapper.xml b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanMapper.xml index 2abc80a456..7feeba9c2c 100644 --- a/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanMapper.xml +++ b/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestPlanMapper.xml @@ -120,15 +120,17 @@ inner join test_case on t.case_id = test_case.id left join test_case_node on test_case_node.id = test_case.node_id inner join project on project.id = test_case.project_id - where test_case.status != 'Trash' and t.plan_id = test_plan.id) as testPlanTestCaseCount, + where (test_case.status != 'Trash' or test_case.status is null ) + and t.plan_id = test_plan.id) as testPlanTestCaseCount, (select COUNT(*) from test_plan_api_case t inner join api_test_case c on t.api_case_id = c.id inner join api_definition a on c.api_definition_id = a.id - where t.test_plan_id = test_plan.id) as testPlanApiCaseCount, + where t.test_plan_id = test_plan.id and (c.status != 'Trash' or c.status is null)) as testPlanApiCaseCount, (select COUNT(*) from test_plan_api_scenario t - inner join api_scenario c on t.api_scenario_id = c.id and c.status != 'Trash' + inner join api_scenario c on t.api_scenario_id = c.id + and (c.status != 'Trash' or c.status is null) where t.test_plan_id = test_plan.id) as testPlanApiScenarioCount, (select COUNT(*) from test_plan_load_case t