|
|
|
@@ -3487,6 +3487,22 @@ public class WxOrderServiceImpl implements WxOrderService { |
|
|
|
if(order.getCreditPrice() == null || order.getCreditPrice() == 0){ |
|
|
|
return; |
|
|
|
} |
|
|
|
WxCoupon coupon = null; |
|
|
|
try { |
|
|
|
coupon = wxCouponMapper.selectById(order.getProductId(),order.getTenantId()); |
|
|
|
} catch (Exception e) { |
|
|
|
logger.error("券未找到, e:" + e.getMessage()); |
|
|
|
throw new MallinkException(ErrorCode.COUPON_IS_EMPTY); |
|
|
|
} |
|
|
|
if (coupon == null) { |
|
|
|
logger.error("券未找到, " + order.getProductId()); |
|
|
|
throw new MallinkException(ErrorCode.COUPON_IS_EMPTY); |
|
|
|
} |
|
|
|
//积分券不退还积分 |
|
|
|
if(coupon.checkIsCreditCoupon()){ |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
//-------此处为【积分支付】退款记录增加积分操作------- |
|
|
|
WxCreditHistory creditHistory = new WxCreditHistory(); |
|
|
|
creditHistory.setCreditNum(order.getCreditPrice()); |
|
|
|
@@ -3496,6 +3512,7 @@ public class WxOrderServiceImpl implements WxOrderService { |
|
|
|
creditHistory.setFinalTenantId(order.getFinalTenantId()); |
|
|
|
creditHistory.setCreditType(EnumScoreType.REFUND_REDUCE_CREDIT.getCode()); |
|
|
|
|
|
|
|
creditHistory.setCouponId(coupon.getId()); |
|
|
|
//记录操作人类型 操作人id |
|
|
|
creditHistory.setOperatorType(EnumUserType.CUSERBASIC.getCode()); |
|
|
|
creditHistory.setOperatorId(order.getCUserId()); |
|
|
|
|