mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 18:33:27 +08:00
【优化】优化下单前进行秒杀、团购、拼团的条件判定,防止出现超量下单的情况。
This commit is contained in:
@@ -78,7 +78,7 @@ namespace CoreCms.Net.Services
|
||||
var checkOrder = orderServices.FindLimitOrder(orderItem.productId, order.userId, promotionsModel.startTime, promotionsModel.endTime, orderType);
|
||||
if (promotionsModel.maxGoodsNums > 0)
|
||||
{
|
||||
if (checkOrder.TotalOrders + 1 > promotionsModel.maxGoodsNums)
|
||||
if (checkOrder.TotalOrders >= promotionsModel.maxGoodsNums)
|
||||
{
|
||||
jm.data = 15610;
|
||||
jm.msg = GlobalErrorCodeVars.Code15610;
|
||||
@@ -87,7 +87,7 @@ namespace CoreCms.Net.Services
|
||||
}
|
||||
if (promotionsModel.maxNums > 0)
|
||||
{
|
||||
if (checkOrder.TotalUserOrders > promotionsModel.maxNums)
|
||||
if (checkOrder.TotalUserOrders >= promotionsModel.maxNums)
|
||||
{
|
||||
jm.data = 15611;
|
||||
jm.msg = GlobalErrorCodeVars.Code15611;
|
||||
|
||||
Reference in New Issue
Block a user