|
|
@ -421,7 +421,18 @@ public class PartnerServiceImpl implements PartnerService { |
|
|
|
Map<String, Object> params = new HashMap<>(); |
|
|
|
Map<String, Object> params = new HashMap<>(); |
|
|
|
params.put("startTime", startTime); |
|
|
|
params.put("startTime", startTime); |
|
|
|
params.put("endTime", endTime); |
|
|
|
params.put("endTime", endTime); |
|
|
|
|
|
|
|
params.put("type", 1); |
|
|
|
List<BsPartnerUserRecord> userRecords = bsPartnerUserRecordService.queryAllList(params); |
|
|
|
List<BsPartnerUserRecord> userRecords = bsPartnerUserRecordService.queryAllList(params); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Map<Integer, List<BsPartnerUserRecord>> collect = userRecords.stream().collect(Collectors.groupingBy(BsPartnerUserRecord::getLevel)); |
|
|
|
|
|
|
|
List<JSONObject> countRecords = collect.keySet().stream().map(key -> { |
|
|
|
|
|
|
|
JSONObject goodObject = new JSONObject(true); |
|
|
|
|
|
|
|
goodObject.put("level",key); |
|
|
|
|
|
|
|
List<BsPartnerUserRecord> 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; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|