|
|
|
@ -108,8 +108,11 @@ public class HighOrderController { |
|
|
|
|
log.error("HighOrderController --> addOrder() error!", "未找到卡卷信息"); |
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.NOT_FOUND_COUPON, ""); |
|
|
|
|
} |
|
|
|
|
// 支付类型: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, ""); |
|
|
|
|