From 93d6d488a59d24b7c0bfa2f5b1528c511b4f3315 Mon Sep 17 00:00:00 2001 From: Jianguo-Genius Date: Thu, 19 Dec 2024 15:44:17 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B7=A5=E4=BD=9C=E5=8F=B0=E6=98=AF=E5=90=A6?= =?UTF-8?q?=E8=A6=86=E7=9B=96=E8=B7=B3=E8=BD=AC=E6=97=B6=E6=A8=A1=E5=9D=97?= =?UTF-8?q?=E6=A0=91=E6=B2=A1=E6=9C=89=E7=BA=A7=E8=81=94=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/definition/ApiDefinitionModuleService.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiDefinitionModuleService.java b/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiDefinitionModuleService.java index 14cfe6eb8e..540024bdfe 100644 --- a/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiDefinitionModuleService.java +++ b/backend/services/api-test/src/main/java/io/metersphere/api/service/definition/ApiDefinitionModuleService.java @@ -74,9 +74,7 @@ public class ApiDefinitionModuleService extends ModuleTreeService { if (!containRequest || CollectionUtils.isEmpty(request.getProtocols())) { return baseTreeNodes; } - ApiDefinitionService apiDefinitionService = CommonBeanFactory.getBean(ApiDefinitionService.class); - request.setExcludeIds(apiDefinitionService.getQueryExcludeIds(request.getFilter(), request.getProjectId(), request.getProtocols())); - request.setIncludeIds(apiDefinitionService.getQueryIncludeIds(request.getFilter(), request.getProjectId(), request.getProtocols())); + List apiTreeNodeList = extApiDefinitionModuleMapper.selectApiDataByRequest(request, deleted); return apiDebugModuleService.getBaseTreeNodes(apiTreeNodeList, baseTreeNodes); @@ -275,6 +273,11 @@ public class ApiDefinitionModuleService extends ModuleTreeService { isRepeat = this.checkTestPlanRepeatCase(request); } request.setModuleIds(null); + + ApiDefinitionService apiDefinitionService = CommonBeanFactory.getBean(ApiDefinitionService.class); + request.setExcludeIds(apiDefinitionService.getQueryExcludeIds(request.getFilter(), request.getProjectId(), request.getProtocols())); + request.setIncludeIds(apiDefinitionService.getQueryIncludeIds(request.getFilter(), request.getProjectId(), request.getProtocols())); + //查找根据moduleIds查找模块下的接口数量 查非delete状态的 List moduleCountDTOList = extApiDefinitionModuleMapper.countModuleIdByRequest(request, deleted, isRepeat); long allCount = getAllCount(moduleCountDTOList);