@ -461,15 +461,16 @@ class PlatformController extends ThinkController
}
}
//为数据权限添加
setPowerPromoteIds($map, 'u.promote_id');
// 如果是市场专员那么只能看自己的
// 如果是市场专员那么只能看自己的会长信息
$isMarketAdmin = isMarketAdmin();
if ($isMarketAdmin) {
$map['promote.admin_id'] = session('user_auth');
$map['promote.admin_id'] = is_login();
}
//为数据权限添加
setPowerPromoteIds($map, 'u.promote_id');
$data = M("User u","tab_")
->field("count(u.id) as count,IFNULL(if(substring_index(substring_index(promote.`chain`,'/',2),'/',-1)='',u.promote_id,substring_index(substring_index(promote.`chain`,'/',2),'/',-1)),0) id")
->join("tab_promote promote ON u.promote_id = promote.id","left")
@ -672,10 +673,10 @@ class PlatformController extends ThinkController
if (isset($_REQUEST['server_id'])||isset($_REQUEST['game_name'])||isset($_REQUEST['promote_id'])) {
if (isset($_REQUEST['server_id'])||isset($_REQUEST['game_name'])||isset($_REQUEST['promote_id'])||isset($_REQUEST['admin_id'])||isset($_REQUEST['admin_user_id'])) {
$data = M('promote', 'tab_')->alias('tp1')
->field('tp1.account as promote_account,tp1.id,
floor(sum(pay_amount)*100) as count')
@ -734,7 +735,7 @@ class PlatformController extends ThinkController