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 @@