From 23e65450c71ce49f2864216efbd983dd52663741 Mon Sep 17 00:00:00 2001 From: "song.tianyang" Date: Tue, 22 Dec 2020 13:57:35 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=A6=96=E9=A1=B5=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复首页-接口数量统计-未开始接口的统计错误 --- .../api/dto/dataCount/response/ApiDataCountDTO.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/backend/src/main/java/io/metersphere/api/dto/dataCount/response/ApiDataCountDTO.java b/backend/src/main/java/io/metersphere/api/dto/dataCount/response/ApiDataCountDTO.java index d5bd3850a6..aaf9c554e4 100644 --- a/backend/src/main/java/io/metersphere/api/dto/dataCount/response/ApiDataCountDTO.java +++ b/backend/src/main/java/io/metersphere/api/dto/dataCount/response/ApiDataCountDTO.java @@ -2,13 +2,10 @@ package io.metersphere.api.dto.dataCount.response; import io.metersphere.api.dto.dataCount.ApiDataCountResult; import io.metersphere.api.dto.scenario.request.RequestType; -import io.metersphere.base.domain.ApiDefinition; -import io.metersphere.commons.constants.APITestStatus; import lombok.Getter; import lombok.Setter; import java.util.List; -import java.util.Locale; /** * 接口数据统计返回 @@ -118,7 +115,7 @@ public class ApiDataCountDTO { /** * 对Protocal视角对查询结果进行统计 - * @param countResultList + * @param countResultList 查询参数 */ public void countProtocal(List countResultList){ for (ApiDataCountResult countResult : @@ -146,16 +143,17 @@ public class ApiDataCountDTO { /** * 对Status视角对查询结果进行统计 - * @param countResultList + * @param countResultList 查询参数 */ public void countStatus(List countResultList){ for (ApiDataCountResult countResult : countResultList) { if("Underway".equals(countResult.getGroupField())){ + //未开始 this.runningCount+= countResult.getCountNumber(); }else if("Completed".equals(countResult.getGroupField())){ this.finishedCount+= countResult.getCountNumber(); - }else if("Trash".equals(countResult.getGroupField())){ + }else if("Prepare".equals(countResult.getGroupField())){ this.notStartedCount+= countResult.getCountNumber(); } }