From 0308dc80697fb46a502a700746fcc074b560a636 Mon Sep 17 00:00:00 2001 From: wyj2080 <1603068044@qq.com> Date: Tue, 28 Apr 2020 21:22:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E6=97=B6=E9=97=B4=E8=BE=93?= =?UTF-8?q?=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../customer/service/CustomerViewService.java | 19 ------------------- 1 file changed, 19 deletions(-) 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 0348dfe..719adc3 100644 --- a/src/main/java/com/kiisoo/ic/customer/service/CustomerViewService.java +++ b/src/main/java/com/kiisoo/ic/customer/service/CustomerViewService.java @@ -96,36 +96,23 @@ public class CustomerViewService { */ public CustomerViewVO selectCustomerViewMain(Long userId, String selectStartTime, String selectEndTime, String startTime, String endTime){ CustomerViewVO customerViewVO = new CustomerViewVO(); - Date s1 = new Date(); //shopIds List shopIds = getShopIds(userId); if(CollectionUtils.isEmpty(shopIds)){ return customerViewVO; } - Date s2 = new Date(); - System.out.println("耗时shopIds:" + (s2.getTime()-s1.getTime())); //柱状图好友list List customerList = opCustomerDOMapper.selectCustomerList(shopIds, null, null, startTime, endTime); - Date s3 = new Date(); - System.out.println("customerList:" + (s3.getTime()-s2.getTime())); //好友总数 Long customerCount = opCustomerDOMapper.selectCustomerCount(shopIds, null, null, null); - Date s33 = new Date(); - System.out.println("好友总数:" + (s33.getTime()-s3.getTime())); //好友总数(去重) Long validCustomerCount = opCustomerDOMapper.selectCustomerCount(shopIds, VALID, null, null); - Date s44 = new Date(); - System.out.println("好友总数去重:" + (s44.getTime()-s33.getTime())); //删除拉黑数 Long validDeleteCustomerCount = poiCustomerContactDataStatMapper.selectDeleteCustomer(shopIds).stream() .filter(contactDO -> contactDO.getNegativeFeedbackCnt() != null) .map(PoiCustomerContactDataStat::getNegativeFeedbackCnt).mapToLong(a -> a).sum(); - Date s55 = new Date(); - System.out.println("好友总数去重:" + (s55.getTime()-s44.getTime())); //会员总数 Long vipCount = opVipDOMapper.selectVipCount(shopIds, null, null); - Date s4 = new Date(); - System.out.println("会员总数:" + (s4.getTime()-s55.getTime())); //设置柱状图list List validCustomerList = customerList.stream().filter(customerDO -> VALID.equals(customerDO.getValidType())).collect(Collectors.toList()); @@ -136,14 +123,8 @@ public class CustomerViewService { //前十名排行list等 List newCustimerList = customerList.stream().filter(customerDO -> filterCustomerByRegisterTime(customerDO, selectStartTime, selectEndTime)).collect(Collectors.toList()); List orgNewCustomerList = getOrgNewCustomerList(newCustimerList); - Date s5 = new Date(); - System.out.println("公司:" + (s5.getTime()-s4.getTime())); List shopNewCustomerList = getShopNewCustomerList(newCustimerList); - Date s6 = new Date(); - System.out.println("店铺:" + (s6.getTime()-s5.getTime())); List zeroExtendList = getZeroExtendList(newCustimerList, shopIds); - Date s7 = new Date(); - System.out.println("零推广:" + (s7.getTime()-s6.getTime())); customerViewVO.setOrgNewCustomerList(orgNewCustomerList); customerViewVO.setShopNewCustomerList(shopNewCustomerList); customerViewVO.setZeroExtendList(zeroExtendList);