mirror of
https://github.com/CoreUnion/CoreShop.git
synced 2026-10-17 05:12:39 +08:00
修复下单更改库存并发超买问题
修复多商品合并下单,其中一商品库存不足,导致整个下单失败 修复下单更改库存失败,订单状态依然待支付。
This commit is contained in:
@@ -803,7 +803,7 @@ namespace CoreCms.Net.Repository
|
||||
//更新记录。
|
||||
bl = DbClient.Updateable<CoreCmsProducts>()
|
||||
.SetColumns(it => it.freezeStock == it.freezeStock + num)
|
||||
.Where(p => p.id == productModel.id && insertNum >= num).ExecuteCommandHasChange();
|
||||
.Where(p => p.id == productModel.id && insertNum >= num && p.freezeStock < p.stock).ExecuteCommandHasChange();
|
||||
break;
|
||||
case "send": //发货
|
||||
bl = DbClient.Updateable<CoreCmsProducts>()
|
||||
|
||||
Reference in New Issue
Block a user