兼容店铺无商品得逻辑
This commit is contained in:
parent
00f71306b5
commit
6a87e58705
@ -292,6 +292,9 @@ class OrderLogic extends BaseLogic
|
|||||||
'store_id'=>$params['store_id'],
|
'store_id'=>$params['store_id'],
|
||||||
'product_id'=>$v['product_id'],
|
'product_id'=>$v['product_id'],
|
||||||
])->field('id,store_name,stock')->withTrashed()->find();
|
])->field('id,store_name,stock')->withTrashed()->find();
|
||||||
|
if(empty($store)){
|
||||||
|
$store['stock'] =0;
|
||||||
|
}
|
||||||
if($store['stock'] < $v['cart_num']){
|
if($store['stock'] < $v['cart_num']){
|
||||||
//缺失
|
//缺失
|
||||||
$newArr[] = [
|
$newArr[] = [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user