From 457f4881a89c03984c7b46ed10e8919d3294976c Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期一, 08 六月 2020 16:45:29 +0800 Subject: [PATCH] 淘宝好物圈修改 --- fanli/src/main/java/com/yeshi/fanli/service/manger/order/OrderMoneyStatisticManager.java | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/manger/order/OrderMoneyStatisticManager.java b/fanli/src/main/java/com/yeshi/fanli/service/manger/order/OrderMoneyStatisticManager.java index c88b228..a0db55c 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/manger/order/OrderMoneyStatisticManager.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/manger/order/OrderMoneyStatisticManager.java @@ -179,6 +179,14 @@ public void syncDividents(Date minTime, Date maxTime) { List<UserOrderDailyStatisticDTO> list = userOrderDailyStatisticMapper.listDividentsOrderByCreateTime(minTime, maxTime); + + List<UserOrderDailyStatisticDTO> countList = userOrderDailyStatisticMapper + .listDividentsOrderCountByCreateTime(minTime, maxTime); + Map<String, Integer> countMap = new HashMap<>(); + for (UserOrderDailyStatisticDTO dto : countList) { + countMap.put(dto.getDay() + "#" + dto.getUid(), dto.getOrderCount()); + } + if (list != null) for (UserOrderDailyStatisticDTO dto : list) { OrderMoneyDailyCount count = new OrderMoneyDailyCount(); @@ -194,8 +202,17 @@ count.setTeamSubsidyNum(dto.getOrderCount()); } + Integer totalCount = countMap.get(dto.getDay() + "#" + dto.getUid()); + if(totalCount!=null){ + count.setTeamDividentsOrderNum(totalCount); + } + count.setYearMonth( TimeUtil.getGernalTime(TimeUtil.convertToTimeTemp(dto.getDay(), "yyyy-MM-dd"), "yyyy-MM")); + if (dto.getDay().equalsIgnoreCase("2020-05-03") && dto.getUid() == 389677L) { + System.out.println(dto); + } + orderMoneyDailyCountService.saveDailyCount(count); } -- Gitblit v1.8.0