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; }