|
@@ -2,17 +2,17 @@ package cn.newfeifan.mall.module.distri.service.consumptionerrorlog;
|
|
|
|
|
|
import cn.newfeifan.mall.module.distri.controller.admin.consumptionerroruser.vo.ConsumptionErrorUserSaveReqVO;
|
|
|
import cn.newfeifan.mall.module.distri.dal.dataobject.applicationforwithdrawal.ApplicationForWithdrawalDO;
|
|
|
-import cn.newfeifan.mall.module.distri.dal.dataobject.consumptionchangelog.ConsumptionChangeLogDO;
|
|
|
-import cn.newfeifan.mall.module.distri.dal.dataobject.consumptiontopuplog.ConsumptionTopUpLogDO;
|
|
|
-import cn.newfeifan.mall.module.distri.dal.dataobject.consumptiontransferlog.ConsumptionTransferLogDO;
|
|
|
+import cn.newfeifan.mall.module.distri.dal.dataobject.integralchangelog.IntegralChangeLogDO;
|
|
|
+import cn.newfeifan.mall.module.distri.dal.dataobject.integraltopuplog.IntegralTopUpLogDO;
|
|
|
+import cn.newfeifan.mall.module.distri.dal.dataobject.integraltransferlog.IntegralTransferLogDO;
|
|
|
import cn.newfeifan.mall.module.distri.dal.dataobject.integral.IntegralDO;
|
|
|
import cn.newfeifan.mall.module.distri.dal.dataobject.usertopupconsumptionpointsorder.UserTopUpConsumptionPointsOrderDO;
|
|
|
-import cn.newfeifan.mall.module.distri.enums.ConsumptionEnum;
|
|
|
+import cn.newfeifan.mall.module.distri.enums.IntegralEnum;
|
|
|
import cn.newfeifan.mall.module.distri.service.applicationforwithdrawal.ApplicationForWithdrawalService;
|
|
|
-import cn.newfeifan.mall.module.distri.service.consumptionchangelog.ConsumptionChangeLogService;
|
|
|
+import cn.newfeifan.mall.module.distri.service.integralchangelog.IntegralChangeLogService;
|
|
|
import cn.newfeifan.mall.module.distri.service.consumptionerroruser.ConsumptionErrorUserService;
|
|
|
-import cn.newfeifan.mall.module.distri.service.consumptiontopuplog.ConsumptionTopUpLogService;
|
|
|
-import cn.newfeifan.mall.module.distri.service.consumptiontransferlog.ConsumptionTransferLogService;
|
|
|
+import cn.newfeifan.mall.module.distri.service.integraltopuplog.IntegralTopUpLogService;
|
|
|
+import cn.newfeifan.mall.module.distri.service.integraltransferlog.IntegralTransferLogService;
|
|
|
import cn.newfeifan.mall.module.distri.service.integral.IntegralService;
|
|
|
import cn.newfeifan.mall.module.distri.service.usertopupconsumptionpointsorder.UserTopUpConsumptionPointsOrderService;
|
|
|
import cn.newfeifan.mall.module.member.dal.dataobject.user.MemberUserDO;
|
|
@@ -58,11 +58,11 @@ public class ConsumptionErrorLogServiceImpl implements ConsumptionErrorLogServic
|
|
|
@Resource
|
|
|
private ConsumptionErrorUserService consumptionErrorUserService;
|
|
|
@Resource
|
|
|
- private ConsumptionTopUpLogService consumptionTopUpLogService;
|
|
|
+ private IntegralTopUpLogService integralTopUpLogService;
|
|
|
@Resource
|
|
|
- private ConsumptionChangeLogService consumptionChangeLogService;
|
|
|
+ private IntegralChangeLogService integralChangeLogService;
|
|
|
@Resource
|
|
|
- private ConsumptionTransferLogService consumptionTransferLogService;
|
|
|
+ private IntegralTransferLogService integralTransferLogService;
|
|
|
@Resource
|
|
|
private ApplicationForWithdrawalService applicationForWithdrawalService;
|
|
|
@Resource
|
|
@@ -125,30 +125,30 @@ public class ConsumptionErrorLogServiceImpl implements ConsumptionErrorLogServic
|
|
|
List<IntegralDO> integralDOS = integralService.selectAllUser();
|
|
|
|
|
|
|
|
|
- Map<Long, Long> topUpLogMap = consumptionTopUpLogService.selectList().stream()
|
|
|
+ Map<Long, Long> topUpLogMap = integralTopUpLogService.selectList().stream()
|
|
|
.collect(Collectors.groupingBy(
|
|
|
- ConsumptionTopUpLogDO::getUserId,
|
|
|
+ IntegralTopUpLogDO::getUserId,
|
|
|
Collectors.reducing(0L,
|
|
|
- ConsumptionTopUpLogDO::getPracticalConsumptionPoints,
|
|
|
+ IntegralTopUpLogDO::getPracticalIntegralPoints,
|
|
|
Long::sum
|
|
|
)
|
|
|
));
|
|
|
|
|
|
|
|
|
- Map<Long, Long> changLogMap = consumptionChangeLogService.selectListByStatus(ConsumptionEnum.COMMISSION_TRANSITION.getType()).stream()
|
|
|
- .collect(Collectors.groupingBy(
|
|
|
- ConsumptionChangeLogDO::getUserId,
|
|
|
- Collectors.reducing(0L,
|
|
|
- ConsumptionChangeLogDO::getConsumptionPoints,
|
|
|
- Long::sum
|
|
|
- )
|
|
|
- ));
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
- Map<Long, Long> recipientLogMap = consumptionTransferLogService.selectList().stream()
|
|
|
+ Map<Long, Long> recipientLogMap = integralTransferLogService.selectList().stream()
|
|
|
.collect(Collectors.groupingBy(
|
|
|
- ConsumptionTransferLogDO::getRecipientUserId,
|
|
|
+ IntegralTransferLogDO::getRecipientUserId,
|
|
|
Collectors.reducing(0L,
|
|
|
- ConsumptionTransferLogDO::getRecipientPoints,
|
|
|
+ IntegralTransferLogDO::getRecipientPoints,
|
|
|
Long::sum
|
|
|
)
|
|
|
));
|
|
@@ -181,7 +181,7 @@ public class ConsumptionErrorLogServiceImpl implements ConsumptionErrorLogServic
|
|
|
|
|
|
|
|
|
topUpLogMap.forEach((userId, topUpPoints) -> userTotalMap.merge(userId, topUpPoints, Long::sum));
|
|
|
- changLogMap.forEach((userId, topUpPoints) -> userTotalMap.merge(userId, topUpPoints, Long::sum));
|
|
|
+
|
|
|
recipientLogMap.forEach((userId, topUpPoints) -> userTotalMap.merge(userId, topUpPoints, Long::sum));
|
|
|
withdrawalMap.forEach((userId, topUpPoints) -> userTotalMap.merge(userId, topUpPoints, Long::sum));
|
|
|
topUpMap.forEach((userId, topUpPoints) -> userTotalMap.merge(userId, topUpPoints, Long::sum));
|
|
@@ -190,24 +190,24 @@ public class ConsumptionErrorLogServiceImpl implements ConsumptionErrorLogServic
|
|
|
Map<Long, Long> currentMap = integralDOS.stream()
|
|
|
.collect(Collectors.toMap(
|
|
|
IntegralDO::getUserId,
|
|
|
- IntegralDO::getConsumptionPoints)
|
|
|
+ IntegralDO::getRedCurrentQuota)
|
|
|
);
|
|
|
|
|
|
|
|
|
- Map<Long, Long> uesdMap = consumptionChangeLogService.selectListByStatus(ConsumptionEnum.PAY_ORDER.getType()).stream()
|
|
|
+ Map<Long, Long> uesdMap = integralChangeLogService.selectListByStatus(IntegralEnum.PAY_ORDER.getType()).stream()
|
|
|
.collect(Collectors.groupingBy(
|
|
|
- ConsumptionChangeLogDO::getUserId,
|
|
|
+ IntegralChangeLogDO::getUserId,
|
|
|
Collectors.reducing(0L,
|
|
|
- ConsumptionChangeLogDO::getConsumptionPoints,
|
|
|
+ IntegralChangeLogDO::getIntegralPoints,
|
|
|
Long::sum
|
|
|
)
|
|
|
));
|
|
|
|
|
|
- Map<Long, Long> refundMap = consumptionChangeLogService.selectListByStatus(ConsumptionEnum.REFUND_ORDER.getType()).stream()
|
|
|
+ Map<Long, Long> refundMap = integralChangeLogService.selectListByStatus(IntegralEnum.REFUND_ORDER.getType()).stream()
|
|
|
.collect(Collectors.groupingBy(
|
|
|
- ConsumptionChangeLogDO::getUserId,
|
|
|
+ IntegralChangeLogDO::getUserId,
|
|
|
Collectors.reducing(0L,
|
|
|
- ConsumptionChangeLogDO::getConsumptionPoints,
|
|
|
+ IntegralChangeLogDO::getIntegralPoints,
|
|
|
Long::sum
|
|
|
)
|
|
|
));
|
|
@@ -215,20 +215,20 @@ public class ConsumptionErrorLogServiceImpl implements ConsumptionErrorLogServic
|
|
|
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()
|
|
|
+ Map<Long, Long> cancelMap = integralChangeLogService.selectListByStatus(IntegralEnum.CANCEL_ORDER_BACK_CONSUMPTION_POINTS.getType()).stream()
|
|
|
.collect(Collectors.groupingBy(
|
|
|
- ConsumptionChangeLogDO::getUserId,
|
|
|
+ IntegralChangeLogDO::getUserId,
|
|
|
Collectors.reducing(0L,
|
|
|
- ConsumptionChangeLogDO::getConsumptionPoints,
|
|
|
+ IntegralChangeLogDO::getIntegralPoints,
|
|
|
Long::sum
|
|
|
)
|
|
|
));
|
|
|
|
|
|
- Map<Long, Long> orderOverTimeMap = consumptionChangeLogService.selectListByStatus(ConsumptionEnum.ORDER_CANCEL_BY_SYSTEM_REFUND_INTEGRAL.getType()).stream()
|
|
|
+ Map<Long, Long> orderOverTimeMap = integralChangeLogService.selectListByStatus(IntegralEnum.ORDER_CANCEL_BY_SYSTEM_REFUND_INTEGRAL.getType()).stream()
|
|
|
.collect(Collectors.groupingBy(
|
|
|
- ConsumptionChangeLogDO::getUserId,
|
|
|
+ IntegralChangeLogDO::getUserId,
|
|
|
Collectors.reducing(0L,
|
|
|
- ConsumptionChangeLogDO::getConsumptionPoints,
|
|
|
+ IntegralChangeLogDO::getIntegralPoints,
|
|
|
Long::sum
|
|
|
)
|
|
|
));
|
|
@@ -236,11 +236,11 @@ public class ConsumptionErrorLogServiceImpl implements ConsumptionErrorLogServic
|
|
|
orderOverTimeMap.forEach((k, v) -> uesdMap.put(k, uesdMap.get(k) - v));
|
|
|
|
|
|
|
|
|
- Map<Long, Long> transferLogMap = consumptionTransferLogService.selectList().stream()
|
|
|
+ Map<Long, Long> transferLogMap = integralTransferLogService.selectList().stream()
|
|
|
.collect(Collectors.groupingBy(
|
|
|
- ConsumptionTransferLogDO::getTransferUserId,
|
|
|
+ IntegralTransferLogDO::getTransferUserId,
|
|
|
Collectors.reducing(0L,
|
|
|
- ConsumptionTransferLogDO::getConsumptionPoints,
|
|
|
+ IntegralTransferLogDO::getConsumptionPoints,
|
|
|
Long::sum
|
|
|
)
|
|
|
));
|