From cf36751ddc729a89df5baa678475d40a3bcfae83 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Wed, 22 Sep 2021 15:44:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4diam?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hai/service/pay/impl/GoodsOrderServiceImpl.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/hai-service/src/main/java/com/hai/service/pay/impl/GoodsOrderServiceImpl.java b/hai-service/src/main/java/com/hai/service/pay/impl/GoodsOrderServiceImpl.java index ca7476b7..fe80585a 100644 --- a/hai-service/src/main/java/com/hai/service/pay/impl/GoodsOrderServiceImpl.java +++ b/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 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());