Commit 115f0666 authored by hujun's avatar hujun

经纪人列表

parent 0e3f98c0
......@@ -91,6 +91,45 @@ class Broker extends Basic
return $this->response($data['status'], $data['msg'], $data['data']);
}
/**
* 获取经纪人列表
*
* @return \think\Response
*/
public function getBrokerList() {
$data['status'] = 200;
$data['data'] = '';
$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'].')';
}
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';
$data['list'] = $agent->getList($pageNo, $pageSize, 'id DESC', $field, $where);
$data['total'] = $agent->getTotal($where);
} else {
$data['msg'] = '没有经纪人信息';
}
return $this->response($data['status'], $data['msg'], $data);
}
/**
* 添加经纪人与楼盘关系
*
......
......@@ -67,6 +67,7 @@ Route::group('index', [
//查询经纪人
'getBroker' => ['index/broker/getBroker',['method'=>'get']],
'getBroker_new' => ['index/broker/getBroker_new',['method'=>'get']],
'getBrokerList' => ['index/broker/getBrokerList',['method'=>'get']],//门店列表的经纪人
'addHousesAgents' => ['index/broker/AddHousesAgents', ['method' => 'POST']], //新增楼盘与经纪人关系
'delTohouses' => ['index/broker/delTohouses', ['method' => 'POST']], //解除经纪人和楼盘关系
'getAgentsTohouses' => ['index/broker/getAgentsTohouses', ['method' => 'GET']], //获取经纪人和楼盘关系信息
......
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