From b960b9aba92d61b9d356bdfb763c69a03bcacf11 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Mon, 11 Nov 2024 11:36:59 +0800 Subject: [PATCH] =?UTF-8?q?fix(store=5Forder):=20=E4=BF=AE=E5=A4=8D=20bran?= =?UTF-8?q?ches=20=E9=97=A8=E5=BA=97=E5=95=86=E5=93=81=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=90=8C=E6=AD=A5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 StoreOrderController 中,增加了对软删除商品的查询 - 修复了当商品被软删除后,branches 门店同步数据时无法找到商品的问题 --- app/admin/controller/store_order/StoreOrderController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/admin/controller/store_order/StoreOrderController.php b/app/admin/controller/store_order/StoreOrderController.php index 399aed21c..56889932e 100644 --- a/app/admin/controller/store_order/StoreOrderController.php +++ b/app/admin/controller/store_order/StoreOrderController.php @@ -171,7 +171,7 @@ class StoreOrderController extends BaseAdminController $data = StoreOrderCartInfo::where('oid', $id)->select(); foreach ($data as $key => &$value) { 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 { $find = StoreProduct::where('id', $value->product_id)->find(); }