From 10e2ca5d06a92ae8e2b4b14e043b07f5c13a5ff3 Mon Sep 17 00:00:00 2001 From: luofei <604446095@qq.com> Date: Thu, 6 Jul 2023 11:28:59 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E8=AF=95=E5=95=86=E5=93=81=E5=BA=93?= =?UTF-8?q?=E5=AD=98=E5=85=A5=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/common/repositories/store/product/ProductRepository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/common/repositories/store/product/ProductRepository.php b/app/common/repositories/store/product/ProductRepository.php index df860e75..d8dc8b82 100644 --- a/app/common/repositories/store/product/ProductRepository.php +++ b/app/common/repositories/store/product/ProductRepository.php @@ -2333,7 +2333,7 @@ class ProductRepository extends BaseRepository if (!$model->save($data)) { throw new \Exception('入库失败'); } - if (!$orderProduct->save(['is_imported' => 1])) { + if (isset($orderProduct) && !$orderProduct->save(['is_imported' => 1])) { throw new \Exception('订单商品更新出错'); } }