修复导入错误

This commit is contained in:
mkm 2023-11-29 11:51:00 +08:00
parent b0e628e143
commit 8a0a839066
2 changed files with 4 additions and 5 deletions

View File

@ -2718,7 +2718,7 @@ class StoreOrderRepository extends BaseRepository
} }
} }
} catch (Exception $e) { } catch (Exception $e) {
$datas['product_id'] = $product_id; $datas['product_id'] = $product_id??0;
$datas['mer_id'] = $merId; $datas['mer_id'] = $merId;
$datas['store_name'] = $datum['value']['store_name']; $datas['store_name'] = $datum['value']['store_name'];
$datas['content'] = $e->getMessage().'line:'.$e->getLine(); $datas['content'] = $e->getMessage().'line:'.$e->getLine();

View File

@ -166,12 +166,11 @@ class ProductLibrary extends BaseController
throw new \think\exception\ValidateException('添加失败'); throw new \think\exception\ValidateException('添加失败');
} }
} else { } else {
Log::error('一维码商品采集错误:' . $result['data']['remark']);
Log::error('商品采集错误:' . $result['message']); throw new \think\exception\ValidateException('一维码商品采集错误:'. $result['data']['remark']);
throw new \think\exception\ValidateException($result['message']);
} }
} catch (\Exception $e) { } catch (\Exception $e) {
throw new \think\exception\ValidateException($e->getMessage()); throw new \think\exception\ValidateException('一维码商品采集错误:'.$e->getMessage());
} }
} }
} }