From 8a0a839066efb8290e57c505d85adbffb7c1b784 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Wed, 29 Nov 2023 11:51:00 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=AF=BC=E5=85=A5=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../repositories/store/order/StoreOrderRepository.php | 2 +- app/controller/admin/ProductLibrary.php | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/common/repositories/store/order/StoreOrderRepository.php b/app/common/repositories/store/order/StoreOrderRepository.php index d7c80b77..fb700460 100644 --- a/app/common/repositories/store/order/StoreOrderRepository.php +++ b/app/common/repositories/store/order/StoreOrderRepository.php @@ -2718,7 +2718,7 @@ class StoreOrderRepository extends BaseRepository } } } catch (Exception $e) { - $datas['product_id'] = $product_id; + $datas['product_id'] = $product_id??0; $datas['mer_id'] = $merId; $datas['store_name'] = $datum['value']['store_name']; $datas['content'] = $e->getMessage().'line:'.$e->getLine(); diff --git a/app/controller/admin/ProductLibrary.php b/app/controller/admin/ProductLibrary.php index 52c9bac6..32ffa8db 100644 --- a/app/controller/admin/ProductLibrary.php +++ b/app/controller/admin/ProductLibrary.php @@ -166,12 +166,11 @@ class ProductLibrary extends BaseController throw new \think\exception\ValidateException('添加失败'); } } else { - - Log::error('商品采集错误:' . $result['message']); - throw new \think\exception\ValidateException($result['message']); + Log::error('一维码商品采集错误:' . $result['data']['remark']); + throw new \think\exception\ValidateException('一维码商品采集错误:'. $result['data']['remark']); } } catch (\Exception $e) { - throw new \think\exception\ValidateException($e->getMessage()); + throw new \think\exception\ValidateException('一维码商品采集错误:'.$e->getMessage()); } } }