Commit 8a94d02a authored by hujun's avatar hujun

经纪人列表

parent b9a83daa
......@@ -102,30 +102,20 @@ class Broker extends Basic
$data['msg'] = '';
$pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo'];
$pageSize = empty($this->params['pageSize']) ? 10 : $this->params['pageSize'];
$where = 'status <> 2';
if ($this->params['phone']) {
$where = ' AND (phone like "'.$this->params['phone'].'%" or name like "'.$this->params['phone'].'%")';
}
if ($this->params['level']) {
$where .= ' AND level in ('.$this->params['level'].')';
}
$pageSize = empty($this->params['pageSize']) ? 100 : $this->params['pageSize'];
$where['status'] = ['<>',2];
$where['level'] = 10;
$where['store_id'] = $this->params['store_id'];
if ($this->params['store_id']) {
$where .= ' AND store_id='.$this->params['store_id'];
}
if ($where) {
$agent = new AAgents();
$field = 'id,name,phone,level,create_time';
$list = $agent->getList($pageNo, $pageSize, 'id DESC', $field, $where);
$total = $agent->getTotal($where);
$data['data'] = $agent->getList($pageNo, $pageSize, 'id DESC', $field, $where);
} else {
$data['msg'] = '没有经纪人信息';
$data['msg'] = 'store_id is null';
}
return $this->response($data['status'], $data['msg'], ['list'=>$list,'total'=>$total]);
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