|
|
|
@ -54,13 +54,7 @@ class MemberController extends ThinkController
|
|
|
|
|
$map['tab_user.id'] = $_REQUEST['user_id'];
|
|
|
|
|
}
|
|
|
|
|
if (isset($_REQUEST['account'])) {
|
|
|
|
|
//列表无权限要精准搜索
|
|
|
|
|
if($this->checkListOrCountAuth("list")){
|
|
|
|
|
$map['tab_user.account'] = ['like',I('account') . "%"];
|
|
|
|
|
}else{
|
|
|
|
|
$map['tab_user.account'] =I('account');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$map['tab_user.account'] = ['like',I('account') . "%"];
|
|
|
|
|
}
|
|
|
|
|
if (isset($_REQUEST['time_start']) && isset($_REQUEST['time_end'])) {
|
|
|
|
|
$map['tab_user.register_time'] = ['between', [strtotime(I('time_start')), strtotime(I('time_end')) + 86399]];
|
|
|
|
@ -105,15 +99,6 @@ class MemberController extends ThinkController
|
|
|
|
|
$map['tab_user.device_number'] = $_REQUEST['device_number'];
|
|
|
|
|
}
|
|
|
|
|
$promoteRoot = getPowerPromoteIds();
|
|
|
|
|
|
|
|
|
|
// $data_empower_type = session('user_auth')['data_empower_type'];
|
|
|
|
|
//// var_dump($promoteRoot);die();
|
|
|
|
|
//
|
|
|
|
|
// if ($promoteRoot) {
|
|
|
|
|
// $map['tab_user.promote_id'] =array('in',$promoteRoot);
|
|
|
|
|
// } else if(!$promoteRoot&&$data_empower_type!=1){
|
|
|
|
|
// $map['tab_user.id'] = array('lt',1);
|
|
|
|
|
// }
|
|
|
|
|
setPowerPromoteIds($map,'tab_user.promote_id');
|
|
|
|
|
|
|
|
|
|
//1.3 与推广员相关
|
|
|
|
@ -142,13 +127,8 @@ class MemberController extends ThinkController
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//判断列表权限
|
|
|
|
|
$listauth = $this->checkListOrCountAuth("count");
|
|
|
|
|
$listauth = $this->checkListOrCountAuth("list",["user_id","account","device_number"]);
|
|
|
|
|
if(!$listauth){
|
|
|
|
|
//没权限
|
|
|
|
|
$map['tab_user.id'] = 0;
|
|
|
|
|
}
|
|
|
|
|
//判断是否有列表和统计的权限
|
|
|
|
|
$this->checkListOrCountAuthRestMap($map,["tab_user.id","tab_user.account","tab_user.device_number"]);
|
|
|
|
|
|
|
|
|
|
//计算用户列表
|
|
|
|
|
$data = M("user","tab_")
|
|
|
|
|