|
|
|
@@ -606,13 +606,13 @@ public class WxOrderServiceImpl implements WxOrderService { |
|
|
|
int unPaidcount = 0; |
|
|
|
// 有价券 |
|
|
|
if (coupon.getSalePrice() > 0) { |
|
|
|
if (!allowUnPayOrder) { |
|
|
|
// 检查是否未支付订单 |
|
|
|
try { |
|
|
|
unPaidcount = getUserOrderCount(user, coupon); |
|
|
|
} catch (Exception e) { |
|
|
|
throw new MallinkException(ErrorCode.DB_FAIL.getCode(),"["+coupon.getTitle()+"]查询未支付订单失败."); |
|
|
|
} |
|
|
|
// 检查是否未支付订单 |
|
|
|
try { |
|
|
|
unPaidcount = getUserOrderCount(user, coupon); |
|
|
|
} catch (Exception e) { |
|
|
|
throw new MallinkException(ErrorCode.DB_FAIL.getCode(),"["+coupon.getTitle()+"]查询未支付订单失败."); |
|
|
|
} |
|
|
|
if (!allowUnPayOrder) { |
|
|
|
if (unPaidcount > 0) { |
|
|
|
logger.error("此券有未支付的订单, couponId: " + couponIdStr + ", count: " + unPaidcount); |
|
|
|
throw new MallinkException(ErrorCode.ORDER_UNPAID.getCode(),"["+coupon.getTitle()+"]您有未支付的订单."); |
|
|
|
|