mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-22 23:31:52 +08:00
【功能优化】售后退货退款时首先返还抵扣积分,然后再扣减赠送积分
This commit is contained in:
parent
96bffc4199
commit
8de0de615f
@ -78,17 +78,15 @@ public class TradeMemberPointOrderHandler implements TradeOrderHandler {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void afterCancelOrderItem(TradeOrderDO order, TradeOrderItemDO orderItem) {
|
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,
|
addPoint(order.getUserId(), orderItem.getUsePoint(), MemberPointBizTypeEnum.ORDER_USE_CANCEL_ITEM, orderItem.getId());
|
||||||
orderItem.getId());
|
|
||||||
|
// 扣减(回滚)积分(订单赠送)
|
||||||
|
reducePoint(order.getUserId(), orderItem.getGivePoint(), MemberPointBizTypeEnum.ORDER_GIVE_CANCEL_ITEM, orderItem.getId());
|
||||||
|
|
||||||
// 扣减(回滚)用户经验
|
// 扣减(回滚)用户经验
|
||||||
AfterSaleDO afterSale = afterSaleService.getAfterSale(orderItem.getAfterSaleId());
|
AfterSaleDO afterSale = afterSaleService.getAfterSale(orderItem.getAfterSaleId());
|
||||||
memberLevelApi.reduceExperience(order.getUserId(), afterSale.getRefundPrice(),
|
memberLevelApi.reduceExperience(order.getUserId(), afterSale.getRefundPrice(), MemberExperienceBizTypeEnum.ORDER_GIVE_CANCEL_ITEM.getType(), String.valueOf(orderItem.getId()));
|
||||||
MemberExperienceBizTypeEnum.ORDER_GIVE_CANCEL_ITEM.getType(), String.valueOf(orderItem.getId()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user