注释分类减少数量
This commit is contained in:
parent
54844d161e
commit
3c9c20e0f4
@ -254,10 +254,10 @@ class OrderLogic extends BaseLogic
|
|||||||
$goods_list[$k]['uid'] = $uid;
|
$goods_list[$k]['uid'] = $uid;
|
||||||
$goods_list[$k]['cart_id'] = implode(',', $cartId);
|
$goods_list[$k]['cart_id'] = implode(',', $cartId);
|
||||||
$goods_list[$k]['delivery_id'] = $params['store_id']; //商家id
|
$goods_list[$k]['delivery_id'] = $params['store_id']; //商家id
|
||||||
$StoreBranchProduct = StoreBranchProduct::where('id', $v['branch_product_id'])->withTrashed()->find();
|
// $StoreBranchProduct = StoreBranchProduct::where('id', $v['branch_product_id'])->withTrashed()->find();
|
||||||
if ($StoreBranchProduct['stock'] - $v['cart_num'] <= 0) {
|
// if ($StoreBranchProduct['stock'] - $v['cart_num'] <= 0) {
|
||||||
Db::name('store_product_cate')->where(['cate_id' => $StoreBranchProduct['cate_id'], 'store_id' => $params['store_id']])->update(['count' => 0]);
|
// Db::name('store_product_cate')->where(['cate_id' => $StoreBranchProduct['cate_id'], 'store_id' => $params['store_id']])->update(['count' => 0]);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
(new StoreOrderCartInfo())->saveAll($goods_list);
|
(new StoreOrderCartInfo())->saveAll($goods_list);
|
||||||
$where = ['is_pay' => 0];
|
$where = ['is_pay' => 0];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user