ソースを参照

[智价云] 采集清洗配置规则调整

tangyuanwang 2 日 前
コミット
9a59fc1619

+ 6 - 0
app/Http/Controllers/Manager/Collect/Product.php

@@ -264,6 +264,9 @@ class Product extends Controller
                 return json_send(['code' => 'error', 'msg' => '商品关键词不能超过5个']);
             }
         }
+        if($enable_full_quantity == 1 && $all_data['product_specs'] == ''){
+            return json_send(['code' => 'error', 'msg' => '非全量采集,商品规格不能为空']);
+        }
         //查询是否存在
         $map = ['product_name' => $all_data['product_name']];
         if($product_brand != '') $map['product_brand'] = $product_brand;
@@ -371,6 +374,9 @@ class Product extends Controller
                 return json_send(['code' => 'error', 'msg' => '商品关键词不能超过5个']);
             }
         }
+        if($enable_full_quantity == 1 && $all_data['product_specs'] == ''){
+            return json_send(['code' => 'error', 'msg' => '非全量采集,商品规格不能为空']);
+        }
         //查询是否存在
         $map = ['product_brand' => $product_brand, 'product_name' => $all_data['product_name']];
         if ($is_admin != 1 && $company_id != 0) {

+ 8 - 2
app/Http/Controllers/Manager/WashConfig/LowPriceGoods.php

@@ -190,7 +190,7 @@ class LowPriceGoods extends Controller
         $all_data['product_specs'] = $product_specs;
         $all_data['product_brand'] = $product_brand;
         $all_data['product_keyword'] = $product_keyword;
-        $enable_full_quantity = request('enable_full_quantity', 0); //全量,0启用,1禁用
+        $enable_full_quantity = 1; //全量,0启用,1禁用
         $all_data['enable_full_quantity'] = $enable_full_quantity;
         if (trim($product_keyword) != '') {
             $product_keyword_count = count(explode(',', $product_keyword));
@@ -198,6 +198,9 @@ class LowPriceGoods extends Controller
                 return json_send(['code' => 'error', 'msg' => '商品关键词不能超过5个']);
             }
         }
+        if($enable_full_quantity == 1 && $all_data['product_specs'] == ''){
+            return json_send(['code' => 'error', 'msg' => '商品规格不能为空']);
+        }
         $store_scope = request('store_scope', '');
         $all_data['store_scope'] = $store_scope;
         $platform_string = $all_data['platform'];
@@ -293,7 +296,7 @@ class LowPriceGoods extends Controller
         $all_data['product_specs'] = $product_specs;
         $all_data['product_brand'] = $product_brand;
         $all_data['product_keyword'] = $product_keyword;
-        $enable_full_quantity = request('enable_full_quantity', 0); //全量,0启用,1禁用
+        $enable_full_quantity = 1; //全量,0启用,1禁用
         $all_data['enable_full_quantity'] = $enable_full_quantity;
         if (trim($product_keyword) != '') {
             $product_keyword_count = count(explode(',', $product_keyword));
@@ -301,6 +304,9 @@ class LowPriceGoods extends Controller
                 return json_send(['code' => 'error', 'msg' => '商品关键词不能超过5个']);
             }
         }
+        if($enable_full_quantity == 1 && $all_data['product_specs'] == ''){
+            return json_send(['code' => 'error', 'msg' => '商品规格不能为空']);
+        }
         $store_scope = request('store_scope', '');
         $all_data['store_scope'] = $store_scope;
         $platform_string = $all_data['platform'];

+ 8 - 2
app/Http/Controllers/Manager/WashConfig/ViolationProduct.php

@@ -196,7 +196,7 @@ class ViolationProduct extends Controller
         $all_data['product_specs'] = $product_specs;
         $all_data['product_brand'] = $product_brand;
         $all_data['product_keyword'] = $product_keyword;
-        $enable_full_quantity = request('enable_full_quantity', 0); //全量,0启用,1禁用
+        $enable_full_quantity = 1; //全量,0启用,1禁用
         $all_data['enable_full_quantity'] = $enable_full_quantity;
         if (trim($product_keyword) != '') {
             $product_keyword_count = count(explode(',', $product_keyword));
@@ -204,6 +204,9 @@ class ViolationProduct extends Controller
                 return json_send(['code' => 'error', 'msg' => '商品关键词不能超过5个']);
             }
         }
+        if($enable_full_quantity == 1 && $all_data['product_specs'] == ''){
+            return json_send(['code' => 'error', 'msg' => '商品规格不能为空']);
+        }
         $store_scope = request('store_scope', '');
         $all_data['store_scope'] = $store_scope;
         $platform_string = request('platform', '');
@@ -298,7 +301,7 @@ class ViolationProduct extends Controller
         $all_data['product_specs'] = $product_specs;
         $all_data['product_brand'] = $product_brand;
         $all_data['product_keyword'] = $product_keyword;
-        $enable_full_quantity = request('enable_full_quantity', 0); //全量,0启用,1禁用
+        $enable_full_quantity = 1; //全量,0启用,1禁用
         $all_data['enable_full_quantity'] = $enable_full_quantity;
         if (trim($product_keyword) != '') {
             $product_keyword_count = count(explode(',', $product_keyword));
@@ -306,6 +309,9 @@ class ViolationProduct extends Controller
                 return json_send(['code' => 'error', 'msg' => '商品关键词不能超过5个']);
             }
         }
+        if($enable_full_quantity == 1 && $all_data['product_specs'] == ''){
+            return json_send(['code' => 'error', 'msg' => '商品规格不能为空']);
+        }
         $store_scope = request('store_scope', '');
         $all_data['store_scope'] = $store_scope;
         $company_scope = request('company_scope', '');