소스 검색

[智价云] 品牌方维度清洗更新

tangyuanwang 18 시간 전
부모
커밋
9a24ae4395
2개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 1
      app/Jobs/Manager/Process/LowPriceGoodsDataJobs.php
  2. 2 1
      app/Jobs/Manager/Process/ViolationProductDataJobs.php

+ 2 - 1
app/Jobs/Manager/Process/LowPriceGoodsDataJobs.php

@@ -111,7 +111,8 @@ class LowPriceGoodsDataJobs implements ShouldQueue
 
         $ScrapeDataModel= $ScrapeDataModel->whereRaw('(min_price / NULLIF(number, 0)) < '. floatval($suggested_price));//计算单盒价格
         
-        if ($product_brand) $where[] = ['product_name', 'like', '%' . $product_brand . '%'];
+        // if ($product_brand) $where[] = ['product_name', 'like', '%' . $product_brand . '%'];
+        if ($product_brand) $where[] = ['product_brand', 'like', '%' . $category_name . '%'];
         if (!empty($product_keyword)) {
             foreach ($product_keywords as $key => $keywords) {
                 if (trim($keywords) == '') continue;

+ 2 - 1
app/Jobs/Manager/Process/ViolationProductDataJobs.php

@@ -105,7 +105,8 @@ class ViolationProductDataJobs implements ShouldQueue
         $where[] = ['product_name', 'like', '%' . $product_name . '%'];
         if($enable_full_quantity == 1) $where[] = ['product_specs', 'like', '%' . $product_specs . '%']; //如果不是全量清洗,则查询规格
         
-        if ($product_brand) $where[] = ['product_name', 'like', '%' . $product_brand . '%'];
+        // if ($product_brand) $where[] = ['product_name', 'like', '%' . $product_brand . '%'];
+        if ($product_brand) $where[] = ['product_brand', 'like', '%' . $category_name . '%'];
         if (!empty($product_keyword)) {
             foreach ($product_keywords as $key => $keywords) {
                 if (trim($keywords) == '') continue;