From 07f6212eae81b6139f24c7e804e400489b13cf7d Mon Sep 17 00:00:00 2001 From: song-cc-rock Date: Tue, 22 Oct 2024 16:47:42 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92):=20?= =?UTF-8?q?=E5=B7=A6=E4=BE=A7=E6=A8=A1=E5=9D=97=E6=A0=91=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1047687 --user=宋昌昌 【测试计划】模块模式-模块树未展示用例数&模块脑图模式-脑图未展示用例数据 https://www.tapd.cn/55049933/s/1595659 --- .../plan/mapper/ExtTestPlanApiCaseMapper.xml | 2 +- .../mapper/ExtTestPlanApiScenarioMapper.xml | 3 ++- .../ExtTestPlanFunctionalCaseMapper.xml | 21 ++++++------------- .../plan/service/TestPlanApiCaseService.java | 5 ++++- .../service/TestPlanApiScenarioService.java | 5 ++++- .../TestPlanFunctionalCaseService.java | 6 ++++-- 6 files changed, 21 insertions(+), 21 deletions(-) diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanApiCaseMapper.xml b/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanApiCaseMapper.xml index 7eb7d96a99..4f22487674 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanApiCaseMapper.xml +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanApiCaseMapper.xml @@ -680,7 +680,7 @@ - SELECT concat(api_scenario.project_id, '_', api_scenario.module_id) as moduleId, + SELECT CASE WHEN api_scenario.module_id = 'root' THEN CONCAT(api_scenario.project_id, '_', + api_scenario.module_id) ELSE api_scenario.module_id END AS moduleId, count(api_scenario.id) AS dataCount, api_scenario.project_id AS projectId, project.name AS projectName FROM test_plan_api_scenario INNER JOIN api_scenario on api_scenario.id = test_plan_api_scenario.api_scenario_id diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanFunctionalCaseMapper.xml b/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanFunctionalCaseMapper.xml index 22eda0f636..f92721e907 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanFunctionalCaseMapper.xml +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/mapper/ExtTestPlanFunctionalCaseMapper.xml @@ -316,20 +316,10 @@ - - - concat(functional_case.project_id, '_', functional_case.module_id) in - - #{v} - - - - concat(functional_case.project_id, '_', functional_case.module_id) not in - - #{v} - - - + + + + @@ -569,7 +559,8 @@