From f52b0fe58226e62f7a7d62631f83786dd8cf86b8 Mon Sep 17 00:00:00 2001 From: lqmac Date: Sat, 30 Mar 2024 21:41:38 +0800 Subject: [PATCH] 111 --- app/job/service/goods/AdminImport.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/job/service/goods/AdminImport.php b/app/job/service/goods/AdminImport.php index d7eca1cb..f3503cae 100644 --- a/app/job/service/goods/AdminImport.php +++ b/app/job/service/goods/AdminImport.php @@ -103,7 +103,12 @@ class AdminImport extends BaseService { $service = new \app\job\service\goods\Collector(); foreach ($list as $item) { - + //sku存在了就不抓取了 + $info = GoodsModel::where('goods_no', $item['C'])->where('store_id', $storeId)->where('is_delete',0)->find(); + if ($info) { + $this->successCount++; + continue; + } $data = $this->createData($item, $storeId); $service->single($item['D'], $data, $storeId); // 记录导入成功