取消下单数量限制直接为次日预提单子
This commit is contained in:
parent
098b431bed
commit
e9ae9ee246
@ -40,13 +40,13 @@ class CartController extends BaseApiController
|
|||||||
return $this->fail('购物车商品不能大于100个,请先结算');
|
return $this->fail('购物车商品不能大于100个,请先结算');
|
||||||
}
|
}
|
||||||
//数量下单判断
|
//数量下单判断
|
||||||
$stock = StoreBranchProduct::where(
|
// $stock = StoreBranchProduct::where(
|
||||||
['product_id'=>$params['product_id'],
|
// ['product_id'=>$params['product_id'],
|
||||||
'store_id'=>$params['store_id']
|
// 'store_id'=>$params['store_id']
|
||||||
])->value('stock')??0;
|
// ])->value('stock')??0;
|
||||||
if ($params['cart_num'] >$stock) {
|
// if ($params['cart_num'] >$stock) {
|
||||||
return $this->fail('库存数量不足');
|
// return $this->fail('库存数量不足');
|
||||||
}
|
// }
|
||||||
if ($result) {
|
if ($result) {
|
||||||
if(isset($params['type']) && $params['type'] == 1){
|
if(isset($params['type']) && $params['type'] == 1){
|
||||||
$res = CartLogic::add($params);
|
$res = CartLogic::add($params);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user