!309 fix & improve

Merge pull request !309 from OceansDeep/pg
This commit is contained in:
OceansDeep 2023-10-17 09:13:33 +00:00 committed by Gitee
commit ed20d1abbb
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

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 + "");
}
}