Commit 1ed2aca1 authored by hujun's avatar hujun

客户列表搜索增加 邀请人门店和部门搜索

parent c7c4c660
...@@ -200,17 +200,32 @@ class Member extends Basic{ ...@@ -200,17 +200,32 @@ class Member extends Basic{
$where['a.last_login_time'] = ['between time', [$params['login_time_start']. ' 00:00:00', $params['login_time_end']. ' 23:59:59']]; $where['a.last_login_time'] = ['between time', [$params['login_time_start']. ' 00:00:00', $params['login_time_end']. ' 23:59:59']];
}*/ }*/
if (!empty($params['store_name'])) { //客方门店
if (!empty($params['store_name']) && empty($params['referrer_store_name'])) {
$store = new AStore(); $store = new AStore();
$where['b.store_id'] = $store->getStoreKeyById('id', ['store_name'=>$params['store_name']]); $where['b.store_id'] = $store->getStoreKeyById('id', ['store_name'=>$params['store_name']]);
$type = 3; $type = 3;
} }
if (!empty($params['district_id']) && $params['district_id'] != -1) { //邀请人门店
if (!empty($params['referrer_store_name']) && empty($params['store_name'])) {
$store = new AStore();
$where['b.store_id'] = $store->getStoreKeyById('id', ['store_name'=>$params['referrer_store_name']]);
$type = 4;
}
//客方部门
if (!empty($params['district_id']) && $params['district_id'] != -1 && empty($params['referrer_district_id'])) {
$where['b.district_id'] = $params['district_id']; $where['b.district_id'] = $params['district_id'];
$type = 3; $type = 3;
} }
//邀请人部门
if (!empty($params['referrer_district_id']) && $params['referrer_district_id'] != -1 && empty($params['district_id'])) {
$where['b.district_id'] = $params['district_id'];
$type = 4;
}
$fields = 'a.id,a.user_nick,a.user_name,a.user_phone,a.user_pic,a.create_time,a.user_pswd,a.referrer_id,a.registration_time,a.user_name,a.last_login_ip,a.status'; $fields = 'a.id,a.user_nick,a.user_name,a.user_phone,a.user_pic,a.create_time,a.user_pswd,a.referrer_id,a.registration_time,a.user_name,a.last_login_ip,a.status';
$data['list'] = $this->user->getUserAgent($pageNo, $pageSize, 'a.id DESC', $fields, $where, $type); $data['list'] = $this->user->getUserAgent($pageNo, $pageSize, 'a.id DESC', $fields, $where, $type);
$data['total'] = $this->user->getUserAgentTotal($where, $type); $data['total'] = $this->user->getUserAgentTotal($where, $type);
......
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