Browse Source

[智价云] 店铺范围搜索更新

tangyuanwang 1 week ago
parent
commit
bf74bd41d7

+ 3 - 0
app/Http/Controllers/Manager/WashConfig/ControlGoods.php

@@ -33,6 +33,7 @@ class ControlGoods extends Controller
         $end_time = request('end_time', '');
         $product_name = request('product_name', '');
         $platform = request('platform', '');
+        $store_scope = request('store_scope', '');
         // 时间条件
         if ($start_time) $map[] = ['insert_time', '>=', strtotime($start_time)];
         if ($end_time) $map[]   = ['insert_time', '<=', strtotime($end_time)];
@@ -40,6 +41,8 @@ class ControlGoods extends Controller
         if ($status) $map[] = ['status', '=', $status];
         if ($product_name) $map[] = ['product_name', 'like', "%$product_name%"];
         if ($platform) $map[] = ['platform', 'like', "%$platform%"];
+        if ($store_scope == 1) $map[] = ['store_scope', '==', ''];
+        if ($store_scope == 2) $map[] = ['store_scope', '!=', ''];
         // 查询数据
         $result = $ControlGoodsModel->query()
             ->where($map)

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

@@ -34,6 +34,7 @@ class LowPriceGoods extends Controller
         $end_time = request('end_time', '');
         $product_name = request('product_name', '');
         $platform = request('platform', '');
+        $store_scope = request('store_scope', '');
         // 时间条件
         if ($start_time) $map[] = ['insert_time', '>=', strtotime($start_time)];
         if ($end_time) $map[]   = ['insert_time', '<=', strtotime($end_time)];
@@ -41,6 +42,8 @@ class LowPriceGoods extends Controller
         if (is_numeric($status)) $map[] = ['status', '=', $status];
         if ($product_name) $map[] = ['product_name', 'like', "%$product_name%"];
         if ($platform) $map[] = ['platform', 'like', "%$platform%"];
+        if ($store_scope == 1) $map[] = ['store_scope', '==', ''];
+        if ($store_scope == 2) $map[] = ['store_scope', '!=', ''];
         // 查询数据
         $result = $LowPriceGoodsModel->query()
             ->where($map)

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

@@ -34,6 +34,7 @@ class ViolationProduct extends Controller
         $end_time = request('end_time', '');
         $product_name = request('product_name', '');
         $platform = request('platform', '');
+        $store_scope = request('store_scope', '');
         // 时间条件
         if ($start_time) $map[] = ['insert_time', '>=', strtotime($start_time)];
         if ($end_time) $map[]   = ['insert_time', '<=', strtotime($end_time)];
@@ -41,6 +42,8 @@ class ViolationProduct extends Controller
         if (is_numeric($status)) $map[] = ['status', '=', $status];
         if ($product_name) $map[] = ['product_name', 'like', "%$product_name%"];
         if ($platform) $map[] = ['platform', 'like', "%$platform%"];
+        if ($store_scope == 1) $map[] = ['store_scope', '==', ''];
+        if ($store_scope == 2) $map[] = ['store_scope', '!=', ''];
         // 查询数据
         $result = $ViolationProductModel->query()
             ->where($map)