Răsfoiți Sursa

[智价云] 清洗范围优化调整

tangyuanwang 3 zile în urmă
părinte
comite
117b1fcd92

+ 3 - 4
app/Jobs/Manager/Process/LowPriceGoodsDataJobs.php

@@ -89,7 +89,7 @@ class LowPriceGoodsDataJobs implements ShouldQueue
         $executeLog_id = $message_data['executeLog_id'];
         $category_name = $message_data['category_name']; //产品分类名称
         $specify_responsible_person = $message_data['specify_responsible_person']; //指派责任人 0=开启 1=关闭
-        $limit = isset($message_data['limit']) ? $message_data['limit'] : 50;
+        $limit = isset($message_data['limit']) ? $message_data['limit'] : 10;
         $page = isset($message_data['page']) ? $message_data['page'] : 1;
         $company_id = isset($message_data['company_id']) ? $message_data['company_id'] : 0; //品牌方公司ID
         $product_brand = $message_data['product_brand']; //商品品牌名称
@@ -103,15 +103,14 @@ class LowPriceGoodsDataJobs implements ShouldQueue
             $ScrapeDataModel = $ScrapeDataModel->whereIn('platform_id', $platform);
         }
         $ScrapeDataModel = $ScrapeDataModel->where([['min_price', '>=', '0.01'], ['number', '>=', '1']]);
-        $start_time = time() - 60 * 5; // 开始时间 5分钟之前
-        $end_time = time(); //结束时间
+        $start_time =$message_data['start_time'];
+        $end_time = $message_data['end_time'];
         $start_time_string = date('Y-m-d H:i:s', $start_time);
         $end_time_string = date('Y-m-d H:i:s', $end_time);
         $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 . '%']; //如果不是全量清洗,则查询规格
-        // $where[] = ['one_box_price', '<', $suggested_price];
 
         $ScrapeDataModel = $ScrapeDataModel->whereRaw('(min_price / NULLIF(number, 0)) < ' . floatval($suggested_price)); //计算单盒价格
         // if ($product_brand) $where[] = ['product_name', 'like', '%' . $product_brand . '%'];

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

