From ceea82c233b30dc6746e7d000f93b3f6c4facbdc Mon Sep 17 00:00:00 2001 From: WangXu10 Date: Tue, 25 Jun 2024 11:47:26 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92):?= =?UTF-8?q?=20=E4=BC=98=E5=8C=96=E6=9C=AA=E9=80=89=E5=8D=8F=E8=AE=AE?= =?UTF-8?q?=E6=97=B6=E6=A8=A1=E5=9D=97=E6=A0=91count=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../io/metersphere/plan/service/TestPlanApiCaseService.java | 3 +++ 1 file changed, 3 insertions(+) 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 a6963d2935..ee006c496e 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 @@ -321,6 +321,9 @@ public class TestPlanApiCaseService extends TestPlanResourceService { public Map moduleCount(TestPlanApiCaseModuleRequest request) { + if (CollectionUtils.isEmpty(request.getProtocols())) { + return Collections.emptyMap(); + } switch (request.getTreeType()) { case TreeTypeEnums.MODULE: return getModuleCount(request);