提交代码

master
胡锐 5 months ago committed by yuanye
parent 9cf5d08b5b
commit 7d85b760ef
  1. 3
      service/src/main/java/com/hfkj/service/order/OrderCreateService.java
  2. 6
      service/src/main/java/com/hfkj/service/order/OrderPaySuccessService.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;
}
}

@ -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"));
}

Loading…
Cancel
Save