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