tongshanglei 1 year ago
parent
commit
5e671d3220
1 changed files with 11 additions and 0 deletions
  1. 11 0
      catch/map/controller/RouteMap.php

+ 11 - 0
catch/map/controller/RouteMap.php

@@ -648,6 +648,17 @@ class RouteMap extends CatchController
         
         if($params['name']){
             $mac=Db::table('stations')->where('name',$params['name'])->value('mac');
+            if(!$mac){
+                $response=[
+                    'code'=>10000,
+                    'message'=>'查询成功',
+                    'count'=>0,
+                    'data'=>[],
+                    'current'=>isset($params['page'])?(int)$params['page']:1,
+                    'limit'=>isset($params['limit'])?(int)$params['limit']:10,
+                ];
+                return $response; 
+            }
             $cond['RF_ID']=['=',$mac];
         }
         if($params['rfid_sn']){