Преглед на файлове

[智价云] 全量清洗功能补充

tangyuanwang преди 14 часа
родител
ревизия
e90f4cc275

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

@@ -75,6 +75,7 @@ class LowPriceGoodsDataJobs implements ShouldQueue
         $platform = $message_data['platform']; //多个平台配置
         $product_name = $message_data['product_name']; //商品名称
         $product_specs = $message_data['product_specs']; //商品规格
+        $enable_full_quantity = $message_data['enable_full_quantity']; //是否启用全量采集0=是 1=否
         $suggested_price = $message_data['suggested_price']; //监控价格格
         $store_scope = $message_data['store_scope']; //店铺范围1=全部店铺2=指定店铺
         $company_scope = $message_data['company_scope']; //公司范围1=全部公司2=指定公司
@@ -105,7 +106,7 @@ class LowPriceGoodsDataJobs implements ShouldQueue
         $where[] = ['scrape_date', '>=', $yesterdayStart];
         $where[] = ['scrape_date', '<=', $yesterdayEnd];
         $where[] = ['product_name', 'like', '%' . $product_name . '%'];
-        $where[] = ['product_specs', 'like', '%' . $product_specs . '%'];
+        if($enable_full_quantity == 1) $where[] = ['product_specs', 'like', '%' . $product_specs . '%']; //如果不是全量清洗,则查询规格
         // $where[] = ['one_box_price', '<', $suggested_price];
 
         $ScrapeDataModel= $ScrapeDataModel->whereRaw('(min_price / NULLIF(number, 0)) < '. floatval($suggested_price));//计算单盒价格

+ 1 - 0
app/Jobs/Manager/Process/LowPriceGoodsJobs.php

@@ -84,6 +84,7 @@ class LowPriceGoodsJobs implements ShouldQueue
                     'id' => $value['id'],
                     'platform' => $value['platform'],  
                     'product_name' => $value['product_name'],
+                    'enable_full_quantity' => $value['enable_full_quantity'],
                     'product_specs' => $value['product_specs'],
                     'suggested_price' => $value['suggested_price'],
                     'store_scope' => $value['store_scope'],

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

@@ -74,6 +74,7 @@ class ViolationProductDataJobs implements ShouldQueue
         $EmployeeAreaModel = new EmployeeAreaModel();
         $platform = $message_data['platform']; //多个平台配置
         $product_name = $message_data['product_name']; //商品名称
+        $enable_full_quantity = $message_data['enable_full_quantity']; //是否启用全量采集0=是 1=否
         $product_specs = $message_data['product_specs']; //商品规格
         $store_scope = $message_data['store_scope']; //店铺范围1=全部店铺2=指定店铺
         $company_scope = $message_data['company_scope']; //公司范围1=全部公司2=指定公司
@@ -102,7 +103,7 @@ class ViolationProductDataJobs implements ShouldQueue
         $where[] = ['scrape_date', '>=', $yesterdayStart];
         $where[] = ['scrape_date', '<=', $yesterdayEnd];
         $where[] = ['product_name', 'like', '%' . $product_name . '%'];
-        $where[] = ['product_specs', 'like', '%' . $product_specs . '%'];
+        if($enable_full_quantity == 1) $where[] = ['product_specs', 'like', '%' . $product_specs . '%']; //如果不是全量清洗,则查询规格
         
         if ($product_brand) $where[] = ['product_name', 'like', '%' . $product_brand . '%'];
         if (!empty($product_keyword)) {

+ 1 - 0
app/Jobs/Manager/Process/ViolationProductJobs.php

@@ -82,6 +82,7 @@ class ViolationProductJobs implements ShouldQueue
                     'id' => $value['id'],
                     'platform' => $value['platform'],
                     'product_name' => $value['product_name'],
+                    'enable_full_quantity' => $value['enable_full_quantity'],
                     'product_specs' => $value['product_specs'],
                     'store_scope' => $value['store_scope'],
                     'company_scope' => $value['company_scope'],