取消下单数量限制直接为次日预提单子

This commit is contained in:
liu 2024-07-02 15:29:51 +08:00
parent 098b431bed
commit e9ae9ee246

View File

@ -40,13 +40,13 @@ class CartController extends BaseApiController
return $this->fail('购物车商品不能大于100个请先结算');
}
//数量下单判断
$stock = StoreBranchProduct::where(
['product_id'=>$params['product_id'],
'store_id'=>$params['store_id']
])->value('stock')??0;
if ($params['cart_num'] >$stock) {
return $this->fail('库存数量不足');
}
// $stock = StoreBranchProduct::where(
// ['product_id'=>$params['product_id'],
// 'store_id'=>$params['store_id']
// ])->value('stock')??0;
// if ($params['cart_num'] >$stock) {
// return $this->fail('库存数量不足');
// }
if ($result) {
if(isset($params['type']) && $params['type'] == 1){
$res = CartLogic::add($params);