From 6c9bfe2c72848718aa28ee5f107371a94a753d10 Mon Sep 17 00:00:00 2001 From: wyj2080 <1603068044@qq.com> Date: Thu, 23 Apr 2020 15:45:04 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9B=B6=E5=94=AE=E5=85=AC=E5=8F=B8=E5=BA=97?= =?UTF-8?q?=E5=9D=87=E5=A5=BD=E5=8F=8Btop10?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/kiisoo/ic/customer/service/CustomerViewService.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/kiisoo/ic/customer/service/CustomerViewService.java b/src/main/java/com/kiisoo/ic/customer/service/CustomerViewService.java index 3784969..b03fd4a 100644 --- a/src/main/java/com/kiisoo/ic/customer/service/CustomerViewService.java +++ b/src/main/java/com/kiisoo/ic/customer/service/CustomerViewService.java @@ -260,6 +260,10 @@ public class CustomerViewService { int tmpCount = shopIdCountMap.get(shopId) == null ? 0 : Math.toIntExact(shopIdCountMap.get(shopId)); newCustomerCount.updateAndGet(v -> v + tmpCount); }); + //平均 + if(companyShopList.size() > 0){ + newCustomerCount.updateAndGet(v -> Math.round(v / (float)companyShopList.size())); + } orgViewDO.setNewCustomerCount(newCustomerCount.get()); tmpList.add(orgViewDO); });