Commit f4e67f95 authored by hujun's avatar hujun

总监列表搜索

parent 9e6ad70c
......@@ -184,17 +184,14 @@ class Broker extends Basic
$data['msg'] = '';
$pageNo = empty($this->params['pageNo']) ? 1 : $this->params['pageNo'];
$pageSize = empty($this->params['pageSize']) ? 10 : $this->params['pageSize'];
$search = $this->params['search'];
$agents = new AAgents();
$field = 'id,name,create_time,phone,district_id';
$where['level'] = 40;
$where['status'] = 0;
$where = '';
$where .= 'level=40 AND status=0';
if (isset($this->params['name'])) {
$where['name'] = ['LIKE',$this->params['name'].'%'];
}
if (isset($this->params['phone'])) {
$where['phone'] = ['LIKE',$this->params['phone'].'%'];
if ($search != NULL) {
$where .= " AND (phone like '{$search}%' or name like '{$search}%')";
}
$data['list'] = $agents->getListDistrict($pageNo, $pageSize, 'id DESC', $field, $where);
......
......@@ -142,6 +142,7 @@ public function saveList(){
$district_where['status'] = 0;
$store_where['status'] = 0;
$result = array();
foreach ($data as $k=>$v){
$result[$k] = $v;
if (isset($v->district_id)) {
......
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