From ef97c6568f5b0f77bcc2ddb2e6eacd48603e8f58 Mon Sep 17 00:00:00 2001 From: 199901012 Date: Tue, 6 Apr 2021 22:01:33 +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/cweb/controller/HighOrderController.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java b/hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java index ed4ea621..5d8bf049 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java @@ -108,8 +108,11 @@ public class HighOrderController { log.error("HighOrderController --> addOrder() error!", "未找到卡卷信息"); throw ErrorHelp.genException(SysCode.System, ErrorCode.NOT_FOUND_COUPON, ""); } - highOrder.setPayModel(1); // 支付模式:1 金币,2 第三方平台,3 混合 - highOrder.setPayType(3); // 支付方式: 1:支付宝 2:微信 3:金币 + // 支付类型:1.微信支付 2.金币支付 + if(coupon.getPayType() == 2) { + highOrder.setPayModel(1); // 支付模式:1 金币,2 第三方平台,3 混合 + highOrder.setPayType(3); // 支付方式: 1:支付宝 2:微信 3:金币 + } // 是否达到限购数量 if (highCouponService.userBuyLimitNumber(userInfoModel.getHighUser().getId(), coupon.getId()) == true) { log.error("HighOrderController --> addOrder() error!", "已达到限购数量"); @@ -130,7 +133,6 @@ public class HighOrderController { } else { childOrder.setGoodsPrice(coupon.getDiscountPrice()); } - if (highCouponCodeService.getStockCountByCoupon(coupon.getId()) <= 0) { log.error("HighOrderController --> addOrder() error!", "卡卷库存数量不足"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COUPON_STOCK_INSUFFICIENT, "");