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