diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanApiCaseService.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanApiCaseService.java index 8526f53d18..64ce85768d 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanApiCaseService.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanApiCaseService.java @@ -340,6 +340,7 @@ public class TestPlanApiCaseService extends TestPlanResourceService { * @return */ private Map getCollectionCount(TestPlanApiCaseModuleRequest request) { + request.setCollectionId(null); Map projectModuleCountMap = new HashMap<>(); List list = extTestPlanApiCaseMapper.collectionCountByRequest(request.getTestPlanId()); list.forEach(item -> { diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanApiScenarioService.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanApiScenarioService.java index b3719533bc..e3673ec99f 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanApiScenarioService.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanApiScenarioService.java @@ -473,6 +473,7 @@ public class TestPlanApiScenarioService extends TestPlanResourceService { * @return */ private Map getCollectionCount(TestPlanApiScenarioModuleRequest request) { + request.setCollectionId(null); Map projectModuleCountMap = new HashMap<>(); List list = extTestPlanApiScenarioMapper.collectionCountByRequest(request.getTestPlanId()); list.forEach(item -> { diff --git a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanFunctionalCaseService.java b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanFunctionalCaseService.java index 637ece200b..0550a5f5b0 100644 --- a/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanFunctionalCaseService.java +++ b/backend/services/test-plan/src/main/java/io/metersphere/plan/service/TestPlanFunctionalCaseService.java @@ -365,6 +365,7 @@ public class TestPlanFunctionalCaseService extends TestPlanResourceService { * @return */ private Map getCollectionCount(TestPlanCaseModuleRequest request) { + request.setCollectionId(null); Map projectModuleCountMap = new HashMap<>(); List list = extTestPlanFunctionalCaseMapper.collectionCountByRequest(request.getTestPlanId()); list.forEach(item -> {