Browse Source

[智价云] 平台校验信息更新

tangyuanwang 1 week ago
parent
commit
949b6be99c

+ 3 - 3
app/Http/Controllers/Manager/Collect/Product.php

@@ -288,7 +288,7 @@ class Product extends Controller
             $platform_data = $ProductModel->platform_index_data();
             $map_where = ['product_name' => $all_data['product_name'],'status'=>'0','company_id'=> $all_data['company_id']];
             if ($product_brand != '') $map_where['product_brand'] = $product_brand;
-            if (!empty($platform_data)) {
+            if (!empty($platforms) && $platforms != '')  {
                 foreach ($platforms as $platform) {
                     $product_specs_log = $ProductModel
                         ->whereRaw("FIND_IN_SET(?, platform)", [$platform])
@@ -419,7 +419,7 @@ class Product extends Controller
             $platform_data = $ProductModel->platform_index_data();
             $map_where = ['product_name' => $all_data['product_name'],'status'=>'0','company_id'=> $all_data['company_id']];
             if($product_brand != '') $map_where['product_brand'] = $product_brand;
-            if (!empty($platform_data)) {
+            if (!empty($platforms) && $platforms != '')  {
                 foreach ($platforms as $platform) {
                     $product_specs_log = $ProductModel
                         ->whereRaw("FIND_IN_SET(?, platform)", [$platform])
@@ -502,7 +502,7 @@ class Product extends Controller
             $platforms = $platforms ? array_unique($platforms) : '';
 
             $platform_data = $ProductModel->platform_data();
-            if (!empty($platform_data)) {
+            if (!empty($platforms) && $platforms != '')  {
                 foreach ($platforms as $platform) {
                     $product_specs_log = $ProductModel
                         ->whereRaw("FIND_IN_SET(?, platform)", [$platform])

+ 3 - 3
app/Http/Controllers/Manager/WashConfig/LowPriceGoods.php

@@ -231,7 +231,7 @@ class LowPriceGoods extends Controller
             $platform_data = $LowPriceGoodsModel->platform_index_data();
             $map_where = ['product_name' => $all_data['product_name'], 'suggested_price' => $all_data['suggested_price'], 'status' => '0', 'company_id' => $all_data['company_id']];
             if ($product_brand != '') $map_where['product_brand'] = $product_brand;
-            if (!empty($platform_data)) {
+            if (!empty($platforms) && $platforms != '')  {
                 foreach ($platforms as $platform) {
                     $product_specs_log = $LowPriceGoodsModel
                         ->whereRaw("FIND_IN_SET(?, platform)", [$platform])
@@ -334,7 +334,7 @@ class LowPriceGoods extends Controller
             $platform_data = $LowPriceGoodsModel->platform_index_data();
             $map_where = ['product_brand' => $product_brand, 'product_name' => $all_data['product_name'], 'suggested_price' => $all_data['suggested_price'], 'status' => '0', 'company_id' => $all_data['company_id']];
             if ($product_brand != '') $map_where['product_brand'] = $product_brand;
-            if (!empty($platform_data)) {
+            if (!empty($platforms) && $platforms != '')  {
                 foreach ($platforms as $platform) {
                     $product_specs_log = $LowPriceGoodsModel
                         ->whereRaw("FIND_IN_SET(?, platform)", [$platform])
@@ -435,7 +435,7 @@ class LowPriceGoods extends Controller
             $platforms = $platforms ? array_unique($platforms) : '';
 
             $platform_data = $LowPriceGoodsModel->platform_index_data();
-            if (!empty($platform_data)) {
+            if (!empty($platforms) && $platforms != '') {
                 foreach ($platforms as $platform) {
                     $product_specs_log = $LowPriceGoodsModel
                         ->whereRaw("FIND_IN_SET(?, platform)", [$platform])

+ 3 - 3
app/Http/Controllers/Manager/WashConfig/ViolationProduct.php

@@ -237,7 +237,7 @@ class ViolationProduct extends Controller
             $platform_data = $ViolationProductModel->platform_index_data();
             $map_where = ['product_name' => $all_data['product_name'], 'status' => '0', 'company_id' => $all_data['company_id']];
             if ($product_brand != '') $map_where['product_brand'] = $product_brand;
-            if (!empty($platform_data)) {
+            if (!empty($platforms) && $platforms != '')  {
                 foreach ($platforms as $platform) {
                     $product_specs_log = $ViolationProductModel
                         ->whereRaw("FIND_IN_SET(?, platform)", [$platform])
@@ -339,7 +339,7 @@ class ViolationProduct extends Controller
             $platform_data = $ViolationProductModel->platform_index_data();
             $map_where = ['product_name' => $all_data['product_name'], 'status' => '0', 'company_id' => $all_data['company_id']];
             if ($product_brand != '') $map_where['product_brand'] = $product_brand;
-            if (!empty($platform_data)) {
+            if (!empty($platforms) && $platforms != '')  {
                 foreach ($platforms as $platform) {
                     $product_specs_log = $ViolationProductModel
                         ->whereRaw("FIND_IN_SET(?, platform)", [$platform])
@@ -431,7 +431,7 @@ class ViolationProduct extends Controller
             $platforms = $platforms ? array_unique($platforms) : '';
 
             $platform_data = $ViolationProductModel->platform_index_data();
-            if (!empty($platform_data)) {
+            if (!empty($platforms) && $platforms != '')  {
                 foreach ($platforms as $platform) {
                     $product_specs_log = $ViolationProductModel
                         ->whereRaw("FIND_IN_SET(?, platform)", [$platform])