From 7d85b760efb63912f0a64317366c29da3bc0f247 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Mon, 27 May 2024 10:57:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/hfkj/service/order/OrderCreateService.java | 3 +-- .../java/com/hfkj/service/order/OrderPaySuccessService.java | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/service/src/main/java/com/hfkj/service/order/OrderCreateService.java b/service/src/main/java/com/hfkj/service/order/OrderCreateService.java index b8398d9..b59ef3d 100644 --- a/service/src/main/java/com/hfkj/service/order/OrderCreateService.java +++ b/service/src/main/java/com/hfkj/service/order/OrderCreateService.java @@ -125,7 +125,7 @@ public class OrderCreateService { orderCoupon.setStatus(OrderChildStatusEnum.status1.getCode()); orderCouponService.editData(orderCoupon); - for (int i = 0; i <= orderCoupon.getGoodsCount(); i++) { + for (int i = 0; i < orderCoupon.getGoodsCount(); i++) { // 卡券订单卡密 BsOrderCouponNo orderCouponNo = new BsOrderCouponNo(); orderCouponNo.setCouponOrderId(orderCoupon.getId()); @@ -239,5 +239,4 @@ public class OrderCreateService { return orderChild; } - } diff --git a/service/src/main/java/com/hfkj/service/order/OrderPaySuccessService.java b/service/src/main/java/com/hfkj/service/order/OrderPaySuccessService.java index 0dee65e..b551cd5 100644 --- a/service/src/main/java/com/hfkj/service/order/OrderPaySuccessService.java +++ b/service/src/main/java/com/hfkj/service/order/OrderPaySuccessService.java @@ -117,10 +117,10 @@ public class OrderPaySuccessService { } else if (vpd.getSource() == GoodsVpdSourceEnum.type5.getCode()) { // 预发码 - JSONObject preSendCoupon = ChongQingCNPCCouponService.preSendCoupon(orderCoupon.getGoodsVpdKey(), orderCoupon.getOrderNo(), 1, orderCoupon.getUserPhone()); + JSONObject preSendCoupon = ChongQingCNPCCouponService.preSendCoupon(orderCoupon.getGoodsVpdKey(), couponNo.getOrderNo(), 1, orderCoupon.getUserPhone()); if (preSendCoupon.getInteger("status").equals(1)) { // 给用户发码 - JSONObject response = ChongQingCNPCCouponService.sendCNPCTicket(orderCoupon.getGoodsVpdKey(), orderCoupon.getOrderNo(), 1, orderCoupon.getUserPhone()); + JSONObject response = ChongQingCNPCCouponService.sendCNPCTicket(orderCoupon.getGoodsVpdKey(), couponNo.getOrderNo(), 1, orderCoupon.getUserPhone()); JSONObject couponDetail = response.getJSONObject("ticketDetail"); JSONArray codeList = response.getJSONArray("codeList"); for (Object data : codeList) { @@ -146,7 +146,7 @@ public class OrderPaySuccessService { } else if (vpd.getSource() == GoodsVpdSourceEnum.type10.getCode()) { // 发放卡券 - JSONObject jsonObject = PcytCNPCCouponConfig.getCoupon(orderCoupon.getOrderNo() , orderCoupon.getUserPhone() , orderCoupon.getGoodsVpdKey()); + JSONObject jsonObject = PcytCNPCCouponConfig.getCoupon(couponNo.getOrderNo() , orderCoupon.getUserPhone() , orderCoupon.getGoodsVpdKey()); if (!jsonObject.getString("code").equals("200")) { throw ErrorHelp.genException(SysCode.System , ErrorCode.COMMON_ERROR , jsonObject.getString("errMsg")); }