|
@@ -187,7 +187,17 @@ public class ConsumptionErrorLogServiceImpl implements ConsumptionErrorLogServic
|
|
|
Long::sum // 累加函数
|
|
|
)
|
|
|
));
|
|
|
+ // 扣除退款退回的
|
|
|
+ Map<Long, Long> refundMap = consumptionChangeLogService.selectListByStatus(ConsumptionEnum.REFUND_ORDER.getType()).stream()
|
|
|
+ .collect(Collectors.groupingBy(
|
|
|
+ ConsumptionChangeLogDO::getUserId, // 按userid分组
|
|
|
+ Collectors.reducing(0L, // 初始化累加器
|
|
|
+ ConsumptionChangeLogDO::getConsumptionPoints, // 获取每个对象的consumptionPoints
|
|
|
+ Long::sum // 累加函数
|
|
|
+ )
|
|
|
+ ));
|
|
|
uesdMap.forEach((k, v) -> uesdMap.put(k, v * -1));
|
|
|
+ refundMap.forEach((k, v) -> uesdMap.put(k, uesdMap.get(k) - v));
|
|
|
|
|
|
// 用户转让的消费分(出账)
|
|
|
Map<Long, Long> transferLogMap = consumptionTransferLogService.selectList().stream()
|