Commit ce316960 authored by hujun's avatar hujun

site_id

parent 5a3e9e3f
...@@ -110,7 +110,7 @@ class District extends Basic ...@@ -110,7 +110,7 @@ class District extends Basic
$pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo']; $pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo'];
$pageSize = empty($this->params['pageSize']) ? 10 : $this->params['pageSize']; $pageSize = empty($this->params['pageSize']) ? 10 : $this->params['pageSize'];
$where['status'] = 0; $where['status'] = 0;
$where['site_id'] = $this->siteId;
if ($this->params['district_name']) { if ($this->params['district_name']) {
$where['district_name'] = ['LIKE', $this->params['district_name']. '%']; $where['district_name'] = ['LIKE', $this->params['district_name']. '%'];
} }
...@@ -145,7 +145,9 @@ class District extends Basic ...@@ -145,7 +145,9 @@ class District extends Basic
$field = 'id,district_name'; $field = 'id,district_name';
$where['status'] = 0; $where['status'] = 0;
$where['site_id'] = $this->siteId; if ($this->userId != 1) {
$where['site_id'] = $this->siteId;
}
$data['data'] = $agents->getList($pageNo, $pageSize, 'id DESC', $field, $where); $data['data'] = $agents->getList($pageNo, $pageSize, 'id DESC', $field, $where);
return $this->response($data['status'], $data['msg'], $data['data']); return $this->response($data['status'], $data['msg'], $data['data']);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment