From 5adf7c37182e813dc620c4c161b2d8482f302de7 Mon Sep 17 00:00:00 2001 From: yuanye <418471657@qq.com> Date: Fri, 18 Oct 2024 14:29:39 +0800 Subject: [PATCH] Merge branch 'master' of http://gitea.dctpay.com/hurui/youtao --- .../hfkj/service/partner/Impl/PartnerServiceImpl.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/service/src/main/java/com/hfkj/service/partner/Impl/PartnerServiceImpl.java b/service/src/main/java/com/hfkj/service/partner/Impl/PartnerServiceImpl.java index e906554..6bdf853 100644 --- a/service/src/main/java/com/hfkj/service/partner/Impl/PartnerServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/partner/Impl/PartnerServiceImpl.java @@ -421,7 +421,18 @@ public class PartnerServiceImpl implements PartnerService { Map params = new HashMap<>(); params.put("startTime", startTime); params.put("endTime", endTime); + params.put("type", 1); List userRecords = bsPartnerUserRecordService.queryAllList(params); + + Map> collect = userRecords.stream().collect(Collectors.groupingBy(BsPartnerUserRecord::getLevel)); + List countRecords = collect.keySet().stream().map(key -> { + JSONObject goodObject = new JSONObject(true); + goodObject.put("level",key); + List pres = collect.get(key); + goodObject.put("dividendCount", pres.size()); + goodObject.put("dividendGoldCoin", pres.stream().map(BsPartnerUserRecord::getGoldCoin).reduce(BigDecimal.ZERO, BigDecimal::add)); + return goodObject; + }).collect(Collectors.toList()); return null; }