|
@@ -399,13 +399,14 @@ public class AfterSaleServiceImpl implements AfterSaleService {
|
|
|
Long payIntegral = tradeOrderItemDO.getPayIntegral();//支付积分
|
|
|
|
|
|
//记录退还积分
|
|
|
- TradeOrderItemDO toid = new TradeOrderItemDO();
|
|
|
- toid.setId(tradeOrderItemDO.getId());
|
|
|
- toid.setRefundIntegral(payIntegral);
|
|
|
- tradeOrderItemMapper.updateById(toid);
|
|
|
- //退回退款订单项,购物者支付的积分
|
|
|
- integralService.updateUserIntegral(orderUserId, CaclEnum.ORDER_REFUND_INTEGRAL, payIntegral,0l,tradeOrderId,tradeOrderNum);
|
|
|
-
|
|
|
+ if(payIntegral>0) {
|
|
|
+ TradeOrderItemDO toid = new TradeOrderItemDO();
|
|
|
+ toid.setId(tradeOrderItemDO.getId());
|
|
|
+ toid.setRefundIntegral(payIntegral);
|
|
|
+ tradeOrderItemMapper.updateById(toid);
|
|
|
+ //退回退款订单项,购物者支付的积分
|
|
|
+ integralService.updateUserIntegral(orderUserId, CaclEnum.ORDER_REFUND_INTEGRAL, payIntegral, 0l, tradeOrderId, tradeOrderNum);
|
|
|
+ }
|
|
|
|
|
|
//2. 减少退货物品对应的冻结积分
|
|
|
Long increaseIntegral = tradeOrderItemDO.getIncreaseIntegral();//消费者自得冻结积分
|