Commit 1f37bc8c authored by hujun's avatar hujun

where

parent cf4fc3e3
...@@ -285,6 +285,17 @@ class Houses extends Basic ...@@ -285,6 +285,17 @@ class Houses extends Basic
$where['id'] = $this->params['id']; $where['id'] = $this->params['id'];
} else { } else {
$where['status'] = [ '<>', 3 ]; $where['status'] = [ '<>', 3 ];
if (empty($this->params['city'])) {
$where['city'] = $this->city;
} else {
$service_broker = new BrokerService();
$check_data = $service_broker->checkSite($this->userId, $this->params['site_id']);
if ($check_data) {
$where['city'] = $this->params['city'];
} else {
$where['city'] = $this->city;
}
}
} }
//盘方ID //盘方ID
if ($this->params['dish_id'] != NULL) { if ($this->params['dish_id'] != NULL) {
...@@ -401,18 +412,6 @@ class Houses extends Basic ...@@ -401,18 +412,6 @@ class Houses extends Basic
} }
} }
if (empty($this->params['city'])) {
$where['city'] = $this->city;
} else {
$service_broker = new BrokerService();
$check_data = $service_broker->checkSite($this->userId, $this->params['site_id']);
if ($check_data) {
$where['city'] = $this->params['city'];
} else {
$where['city'] = $this->city;
}
}
$list = $this->house->getList($pageNo, $pageSize, 'id DESC', $fields, $where); $list = $this->house->getList($pageNo, $pageSize, 'id DESC', $fields, $where);
$data['total'] = $this->house->getTotal($where); $data['total'] = $this->house->getTotal($where);
......
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