【功能优化】售后退货退款时首先返还抵扣积分,然后再扣减赠送积分

This commit is contained in:
卢越 2024-08-23 15:23:51 +08:00
parent 96bffc4199
commit 8de0de615f

View File

@ -78,17 +78,15 @@ public class TradeMemberPointOrderHandler implements TradeOrderHandler {
@Override
public void afterCancelOrderItem(TradeOrderDO order, TradeOrderItemDO orderItem) {
// 扣减回滚积分订单赠送
reducePoint(order.getUserId(), orderItem.getGivePoint(), MemberPointBizTypeEnum.ORDER_GIVE_CANCEL_ITEM,
orderItem.getId());
// 增加回滚积分订单抵扣
addPoint(order.getUserId(), orderItem.getUsePoint(), MemberPointBizTypeEnum.ORDER_USE_CANCEL_ITEM,
orderItem.getId());
addPoint(order.getUserId(), orderItem.getUsePoint(), MemberPointBizTypeEnum.ORDER_USE_CANCEL_ITEM, orderItem.getId());
// 扣减回滚积分订单赠送
reducePoint(order.getUserId(), orderItem.getGivePoint(), MemberPointBizTypeEnum.ORDER_GIVE_CANCEL_ITEM, orderItem.getId());
// 扣减回滚用户经验
AfterSaleDO afterSale = afterSaleService.getAfterSale(orderItem.getAfterSaleId());
memberLevelApi.reduceExperience(order.getUserId(), afterSale.getRefundPrice(),
MemberExperienceBizTypeEnum.ORDER_GIVE_CANCEL_ITEM.getType(), String.valueOf(orderItem.getId()));
memberLevelApi.reduceExperience(order.getUserId(), afterSale.getRefundPrice(), MemberExperienceBizTypeEnum.ORDER_GIVE_CANCEL_ITEM.getType(), String.valueOf(orderItem.getId()));
}
/**