From d4f04a18e4ea8112b2a17c2e9d65545d0bd9579f Mon Sep 17 00:00:00 2001 From: xiaohanzi Date: Sat, 10 Oct 2020 16:12:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8B=BC=E5=9B=A2bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/iformall/service/impl/WxOrderGroupServiceImpl.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxOrderGroupServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxOrderGroupServiceImpl.java index 4a0742f37..1cbb0880a 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxOrderGroupServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxOrderGroupServiceImpl.java @@ -84,6 +84,9 @@ public class WxOrderGroupServiceImpl implements WxOrderGroupService { //此处拼团数量应从订单总数查询,支付成功的就算一个,没支付成功的不算. 提高拼团的成功率 int ordercount = wxOrderService.countGroupOrder(order.getOrderGroupId(),true); Integer remainPeople = wxCoupon.getPressLimitNum()-ordercount-1; + if (remainPeople < 0) { + throw new MallinkException(ErrorCode.ORDER_GROUP_COOPERATING_FAILD.getCode(),"参团失败,参团人数已满,将稍后退款."); + } //Integer remainPeople = wxOrderGroup.getRemainPeople()-1; wxOrderGroup.setStatus(remainPeople <= 0 ? EnumOrderStatus.ORDER_STATUS_COOPERATING_COMPLETE.getCode() : wxOrderGroup.getStatus()); wxOrderGroup.setUpdateDate(new Date());