fix: 优化售后完成扣减积分问题

This commit is contained in:
misworga831 2023-10-17 17:11:25 +08:00
parent a910a97719
commit 0ebb9c01f8

View File

@ -136,10 +136,13 @@ public class MemberPointExecute implements MemberRegisterEvent, GoodsCommentComp
if (afterSale.getServiceStatus().equals(AfterSaleStatusEnum.COMPLETE.name())) {
//获取积分设置
PointSetting pointSetting = getPointSetting();
if (pointSetting.getConsumer() == 0) {
return;
}
//计算扣除积分数量
Double point = CurrencyUtil.mul(pointSetting.getMoney(), afterSale.getActualRefundPrice(), 0);
Double point = CurrencyUtil.mul(pointSetting.getConsumer(), afterSale.getActualRefundPrice(), 0);
//扣除会员积分
memberService.updateMemberPoint(point.longValue(), PointTypeEnum.REDUCE.name(), afterSale.getMemberId(), "会员退款,回退积分" + point + "");
memberService.updateMemberPoint(point.longValue(), PointTypeEnum.REDUCE.name(), afterSale.getMemberId(), "会员退款,回退消费赠送积分" + point + "");
}
}