去除繁重数据

master
wyj2080 6 years ago
parent 0308dc8069
commit 93b6c5de78

@ -28,9 +28,9 @@ public class CustomerViewVO {
private Long allVipCount; private Long allVipCount;
/**好友list*/ /**好友list*/
List<OpCustomer> customerList; List<OpCustomerSimpleVO> customerList;
/**好友(去重)list*/ /**好友(去重)list*/
List<OpCustomer> validCustomerList; List<OpCustomerSimpleVO> validCustomerList;
/**零售公司新增top10*/ /**零售公司新增top10*/
List<CustomerViewCompanyVO> orgNewCustomerList; List<CustomerViewCompanyVO> orgNewCustomerList;

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

@ -116,8 +116,10 @@ public class CustomerViewService {
//设置柱状图list //设置柱状图list
List<OpCustomer> validCustomerList = customerList.stream().filter(customerDO -> VALID.equals(customerDO.getValidType())).collect(Collectors.toList()); List<OpCustomer> validCustomerList = customerList.stream().filter(customerDO -> VALID.equals(customerDO.getValidType())).collect(Collectors.toList());
customerViewVO.setCustomerList(customerList); List<OpCustomerSimpleVO> simpleCustomerList = customerList.stream().map(customer -> new OpCustomerSimpleVO(customer.getId(), customer.getRegisterTime())).collect(Collectors.toList());
customerViewVO.setValidCustomerList(validCustomerList); List<OpCustomerSimpleVO> 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等数据 //设置新增好友好友总数拉黑数vip人数柱状图list等数据
setCustomerViewData(customerViewVO, customerCount, validCustomerCount, validDeleteCustomerCount, vipCount, customerList, validCustomerList, selectStartTime, selectEndTime); setCustomerViewData(customerViewVO, customerCount, validCustomerCount, validDeleteCustomerCount, vipCount, customerList, validCustomerList, selectStartTime, selectEndTime);
//前十名排行list等 //前十名排行list等

Loading…
Cancel
Save