|
|
@ -202,17 +202,30 @@ class MarketPercentageController extends ThinkController
|
|
|
|
if(is_administrator()||session('user_group_id') == 15||session('user_group_id') == 14||session('user_group_id') == 19||session('user_group_id') == 23) {
|
|
|
|
if(is_administrator()||session('user_group_id') == 15||session('user_group_id') == 14||session('user_group_id') == 19||session('user_group_id') == 23) {
|
|
|
|
unset($map['admin_id']);
|
|
|
|
unset($map['admin_id']);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$markerData = M("ucenter_member")->field("id")->where(['work_status'=>1])->select();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ($markerData) {
|
|
|
|
|
|
|
|
$admin_map['sys_member.uid'] = ['not in',array_column($markerData,'id')];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$admin_data = M("member")
|
|
|
|
$admin_data = M("member")
|
|
|
|
->field("access.uid admin_id")
|
|
|
|
->field("access.uid admin_id")
|
|
|
|
->join("left join sys_auth_group_access access on sys_member.uid = access.uid")
|
|
|
|
->join("left join sys_auth_group_access access on sys_member.uid = access.uid")
|
|
|
|
->join("left join sys_auth_group auth on access.group_id=auth.id")
|
|
|
|
->join("left join sys_auth_group auth on access.group_id=auth.id")
|
|
|
|
->where(['group_id'=>['in','11,12,21']])
|
|
|
|
->where(['group_id'=>['in','11,12,21']])
|
|
|
|
|
|
|
|
->where($admin_map)
|
|
|
|
->select();
|
|
|
|
->select();
|
|
|
|
if ($admin_data) {
|
|
|
|
if ($admin_data) {
|
|
|
|
$map['admin_id'] = ['in',array_column($admin_data,'admin_id')];
|
|
|
|
$map['admin_id'] = ['in',array_column($admin_data,'admin_id')];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!in_array($_REQUEST['admin_id'],array_column($markerData,'id'))) {
|
|
|
|
|
|
|
|
$_REQUEST['admin_id']?($map['admin_id'] = $_REQUEST['admin_id']):'';
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
$this->display("marketstaffsettle");
|
|
|
|
|
|
|
|
die();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$_REQUEST['admin_id']?($map['admin_id'] = $_REQUEST['admin_id']):'';
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -991,7 +1004,7 @@ class MarketPercentageController extends ThinkController
|
|
|
|
$map['pay_time'] = $_REQUEST['pay_time'];
|
|
|
|
$map['pay_time'] = $_REQUEST['pay_time'];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// var_dump($map);die();
|
|
|
|
|
|
|
|
$data = M("market_altogether","tab_")
|
|
|
|
$data = M("market_altogether","tab_")
|
|
|
|
->field("max(pay_time) pay_time,real_name,admin_id,nickname,level,sum(pay_amount) pay_amount,sum(extend_commission) extend_commission,
|
|
|
|
->field("max(pay_time) pay_time,real_name,admin_id,nickname,level,sum(pay_amount) pay_amount,sum(extend_commission) extend_commission,
|
|
|
|
sum(performance_commission) performance_commission,sum(achievement_bonus) achievement_bonus,
|
|
|
|
sum(performance_commission) performance_commission,sum(achievement_bonus) achievement_bonus,
|
|
|
|