This commit is contained in:
mkm 2024-07-09 15:20:05 +08:00
parent 5835271186
commit 06ff803ea5

View File

@ -84,12 +84,12 @@ class OrderLogic extends BaseLogic
$off_activity = Config::where('name', 'off_activity')->value('value');
$field = 'id branch_product_id,store_name,image,unit,price,vip_price,cost,purchase,product_id';
foreach ($cart_select as $k => $v) {
$find = StoreBranchProduct::where(['product_id' => $v['product_id'], 'store_id' => $params['store_id']])->field($field)->withTrashed()->find();
$find = StoreBranchProduct::where(['product_id' => $v['product_id'], 'store_id' => $params['store_id']])->field($field)->find();
if (!$find) {
// unset($cart_select[$k]);
// continue;
$field = 'id branch_product_id,store_name,image,unit,price,vip_price,cost,purchase, id product_id';
$find = StoreProduct::where(['id' => $v['product_id']])->field($field)->withTrashed()->find();
$find = StoreProduct::where(['id' => $v['product_id']])->field($field)->find();
$cart_select[$k]['status'] = 1; //缺货标识
}
unset($cart_select[$k]['id']);