diff --git a/src/main/java/com/kiisoo/ic/customer/entity/CustomerViewVO.java b/src/main/java/com/kiisoo/ic/customer/entity/CustomerViewVO.java index c5ba9ea..acde79d 100644 --- a/src/main/java/com/kiisoo/ic/customer/entity/CustomerViewVO.java +++ b/src/main/java/com/kiisoo/ic/customer/entity/CustomerViewVO.java @@ -28,9 +28,9 @@ public class CustomerViewVO { private Long allVipCount; /**好友list*/ - List customerList; + List customerList; /**好友(去重)list*/ - List validCustomerList; + List validCustomerList; /**零售公司新增top10*/ List orgNewCustomerList; diff --git a/src/main/java/com/kiisoo/ic/customer/entity/OpCustomerSimpleVO.java b/src/main/java/com/kiisoo/ic/customer/entity/OpCustomerSimpleVO.java new file mode 100644 index 0000000..3faaec4 --- /dev/null +++ b/src/main/java/com/kiisoo/ic/customer/entity/OpCustomerSimpleVO.java @@ -0,0 +1,31 @@ +package com.kiisoo.ic.customer.entity; + +import lombok.Data; + +import java.util.Date; + +/** + * @Description: 客户表简单VO + * @Author: wangyinjia + * @Date: 2020-04-28 + */ +@Data +public class OpCustomerSimpleVO { + /** + * 主键ID + */ + private Long id; + + /** + * 注册时间 + */ + private Date registerTime; + + /** + * 初始化 + */ + public OpCustomerSimpleVO(Long id, Date registerTime){ + this.id = id; + this.registerTime = registerTime; + } +} 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 719adc3..09ccf20 100644 --- a/src/main/java/com/kiisoo/ic/customer/service/CustomerViewService.java +++ b/src/main/java/com/kiisoo/ic/customer/service/CustomerViewService.java @@ -116,8 +116,10 @@ public class CustomerViewService { //设置柱状图list List validCustomerList = customerList.stream().filter(customerDO -> VALID.equals(customerDO.getValidType())).collect(Collectors.toList()); - customerViewVO.setCustomerList(customerList); - customerViewVO.setValidCustomerList(validCustomerList); + List simpleCustomerList = customerList.stream().map(customer -> new OpCustomerSimpleVO(customer.getId(), customer.getRegisterTime())).collect(Collectors.toList()); + List simpleValidCustomerList = customerList.stream().filter(customerDO -> VALID.equals(customerDO.getValidType())).map(customer -> new OpCustomerSimpleVO(customer.getId(), customer.getRegisterTime())).collect(Collectors.toList()); + customerViewVO.setCustomerList(simpleCustomerList); + customerViewVO.setValidCustomerList(simpleValidCustomerList); //设置新增好友,好友总数,拉黑数,vip人数,柱状图list等数据 setCustomerViewData(customerViewVO, customerCount, validCustomerCount, validDeleteCustomerCount, vipCount, customerList, validCustomerList, selectStartTime, selectEndTime); //前十名排行list等