소스 검색

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

tangyuanwang 4 일 전
부모
커밋
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;