|
@@ -77,6 +77,8 @@ public class ConsumptionTransferLogServiceImpl implements ConsumptionTransferLog
|
|
|
IntegralDO transferIntegral = integralService.selectByUser(createReqVO.getTransferUserId());
|
|
|
transferIntegral.setConsumptionPoints(transferIntegral.getConsumptionPoints() - createReqVO.getConsumptionPoints());
|
|
|
integralService.updateIntegral(BeanUtils.toBean(transferIntegral, IntegralSaveReqVO.class));
|
|
|
+ // 接收人钱包
|
|
|
+ IntegralDO recipientIntegral = integralService.selectByUser(createReqVO.getRecipientUserId());
|
|
|
|
|
|
// 记录变动日志
|
|
|
consumptionChangeLogService.createConsumptionChangeLog(
|
|
@@ -85,12 +87,10 @@ public class ConsumptionTransferLogServiceImpl implements ConsumptionTransferLog
|
|
|
.consumptionPoints(-createReqVO.getConsumptionPoints())
|
|
|
.afterConsumptionPoints(transferIntegral.getConsumptionPoints())
|
|
|
.consumptionStatus(ConsumptionEnum.CONSUMPTION_TRANSFER.getType())
|
|
|
- .generateUserId(transferIntegral.getUserId())
|
|
|
+ .generateUserId(recipientIntegral.getUserId())
|
|
|
.build()
|
|
|
);
|
|
|
|
|
|
- // 接收人钱包
|
|
|
- IntegralDO recipientIntegral = integralService.selectByUser(createReqVO.getRecipientUserId());
|
|
|
recipientIntegral.setConsumptionPoints(recipientIntegral.getConsumptionPoints() + createReqVO.getConsumptionPoints());
|
|
|
integralService.updateIntegral(BeanUtils.toBean(recipientIntegral, IntegralSaveReqVO.class));
|
|
|
|