瀏覽代碼

[智价云] 清洗更新

tangyuanwang 2 天之前
父節點
當前提交
006b8de42c

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

@@ -105,8 +105,7 @@ class LowPriceGoodsDataJobs implements ShouldQueue
         $where[] = ['insert_time', '>=', $start_time_string];
         $where[] = ['insert_time', '<=', $end_time_string];
         $where[] = ['product_name', 'like', '%' . $product_name . '%'];
-        if ($enable_full_quantity == 1) $where[] = ['product_specs', 'like', '%' . $product_specs . '%']; //如果不是全量清洗,则查询规格
-        if ($product_brand) $where[] = ['product_brand', 'like', '%' . $category_name . '%'];
+        if ($product_brand) $where[] = ['product_brand', 'like', '%' . $product_brand . '%'];
 
         $ScrapeDataModel = $ScrapeDataModel
             ->orWhere(function ($q) use ($where, $enable_full_quantity, $product_specs, $product_keywords, $company_scope, $social_credit_code, $suggested_price, $platform) {

+ 4 - 2
app/Jobs/Manager/Process/LowPriceGoodsJobs.php

@@ -14,6 +14,7 @@ use App\Models\Manager\Process\ExecuteLog as ExecuteLogModel;
 use App\Jobs\Manager\Process\LowPriceGoodsDataJobs;
 use App\Models\Manager\WashConfig\ViolationStore as ViolationStoreModel;
 use App\Models\Manager\WashConfig\LowPriceGoodsCompany as LowPriceGoodsCompanyModel;
+use Illuminate\Support\Carbon;
 
 /**
  * 数据清洗-低价挂网商品配置队列
@@ -47,6 +48,7 @@ class LowPriceGoodsJobs implements ShouldQueue
     public function handle()
     {
         try {
+            // $start_time = Carbon::today()->startOfDay()->getTimestamp(); // 今天开始时间 00:00:00
             $start_time = time() - 60 * 5; // 开始时间 5分钟之前
             $end_time = time(); //结束时间
             $ConfigLowPriceGoodsModel = new ConfigLowPriceGoodsModel();
@@ -107,8 +109,8 @@ class LowPriceGoodsJobs implements ShouldQueue
                     'start_time' => $start_time,
                     'end_time' => $end_time,
                 ];
-                LowPriceGoodsDataJobs::dispatch($message_data);
-                // LowPriceGoodsDataJobs::dispatchSync($message_data);
+                // LowPriceGoodsDataJobs::dispatch($message_data);
+                LowPriceGoodsDataJobs::dispatchSync($message_data);
             }
             $now_message_data = [
                 'limit' => $limit,

+ 2 - 0
app/Jobs/Manager/Process/ViolationCompanyJobs.php

@@ -12,6 +12,7 @@ use App\Facades\Servers\Logs\Log;
 use App\Models\Manager\WashConfig\ViolationCompany as ViolationCompanyModel;
 use App\Models\Manager\Process\ExecuteLog as ExecuteLogModel;
 use App\Jobs\Manager\Process\ViolationCompanyDataJobs;
+use Illuminate\Support\Carbon;
 
 /**
  * 数据清洗-违规挂网公司配置队列
@@ -45,6 +46,7 @@ class ViolationCompanyJobs implements ShouldQueue
     public function handle()
     {
         try {
+            // $start_time = Carbon::today()->startOfDay()->getTimestamp(); // 今天开始时间 00:00:00
             $start_time = time() - 60 * 5; // 开始时间 5分钟之前
             $end_time = time(); //结束时间
             $ViolationCompanyModel = new ViolationCompanyModel();

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

@@ -103,8 +103,7 @@ class ViolationProductDataJobs implements ShouldQueue
         $where[] = ['insert_time', '>=', $start_time_string];
         $where[] = ['insert_time', '<=', $end_time_string];
         $where[] = ['product_name', 'like', '%' . $product_name . '%'];
-        if ($enable_full_quantity == 1) $where[] = ['product_specs', 'like', '%' . $product_specs . '%']; //如果不是全量清洗,则查询规格
-        if ($product_brand) $where[] = ['product_brand', 'like', '%' . $category_name . '%'];
+        if ($product_brand) $where[] = ['product_brand', 'like', '%' . $product_brand . '%'];
 
         $ScrapeDataModel = $ScrapeDataModel
             ->orWhere(function ($q) use ($where, $enable_full_quantity, $product_specs, $product_keywords, $company_scope, $social_credit_code, $platform) {

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

@@ -13,6 +13,7 @@ use App\Models\Manager\WashConfig\ViolationProduct as ConfigViolationProductMode
 use App\Models\Manager\Process\ExecuteLog as ExecuteLogModel;
 use App\Jobs\Manager\Process\ViolationProductDataJobs;
 use App\Models\Manager\WashConfig\ViolationProductCompany as ViolationProductCompanyModel;
+use Illuminate\Support\Carbon;
 
 /**
  * 数据清洗-违规挂网商品队列
@@ -46,6 +47,7 @@ class ViolationProductJobs implements ShouldQueue
     public function handle()
     {
         try {
+            // $start_time = Carbon::today()->startOfDay()->getTimestamp(); // 今天开始时间 00:00:00
             $start_time = time() - 60 * 5; // 开始时间 5分钟之前
             $end_time = time(); //结束时间
             $ConfigViolationProductModel = new ConfigViolationProductModel();

+ 2 - 0
app/Jobs/Manager/Process/ViolationStoreJobs.php

@@ -12,6 +12,7 @@ use App\Facades\Servers\Logs\Log;
 use App\Models\Manager\WashConfig\ViolationStore as ViolationStoreModel;
 use App\Models\Manager\Process\ExecuteLog as ExecuteLogModel;
 use App\Jobs\Manager\Process\ViolationStoreDataJobs;
+use Illuminate\Support\Carbon;
 
 /**
  * 数据清洗-违规挂网店铺配置队列
@@ -45,6 +46,7 @@ class ViolationStoreJobs implements ShouldQueue
     public function handle()
     {
         try {
+            // $start_time = Carbon::today()->startOfDay()->getTimestamp(); // 今天开始时间 00:00:00
             $start_time = time() - 60 * 5; // 开始时间 5分钟之前
             $end_time = time(); //结束时间
             $ViolationStoreModel = new ViolationStoreModel();