Преглед изворни кода

[智价云] 增加清洗数据产品分类信息记录

tangyuanwang пре 17 часа
родитељ
комит
1375bac79f

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

@@ -72,6 +72,7 @@ class LowPriceGoodsDataJobs implements ShouldQueue
         $company_scope = $message_data['company_scope']; //公司范围1=全部公司2=指定公司
         $social_credit_code = $message_data['social_credit_code']; //社会信用代码
         $executeLog_id = $message_data['executeLog_id'];
+        $category_name = $message_data['category_name']; //产品分类名称
         $limit = isset($message_data['limit']) ? $message_data['limit'] : 50;
         $page = isset($message_data['page']) ? $message_data['page'] : 1;
        
@@ -112,6 +113,7 @@ class LowPriceGoodsDataJobs implements ShouldQueue
                 'city_id' => $product_data['city_id'],
                 'city_name' => $product_data['city_name'],
                 'area_info' => $product_data['area_info'],
+                'category_name' => $category_name
             ];
             //获取公司绑定责任人信息
             $company_data = $ViolationStoreModel->where('social_credit_code',$product_data['qualification_number'])->first();

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

@@ -54,7 +54,11 @@ class LowPriceGoodsJobs implements ShouldQueue
                 $insert_data = ['name' => '低价挂网商品', 'code' => 'LowPriceGoodsJobs', 'admin_id' => $admin_id];
                 $executeLog_id = $ExecuteLogModel->addExecuteLog_content($insert_data);
             }
-            $list_config_data = $ConfigLowPriceGoodsModel->where('status', 0)->paginate($limit, ['*'], 'page', $page)->toarray();
+            $list_config_data = $ConfigLowPriceGoodsModel->leftjoin('washconfig_product_category', 'washconfig_product_category.id', '=', 'washconfig_lowprice_product.category_id')
+                ->where('washconfig_lowprice_product.status', 0)
+                ->select(['washconfig_lowprice_product.*', 'washconfig_product_category.name as category_name'])
+                ->paginate($limit, ['*'], 'page', $page)->toarray();
+              
             if (!$list_config_data || empty($list_config_data['data'])) {
                 return true;
             }
@@ -75,6 +79,7 @@ class LowPriceGoodsJobs implements ShouldQueue
                     'company_scope' => $value['company_scope'],
                     'social_credit_code' => $social_credit_code,
                     'executeLog_id' => $executeLog_id,
+                    'category_name' => $value['category_name'] ? $value['category_name']:''
                 ];
                 LowPriceGoodsDataJobs::dispatch($message_data);
                 // LowPriceGoodsDataJobs::dispatchSync($message_data);

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

@@ -71,6 +71,7 @@ class ViolationProductDataJobs implements ShouldQueue
         $company_scope = $message_data['company_scope']; //公司范围1=全部公司2=指定公司
         $social_credit_code = $message_data['social_credit_code']; //社会信用代码
         $executeLog_id = $message_data['executeLog_id'];
+        $category_name = $message_data['category_name']; //产品分类名称
         $limit = isset($message_data['limit']) ? $message_data['limit'] : 50;
         $page = isset($message_data['page']) ? $message_data['page'] : 1;
 
@@ -108,6 +109,7 @@ class ViolationProductDataJobs implements ShouldQueue
                 'city_id' => $product_data['city_id'],
                 'city_name' => $product_data['city_name'],
                 'area_info' => $product_data['area_info'],
+                'category_name' => $category_name
             ];
             //获取公司绑定责任人信息
             $company_data = $ViolationStoreModel->where('social_credit_code',$product_data['qualification_number'])->first();

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

@@ -53,7 +53,9 @@ class ViolationProductJobs implements ShouldQueue
                 $insert_data =['name' =>'违规挂网商品', 'code' => 'ViolationProductJobs', 'admin_id' => $admin_id];
                 $executeLog_id=$ExecuteLogModel->addExecuteLog_content($insert_data);
             }
-            $list_config_data = $ConfigViolationProductModel->where('status', 0)->paginate($limit, ['*'], 'page', $page)->toarray();
+            $list_config_data = $ConfigViolationProductModel->leftjoin('washconfig_product_category', 'washconfig_product_category.id', '=', 'washconfig_violation_product.category_id')
+                ->where('washconfig_violation_product.status', 0)
+                ->select(['washconfig_violation_product.*', 'washconfig_product_category.name as category_name'])->paginate($limit, ['*'], 'page', $page)->toarray();
             if (!$list_config_data || empty($list_config_data['data'])) {
                 return true;
             }
@@ -73,6 +75,7 @@ class ViolationProductJobs implements ShouldQueue
                     'company_scope' => $value['company_scope'],
                     'social_credit_code' => $social_credit_code,
                     'executeLog_id' => $executeLog_id,
+                    'category_name' => $value['category_name'] ? $value['category_name']:''
                 ];
                 ViolationProductDataJobs::dispatch($message_data);
                 // ViolationProductDataJobs::dispatchSync($message_data);

+ 1 - 1
app/Models/Manager/Process/LowPriceGoods.php

@@ -96,7 +96,7 @@ class LowPriceGoods extends Model
                 'link_url'    => $data['link_url'],
                 'store_name'    => $data['store_name'],
                 'source_responsible_person'    => $data['source_responsible_person'] ? ','.$data['source_responsible_person'].',':'',
-                'processing_status' => '1',
+                'category_name' => $data['category_name'],
                 'processing_status' => '1',
                 'insert_time' => time(),
             ];

+ 1 - 0
app/Models/Manager/Process/ViolationProduct.php

@@ -91,6 +91,7 @@ class ViolationProduct extends Model
                 'link_url'    => $data['link_url'],
                 'store_name'    => $data['store_name'],
                 'source_responsible_person'    => $data['source_responsible_person'] ? ','.$data['source_responsible_person'].',':'',
+                'category_name' => $data['category_name'],
                 'processing_status' => '1',
                 'insert_time' => time(),
             ];