Commit fb3dddd7 authored by hujun's avatar hujun

修改盘方查询

parent 5a96b5ca
......@@ -200,31 +200,27 @@ class Broker extends Basic
$data['data'] = '';
$data['msg'] = '';
if ($this->params['houses_id']) {
$pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo'];
$pageSize = empty($this->params['pageSize']) ? 10 : $this->params['pageSize'];
$fields = 'b.id,b.name,b.phone';
$where['a.is_del'] = ['=',0];
$where['b.status'] = ['=',0];
if (!empty($this->params['type'])) {
$where['a.type'] = $this->params['type'];
}
$pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo'];
$pageSize = empty($this->params['pageSize']) ? 10 : $this->params['pageSize'];
$fields = 'b.id,b.name,b.phone';
$where['a.is_del'] = ['=',0];
$where['b.status'] = ['=',0];
if (!empty($this->params['houses_id'])) {
$where['a.houses_id'] = $this->params['houses_id'];
}
if (!empty($this->params['type'])) {
$where['a.type'] = $this->params['type'];
}
if (!empty($this->params['agent_id'])) {
$where['a.agents_id'] = $this->params['agents_id'];
}
if (!empty($this->params['houses_id'])) {
$where['a.houses_id'] = $this->params['houses_id'];
}
$m_house = new GHousesToAgents();
$data['data'] = $m_house->getAgentsHousesList($pageNo, $pageSize, 'id DESC', $fields, $where);
} else {
$data['status'] = 101;
$data['msg'] = 'houses_id is null';
if (!empty($this->params['agent_id'])) {
$where['a.agents_id'] = $this->params['agents_id'];
}
$m_house = new GHousesToAgents();
$data['data'] = $m_house->getAgentsHousesList($pageNo, $pageSize, 'id DESC', $fields, $where);
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