From 588e1b218cdb140792038f928aa605d9fa800f37 Mon Sep 17 00:00:00 2001 From: wyj2080 <1603068044@qq.com> Date: Mon, 20 Apr 2020 19:54:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E6=A6=82=E8=A7=88=EF=BC=8C0?= =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E9=99=90=E5=88=B6=E6=98=BE=E7=A4=BA10?= =?UTF-8?q?=E4=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/kiisoo/ic/customer/entity/CustomerViewCompanyVO.java | 3 --- .../com/kiisoo/ic/customer/entity/CustomerViewShopVO.java | 2 -- .../com/kiisoo/ic/customer/service/CustomerViewService.java | 5 ++++- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/kiisoo/ic/customer/entity/CustomerViewCompanyVO.java b/src/main/java/com/kiisoo/ic/customer/entity/CustomerViewCompanyVO.java index fb6da48..e27f064 100644 --- a/src/main/java/com/kiisoo/ic/customer/entity/CustomerViewCompanyVO.java +++ b/src/main/java/com/kiisoo/ic/customer/entity/CustomerViewCompanyVO.java @@ -12,13 +12,10 @@ import lombok.Data; */ @Data public class CustomerViewCompanyVO { - /**排名*/ - private Integer position; /**零售公司id*/ private Long orgId; /**零售公司名称*/ private String orgName; /**新增好友数*/ private Integer newCustomerCount; - } diff --git a/src/main/java/com/kiisoo/ic/customer/entity/CustomerViewShopVO.java b/src/main/java/com/kiisoo/ic/customer/entity/CustomerViewShopVO.java index ea1bba2..40247ef 100644 --- a/src/main/java/com/kiisoo/ic/customer/entity/CustomerViewShopVO.java +++ b/src/main/java/com/kiisoo/ic/customer/entity/CustomerViewShopVO.java @@ -12,8 +12,6 @@ import lombok.Data; */ @Data public class CustomerViewShopVO { - /**排名*/ - private Integer position; /**店铺id*/ private Long shopId; /**店铺名称*/ 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 641fe91..96ab420 100644 --- a/src/main/java/com/kiisoo/ic/customer/service/CustomerViewService.java +++ b/src/main/java/com/kiisoo/ic/customer/service/CustomerViewService.java @@ -264,7 +264,10 @@ public class CustomerViewService { zeroExtendVO.setZeroShopCount(tmpShopCount - tmpShopIds.size()); tmpZeroExtendList.add(zeroExtendVO); }); - zeroExtendList = tmpZeroExtendList.stream().filter(zeroExtendDO -> zeroExtendDO.getZeroShopCount() > 0).collect(Collectors.toList()); + zeroExtendList = tmpZeroExtendList.stream() + .filter(zeroExtendDO -> zeroExtendDO.getZeroShopCount() > 0) + .sorted(Comparator.comparing(CustomerViewZeroExtendVO::getZeroShopCount).reversed()) + .limit(TEN).collect(Collectors.toList()); return zeroExtendList; }