diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index 6bf24fe3f..2f9d589e1 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -157,8 +157,8 @@ class ExportController extends Controller $adminList = getMarketAdminsByPromoteIds(array_column($xlsData, 'promote_id')); foreach($xlsData as $value) { - $value['market_admin_username'] = isset($adminList[$value['promote_id']]) && $adminList[$value['promote_id']]['admin'] ? $adminList[$value['promote_id']]['admin']['username'] : '无'; ($value['promote_account']=='官方渠道'||$value['promote_account']=='自然注册')?($value['promote_account']=C('OFFICIEL_CHANNEL')):''; + $value['market_admin_username'] = isset($adminList[$value['promote_id']]) && $adminList[$value['promote_id']]['admin'] ? $adminList[$value['promote_id']]['admin']['username'] : '无'; $value['create_time'] = date("Y-m-d H:i:s",$value['create_time']); $value['play_time'] = date("Y-m-d H:i:s",$value['play_time']); mb_convert_variables('GBK', 'UTF-8', $value); @@ -3626,7 +3626,7 @@ class ExportController extends Controller // 如果是市场专员那么只能看自己的 $isMarketAdmin = isMarketAdmin(); if ($isMarketAdmin) { - $map['promote.admin_id'] = session('user_auth'); + $map['promote.admin_id'] = is_login(); } $data = M("User u","tab_") diff --git a/Application/Admin/Controller/PlatformController.class.php b/Application/Admin/Controller/PlatformController.class.php index 09a7a2366..165d5e918 100644 --- a/Application/Admin/Controller/PlatformController.class.php +++ b/Application/Admin/Controller/PlatformController.class.php @@ -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 // 如果是市场专员那么只能看自己的 $isMarketAdmin = isMarketAdmin(); if ($isMarketAdmin) { - $map['s.market_admin_id'] = session('user_auth'); + $_REQUEST['admin_user_id'] = $map['tp2.admin_id'] = is_login(); } - 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 $data[] = $v; } //dd($data); - unset($map['tp1.id'], $map['tp2.id']); + unset($map['tp1.id'], $map['tp2.id'], $map['tp2.admin_id']); unset($map['tp1.chain']); unset($tmap['tp1.id']); unset($tmap['tp1.chain'], $tmap['tp2.id']); diff --git a/Application/Admin/View/Platform/promote_statistics.html b/Application/Admin/View/Platform/promote_statistics.html index f3f3e0850..7d09bfc3d 100644 --- a/Application/Admin/View/Platform/promote_statistics.html +++ b/Application/Admin/View/Platform/promote_statistics.html @@ -102,7 +102,7 @@ 推广员账号 - 管理员 + 市场专员 累计注册▲ 累计注册▼