mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2026-05-06 23:27:20 +08:00
【修复】修复秒杀和团购的后台配置了个人限购数量,但是没有生效,前端还是可以购买超过限购数量的商品的问题。
This commit is contained in:
@@ -246,7 +246,7 @@ namespace CoreCms.Net.Services
|
|||||||
await _dal.DeleteAsync(p => typeIds.Contains(p.type) && p.productId == products.id && p.userId == userId);
|
await _dal.DeleteAsync(p => typeIds.Contains(p.type) && p.productId == products.id && p.userId == userId);
|
||||||
catInfo = null;
|
catInfo = null;
|
||||||
|
|
||||||
var checkOrder = orderServices.FindLimitOrder(products.id, userId, promotionsModel.startTime, promotionsModel.endTime, cartTypes);
|
var checkOrder = orderServices.FindLimitOrderByGoodId(products.goodsId, userId, promotionsModel.startTime, promotionsModel.endTime, cartTypes);
|
||||||
if (promotionsModel.maxGoodsNums > 0)
|
if (promotionsModel.maxGoodsNums > 0)
|
||||||
{
|
{
|
||||||
if (checkOrder.TotalOrders + nums > promotionsModel.maxGoodsNums)
|
if (checkOrder.TotalOrders + nums > promotionsModel.maxGoodsNums)
|
||||||
@@ -258,9 +258,9 @@ namespace CoreCms.Net.Services
|
|||||||
}
|
}
|
||||||
if (promotionsModel.maxNums > 0)
|
if (promotionsModel.maxNums > 0)
|
||||||
{
|
{
|
||||||
if (checkOrder.TotalUserOrders > promotionsModel.maxNums)
|
if (checkOrder.TotalUserOrders + nums > promotionsModel.maxNums)
|
||||||
{
|
{
|
||||||
jm.data = 15611;
|
jm.data = 15611;;
|
||||||
jm.msg = GlobalErrorCodeVars.Code15611;
|
jm.msg = GlobalErrorCodeVars.Code15611;
|
||||||
return jm;
|
return jm;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user