dev-discount
胡锐 3 years ago
parent cd237d7dd4
commit cf36751ddc
  1. 10
      hai-service/src/main/java/com/hai/service/pay/impl/GoodsOrderServiceImpl.java

@ -113,10 +113,6 @@ public class GoodsOrderServiceImpl implements PayService {
// 商品类型 商品类型 1:卡卷 2:金币充值
if (highChildOrder.getGoodsType() == 1) {
highChildOrder.setChildOrdeStatus(2); // 子订单状态:1 待支付 2 已支付 3.已完成 4. 已退款 5.已取消
HighCouponCode code = highCouponCodeService.getCouponCodeByOrderId(highChildOrder.getId());
code.setStatus(2); // 状态:1.待销售 2.未使用 3.已使用 99.预支付
code.setReceiveTime(new Date());
highCouponCodeService.updateCouponCode(code);
HighCoupon coupon = highCouponService.getCouponById(highChildOrder.getGoodsId());
// 贵州中石化
@ -127,8 +123,6 @@ public class GoodsOrderServiceImpl implements PayService {
log.error("HighCouponController -> insertCoupon() error!","获取token失败");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "获取token失败");
}
Map<String,Object> push = new HashMap<>();
push.put("token", tokenObject.getString("data"));
push.put("couTypeCode", coupon.getCouponKey());
@ -177,6 +171,10 @@ public class GoodsOrderServiceImpl implements PayService {
highGasOrderPushMapper.insert(highGasOrderPush);
} else {
HighCouponCode code = highCouponCodeService.getCouponCodeByOrderId(highChildOrder.getId());
code.setStatus(2); // 状态:1.待销售 2.未使用 3.已使用 99.预支付
code.setReceiveTime(new Date());
highCouponCodeService.updateCouponCode(code);
// 卡卷关联用户
HighUserCoupon highUserCoupon = new HighUserCoupon();
highUserCoupon.setMerchantId(code.getMerchantId());

Loading…
Cancel
Save