Merge pull request 'fix(store_order): 修复 branches 门店商品数据同步问题' (#322) from dev into main

Reviewed-on: #322
This commit is contained in:
mkm 2024-11-11 11:37:20 +08:00
commit 67396de70f

View File

@ -171,7 +171,7 @@ class StoreOrderController extends BaseAdminController
$data = StoreOrderCartInfo::where('oid', $id)->select(); $data = StoreOrderCartInfo::where('oid', $id)->select();
foreach ($data as $key => &$value) { foreach ($data as $key => &$value) {
if (in_array($order['store_id'], [17, 18])) { if (in_array($order['store_id'], [17, 18])) {
$find = StoreBranchProduct::where('product_id', $value->product_id)->where('store_id', $order['store_id'])->find(); $find = StoreBranchProduct::where('product_id', $value->product_id)->where('store_id', $order['store_id'])->withTrashed()->find();
} else { } else {
$find = StoreProduct::where('id', $value->product_id)->find(); $find = StoreProduct::where('id', $value->product_id)->find();
} }