|
|
|
@@ -2196,24 +2196,27 @@ public class WxOrderServiceImpl implements WxOrderService { |
|
|
|
private void creditPay(WxCUserBasicInfo user, WxCoupon coupon) { |
|
|
|
//-------此处为【积分支付】记录增加积分操作------- |
|
|
|
WxCreditHistory creditHistory = new WxCreditHistory(); |
|
|
|
//记录操作人类型 操作人id |
|
|
|
if (user.getOperatorType() == EnumUserType.MALLUSER.getCode()) { |
|
|
|
creditHistory.setOperatorType(EnumUserType.MALLUSER.getCode()); |
|
|
|
creditHistory.setOperatorId(user.getOperatorId()); |
|
|
|
} else { |
|
|
|
creditHistory.setOperatorType(EnumUserType.CUSERBASIC.getCode()); |
|
|
|
creditHistory.setOperatorId(user.getId()); |
|
|
|
} |
|
|
|
creditHistory.setCreditNum(coupon.getCreditPrice()); |
|
|
|
creditHistory.setCUserId(user.getId()); |
|
|
|
// creditHistory.updateTenantInfo(coupon); |
|
|
|
creditHistory.setTenantId(coupon.getFinalTenantId()); |
|
|
|
creditHistory.setFinalTenantId(coupon.getFinalTenantId()); |
|
|
|
creditHistory.setCreditType(EnumScoreType.CHANGE_CREDIT.getCode()); |
|
|
|
creditHistory.setChangePurpose(EnumScoreType.CHANGE_CREDIT.getMessage()+"["+coupon.getTitle()+"]"); |
|
|
|
|
|
|
|
creditHistory.setCouponId(coupon.getId()); |
|
|
|
//如果券与商户一对一 则直接将消费商户更新为此商户 若一对多 则消费商户显示多商户 |
|
|
|
setMerchantId(coupon, creditHistory); |
|
|
|
//记录操作人类型 操作人id |
|
|
|
if (user.getOperatorType() == EnumUserType.MALLUSER.getCode()) { |
|
|
|
creditHistory.setOperatorType(EnumUserType.MALLUSER.getCode()); |
|
|
|
creditHistory.setOperatorId(user.getOperatorId()); |
|
|
|
creditHistory.setChangePurpose("管理端积分兑换"+"["+coupon.getTitle()+"]"); |
|
|
|
} else { |
|
|
|
creditHistory.setOperatorType(EnumUserType.CUSERBASIC.getCode()); |
|
|
|
creditHistory.setOperatorId(user.getId()); |
|
|
|
creditHistory.setChangePurpose("积分兑换"+"["+coupon.getTitle()+"]"); |
|
|
|
} |
|
|
|
|
|
|
|
wxCreditHistoryService.saveOrUpdate(creditHistory); |
|
|
|
} |
|
|
|
|
|
|
|
|