Commit 1bc90b50 by chongli

修复后台占座的人独占一组的问题

parent cfa6150e
......@@ -484,22 +484,17 @@ public class EventActivityOrderService extends
if (intTotalInventory == null) {
throw new OrderException(-4, "没有找到对应的库存");
}
// 最多能分组的数量
int totalGroupNum = intTotalInventory / 4;
if (totalGroupNum * 4 < intTotalInventory) {
totalGroupNum++;
}
while (groupNum <= totalGroupNum) {
int existCustomerNum = eventCustomerInfoDao.queryCustomerNumInSameGroup(groupNum,
int existCustomerNum = eventCustomerInfoDao.queryCustomerNumInSameGroup(groupNum,
resourceId, priceDate);
while(existCustomerNum + customerInfoSize > 4){
groupNum++;
existCustomerNum = eventCustomerInfoDao.queryCustomerNumInSameGroup(groupNum,
resourceId, priceDate);
if (existCustomerNum + customerInfoSize <= 4) {
return groupNum;
} else {
groupNum++;
}
}
return groupNum;
}
return 0;
}
private int calculateValidGroupNumForRealTimeTeeTime(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment