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()); } } }