From 90dbc0d9f4b01bf1738fb1460a82d6fe83f7fb5e Mon Sep 17 00:00:00 2001 From: dinggang <2498628697@qq.com> Date: Fri, 1 Jul 2022 19:55:13 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/io/renren/common/controller/CensusControllerV2.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/renren-admin/src/main/java/io/renren/common/controller/CensusControllerV2.java b/renren-admin/src/main/java/io/renren/common/controller/CensusControllerV2.java index 3dc11df1..99670f49 100644 --- a/renren-admin/src/main/java/io/renren/common/controller/CensusControllerV2.java +++ b/renren-admin/src/main/java/io/renren/common/controller/CensusControllerV2.java @@ -326,7 +326,9 @@ public class CensusControllerV2 { allAmount = CompletableFuture.supplyAsync(() -> { // 获取平台总基础设施数目 Map map = (Map) resourceService.selectTotal(); List> dbAmount = (List>) map.get("total"); - return dbAmount.stream().mapToLong(index -> Long.parseLong(index.get("count").toString())).sum(); + + return dbAmount.stream().filter(index -> "基础设施".equals(index.get("type").toString())) + .mapToLong(index -> Long.parseLong(index.get("count").toString())).sum(); }).thenAccept(sum -> { result.add(new HashMap() { {