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