Browse Source

优化接口

huangsanjia 1 year ago
parent
commit
ce872904af
1 changed files with 3 additions and 0 deletions
  1. 3 0
      application/api/controller/ReportingWork.php

+ 3 - 0
application/api/controller/ReportingWork.php

@@ -432,6 +432,9 @@ class ReportingWork extends Api
             $this->error('非法请求');
         }
         $params = Request::instance()->get();
+        if (empty($params['addr'])){
+            $this->error('参数不能为空');
+        }
         $data = \db('设备_基本资料')->where('sys_sbID',$params['addr'])->field('设备编号,rtrim(使用部门) as 使用部门')->find();
         $this->success('请求成功',$data);
     }