@@ -47,6 +47,8 @@ class LowPriceGoodsJobs implements ShouldQueue
     public function handle()
     {
         try {
+            $start_time = time() - 60 * 5; // 开始时间 5分钟之前
+            $end_time = time(); //结束时间
             $ConfigLowPriceGoodsModel = new ConfigLowPriceGoodsModel();
             $LowPriceGoodsCompanyModel = new LowPriceGoodsCompanyModel();
             $limit = isset($this->message_data['limit']) ? $this->message_data['limit'] : 50;
@@ -102,6 +104,8 @@ class LowPriceGoodsJobs implements ShouldQueue
                     'product_keyword' => $value['product_keyword'],
                     'item_totle_page' => $totle_page,
                     'item_now_page' => $page,
+                    'start_time' => $start_time,
+                    'end_time' => $end_time,
                 ];
                 LowPriceGoodsDataJobs::dispatch($message_data);
                 // LowPriceGoodsDataJobs::dispatchSync($message_data);

+ 3 - 3
app/Jobs/Manager/Process/ViolationCompanyDataJobs.php

@@ -82,14 +82,14 @@ class ViolationCompanyDataJobs implements ShouldQueue
         $executeLog_id = $message_data['executeLog_id'];
         $company_category_name = $message_data['company_category_name']; //公司类别名称
         $specify_responsible_person = $message_data['specify_responsible_person']; //指派责任人 0=开启 1=关闭
-        $limit = isset($message_data['limit']) ? $message_data['limit'] : 50;
+        $limit = isset($message_data['limit']) ? $message_data['limit'] : 10;
         $page = isset($message_data['page']) ? $message_data['page'] : 1;
         $company_id = isset($message_data['company_id']) ? $message_data['company_id'] : 0; //品牌方公司ID
         $item_totle_page = $message_data['item_totle_page']; //清洗店铺总页数
         $item_now_page = $message_data['item_now_page']; //清洗店铺当前页
 
-        $start_time = time() - 60 * 5; // 开始时间 5分钟之前
-        $end_time = time(); //结束时间
+        $start_time =$message_data['start_time'];
+        $end_time = $message_data['end_time'];
         $start_time_string = date('Y-m-d H:i:s', $start_time);
         $end_time_string = date('Y-m-d H:i:s', $end_time);
         $where_map[] = ['insert_time', '>=', $start_time_string];

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

@@ -45,6 +45,8 @@ class ViolationCompanyJobs implements ShouldQueue
     public function handle()
     {
         try {
+            $start_time = time() - 60 * 5; // 开始时间 5分钟之前
+            $end_time = time(); //结束时间
             $ViolationCompanyModel = new ViolationCompanyModel();
             $limit = isset($this->message_data['limit']) ? $this->message_data['limit'] : 50;
             $page = isset($this->message_data['page']) ? $this->message_data['page'] : 1;
@@ -85,6 +87,8 @@ class ViolationCompanyJobs implements ShouldQueue
                     'specify_responsible_person' => $value['specify_responsible_person'],
                     'item_totle_page' => $totle_page,
                     'item_now_page' => $page,
+                    'start_time' => $start_time,
+                    'end_time' => $end_time,
                 ];
                 ViolationCompanyDataJobs::dispatch($message_data);
                 // ViolationCompanyDataJobs::dispatchSync($message_data);

+ 3 - 3
app/Jobs/Manager/Process/ViolationProductDataJobs.php

@@ -87,7 +87,7 @@ class ViolationProductDataJobs implements ShouldQueue
         $executeLog_id = $message_data['executeLog_id'];
         $category_name = $message_data['category_name']; //产品分类名称
         $specify_responsible_person = $message_data['specify_responsible_person']; //指派责任人 0=开启 1=关闭
-        $limit = isset($message_data['limit']) ? $message_data['limit'] : 50;
+        $limit = isset($message_data['limit']) ? $message_data['limit'] : 10;
         $page = isset($message_data['page']) ? $message_data['page'] : 1;
         $company_id = isset($message_data['company_id']) ? $message_data['company_id'] : 0; //品牌方公司ID
         $product_brand = $message_data['product_brand']; //商品品牌名称
@@ -100,8 +100,8 @@ class ViolationProductDataJobs implements ShouldQueue
             $platform = explode(',', $platform);
             $ScrapeDataModel = $ScrapeDataModel->whereIn('platform_id', $platform);
         }
-        $start_time = time() - 60 * 5; // 开始时间 5分钟之前
-        $end_time = time(); //结束时间
+        $start_time =$message_data['start_time'];
+        $end_time = $message_data['end_time'];
         $start_time_string = date('Y-m-d H:i:s', $start_time);
         $end_time_string = date('Y-m-d H:i:s', $end_time);
         $where[] = ['insert_time', '>=', $start_time_string];

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

@@ -46,6 +46,8 @@ class ViolationProductJobs implements ShouldQueue
     public function handle()
     {
         try {
+            $start_time = time() - 60 * 5; // 开始时间 5分钟之前
+            $end_time = time(); //结束时间
             $ConfigViolationProductModel = new ConfigViolationProductModel();
             $ViolationProductCompanyModel = new ViolationProductCompanyModel();
             $limit = isset($this->message_data['limit']) ? $this->message_data['limit'] : 50;
@@ -98,6 +100,8 @@ class ViolationProductJobs implements ShouldQueue
                     'product_keyword' => $value['product_keyword'],
                     'item_totle_page' => $totle_page,
                     'item_now_page' => $page,
+                    'start_time' => $start_time,
+                    'end_time' => $end_time,
                 ];
                 ViolationProductDataJobs::dispatch($message_data);
                 // ViolationProductDataJobs::dispatchSync($message_data);

+ 3 - 3
app/Jobs/Manager/Process/ViolationStoreDataJobs.php

@@ -78,15 +78,15 @@ class ViolationStoreDataJobs implements ShouldQueue
         $executeLog_id = $message_data['executeLog_id'];
         $store_name = $message_data['store_name']; //店铺名称
         $specify_responsible_person = $message_data['specify_responsible_person']; //指派责任人 0=开启 1=关闭
-        $limit = isset($message_data['limit']) ? $message_data['limit'] : 50;
+        $limit = isset($message_data['limit']) ? $message_data['limit'] : 10;
         $page = isset($message_data['page']) ? $message_data['page'] : 1;
         $company_id = isset($message_data['company_id']) ? $message_data['company_id'] : 0; //品牌方公司ID
         $item_totle_page = $message_data['item_totle_page']; //清洗店铺总页数
         $item_now_page = $message_data['item_now_page']; //清洗店铺当前页
         $employee_ids = $message_data['employee_ids']; //指派责任人ID列表
 
-        $start_time = time() - 60 * 5; // 开始时间 5分钟之前
-        $end_time = time();//结束时间
+        $start_time =$message_data['start_time'];
+        $end_time = $message_data['end_time'];
         $start_time_string = date('Y-m-d H:i:s', $start_time);
         $end_time_string = date('Y-m-d H:i:s', $end_time);
         $where_map[] = ['insert_time', '>=', $start_time_string];

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

@@ -45,6 +45,8 @@ class ViolationStoreJobs implements ShouldQueue
     public function handle()
     {
         try {
+            $start_time = time() - 60 * 5; // 开始时间 5分钟之前
+            $end_time = time(); //结束时间
             $ViolationStoreModel = new ViolationStoreModel();
             $limit = isset($this->message_data['limit']) ? $this->message_data['limit'] : 50;
             $page = isset($this->message_data['page']) ? $this->message_data['page'] : 1;
@@ -83,6 +85,8 @@ class ViolationStoreJobs implements ShouldQueue
                     'specify_responsible_person' => $value['specify_responsible_person'],
                     'item_totle_page' => $totle_page,
                     'item_now_page' => $page,
+                    'start_time' => $start_time,
+                    'end_time' => $end_time,
                 ];
                 ViolationStoreDataJobs::dispatch($message_data);
                 // ViolationStoreDataJobs::dispatchSync($message_data);