瀏覽代碼

[智价云] 多账号采集数据校验更新

tangyuanwang 3 天之前
父節點
當前提交
de9e36a61a
共有 2 個文件被更改,包括 2 次插入0 次删除
  1. 1 0
      app/Models/Manager/Process/LowPriceGoods.php
  2. 1 0
      app/Models/Manager/Process/ViolationProduct.php

+ 1 - 0
app/Models/Manager/Process/LowPriceGoods.php

@@ -123,6 +123,7 @@ class LowPriceGoods extends Model
             $source_where[] = ['product_brand', '=', $data['product_brand']]; //品牌名称
             $source_where[] = ['product_name', '=', $data['product_name']]; //商品名称
             $source_where[] = ['product_specs', '=', $data['product_specs']]; //规格
+            $source_where[] = ['scrape_date', '=', $data['scrape_date']]; //采集日期
             $source_id_log = $this->where($source_where)->select(['id', 'online_posting_price'])->first();
             if (!empty($source_id_log)) {
                 if ($source_id_log->online_posting_price > $data['online_posting_price']) {

+ 1 - 0
app/Models/Manager/Process/ViolationProduct.php

@@ -117,6 +117,7 @@ class ViolationProduct extends Model
             $source_where[] = ['product_brand', '=', $data['product_brand']]; //品牌名称
             $source_where[] = ['product_name', '=', $data['product_name']]; //商品名称
             $source_where[] = ['product_specs', '=', $data['product_specs']]; //规格
+            $source_where[] = ['scrape_date', '=', $data['scrape_date']]; //采集日期
             $source_id_log = $this->where($source_where)->count();
             if ($source_id_log > 0) {
                 return true;