diff --git a/backend/src/main/java/io/metersphere/track/service/TestCaseNodeService.java b/backend/src/main/java/io/metersphere/track/service/TestCaseNodeService.java index f4510f9416..6b2cfc3465 100644 --- a/backend/src/main/java/io/metersphere/track/service/TestCaseNodeService.java +++ b/backend/src/main/java/io/metersphere/track/service/TestCaseNodeService.java @@ -249,6 +249,7 @@ public class TestCaseNodeService extends NodeTreeService { this.getDefaultNode(projectId); request.setProjectId(projectId); request.setUserId(SessionUtils.getUserId()); + request.setNodeIds(null); List countMNodes = extTestCaseMapper.getCountNodes(request); List testCaseNodes = extTestCaseNodeMapper.getNodeTreeByProjectId(projectId); return getNodeTrees(testCaseNodes, getCountMap(countMNodes)); @@ -265,6 +266,7 @@ public class TestCaseNodeService extends NodeTreeService { public List getNodeByPlanId(String planId, QueryTestPlanCaseRequest request) { request.setPlanId(planId); request.setProjectId(null); + request.setNodeIds(null); List countModules = extTestPlanTestCaseMapper.getTestPlanCountNodes(request); return getNodeTreeWithPruningTree(countModules); } @@ -272,12 +274,14 @@ public class TestCaseNodeService extends NodeTreeService { public List getPublicCaseNode(String workspaceId, QueryTestCaseRequest request) { request.setWorkspaceId(workspaceId); request.setProjectId(null); + request.setNodeIds(null); List countModules = extTestCaseMapper.getWorkspaceCountNodes(request); return getNodeTreeWithPruningTree(countModules); } public List getTrashCaseNode(String projectId, QueryTestCaseRequest request) { request.setProjectId(projectId); + request.setNodeIds(null); List countModules = extTestCaseMapper.getCountNodes(request); countModules.forEach(item -> item.setProjectId(projectId)); return getNodeTreeWithPruningTree(countModules); @@ -294,6 +298,7 @@ public class TestCaseNodeService extends NodeTreeService { public List getNodeByReviewId(String reviewId, QueryCaseReviewRequest request) { request.setReviewId(reviewId); request.setProjectId(null); + request.setNodeIds(null); List countModules = extTestReviewCaseMapper.getTestReviewCountNodes(request); return getNodeTreeWithPruningTree(countModules); } @@ -340,12 +345,14 @@ public class TestCaseNodeService extends NodeTreeService { } public List getRelatePlanNodes(QueryTestCaseRequest request) { + request.setNodeIds(null); List countMNodes = extTestCaseMapper.getTestPlanRelateCountNodes(request); List testCaseNodes = extTestCaseNodeMapper.getNodeTreeByProjectId(request.getProjectId()); return getNodeTreeWithPruningTreeByCaseCount(testCaseNodes, getCountMap(countMNodes)); } public List getRelateReviewNodes(QueryTestCaseRequest request) { + request.setNodeIds(null); List countMNodes = extTestCaseMapper.getTestReviewRelateCountNodes(request); List testCaseNodes = extTestCaseNodeMapper.getNodeTreeByProjectId(request.getProjectId()); return getNodeTreeWithPruningTreeByCaseCount(testCaseNodes, getCountMap(countMNodes));