|
|
|
@@ -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()); |
|
|
|
|