sunhao 5 years ago
parent
commit
a601821220
1 changed files with 2 additions and 2 deletions
  1. 2 2
      app/Http/Controllers/Admin/StatisticsController.php

+ 2 - 2
app/Http/Controllers/Admin/StatisticsController.php

@@ -3970,7 +3970,7 @@ class StatisticsController extends Controller
3970 3970
         $offset = ($page-1) * $pageSize;
3971 3971
         $city = $request->input('city');
3972 3972
 
3973
-        if($city !== null){
3973
+        if($city){
3974 3974
             $city = str_replace('市', '', $city); //单独搜城市不走redis 不用排序
3975 3975
         }else{
3976 3976
             //从redis取数据
@@ -4095,7 +4095,7 @@ class StatisticsController extends Controller
4095 4095
         }
4096 4096
 
4097 4097
         $count = count($result);
4098
-        if($city == null){
4098
+        if(!$city){
4099 4099
             Redis::set($redis_key, json_encode($result));
4100 4100
             //计算今日剩余时间
4101 4101
             $_time = strtotime(date('Y-m-d'). '23:59:59') - time();