Commit cb2b3154 authored by hujun's avatar hujun

获取经纪人增加等级判断

parent 5fbd3121
......@@ -70,13 +70,17 @@ class Broker extends Basic
$pageSize = empty($this->params['pageSize']) ? 10 : $this->params['pageSize'];
$where = '';
if ($this->params['phone']) {
$where = 'phone like "'.$this->params['phone'].'%" or name like "'.$this->params['phone'].'%"';
$where = '(phone like "'.$this->params['phone'].'%" or name like "'.$this->params['phone'].'%")';
}
if ($this->params['level']) {
$where .= ' AND level in ('.$this->params['level'].')';
}
if ($where) {
$agent = new AAgents();
$field = 'id,name,phone';
$data['data'] = $agent->getListJoin($pageNo, $pageSize, '', $field, $where);
$data['data'] = $agent->getList($pageNo, $pageSize, 'id DESC', $field, $where);
} else {
$data['msg'] = '没有经纪人信息';
}
......
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