From 762cceae6b60948dab846f7792dd83bfb3829c5e Mon Sep 17 00:00:00 2001 From: xiaohanzi Date: Sat, 9 Oct 2021 14:15:13 +0800 Subject: [PATCH] fix bug --- .../iformall/service/impl/WxOrderServiceImpl.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java index f04280d29..e7208cc5d 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxOrderServiceImpl.java @@ -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()+"]您有未支付的订单.");