master
yulingwei 4 years ago
parent 1119e8faf9
commit b9dfe08177

@ -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_")

@ -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']);

@ -102,7 +102,7 @@
<th >推广员账号</th>
<th >管理</th>
<th >市场专</th>
<th ><a class="paixu" data-order='count'><if condition="$userarpu_order eq 4 and $userarpu_order_type eq 'count'">累计注册▲
<elseif condition="$userarpu_order eq 3 and $userarpu_order_type eq 'count'"/>累计注册▼

Loading…
Cancel
Save