From 53f3ad686418ed774eba64eded9ceaa8863afaea Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Tue, 10 Nov 2020 12:31:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Common/extend.php | 2 +- .../AuthManagerController.class.php | 5 ++- .../Controller/ExportController.class.php | 33 +++++++++++++++---- .../Controller/MemberController.class.php | 5 +++ .../RechargeSumController.class.php | 10 ++++++ .../Controller/SpendController.class.php | 1 + .../Admin/Controller/StatController.class.php | 2 ++ .../Admin/Controller/UserController.class.php | 1 + Application/Admin/Model/MemberModel.class.php | 1 + .../Admin/View/AuthManager/dataempower.html | 17 ++++++++++ Application/Admin/View/Member/user_info.html | 6 ++++ .../Admin/View/RechargeSum/summation.html | 6 ++++ Application/Admin/View/Spend/lists.html | 8 +++++ Application/Admin/View/Stat/userarpu.html | 2 ++ .../Admin/View/Stat/userretention.html | 6 ++++ Application/Admin/View/User/rolelist.html | 6 ++++ 16 files changed, 103 insertions(+), 8 deletions(-) diff --git a/Application/Admin/Common/extend.php b/Application/Admin/Common/extend.php index 82fb34f9a..60c63486b 100644 --- a/Application/Admin/Common/extend.php +++ b/Application/Admin/Common/extend.php @@ -1585,7 +1585,7 @@ function getGameList($partner_id) { function getAdminData ($uid) { $adminData = M('auth_group_access') - ->field('data_empower_type,data_president,show_data,show_market_admin') + ->field('data_empower_type,data_president,show_data,show_market_admin,show_promote') ->join('left join sys_auth_group on sys_auth_group_access.group_id=sys_auth_group.id') ->where(array('uid'=>$uid))->find(); diff --git a/Application/Admin/Controller/AuthManagerController.class.php b/Application/Admin/Controller/AuthManagerController.class.php index 060aa44cc..e9577cb24 100644 --- a/Application/Admin/Controller/AuthManagerController.class.php +++ b/Application/Admin/Controller/AuthManagerController.class.php @@ -527,13 +527,14 @@ class AuthManagerController extends AdminController{ $auth_group = M('AuthGroup')->where( array('status'=>array('egt','0'),'module'=>'admin','type'=>AuthGroupModel::TYPE_ADMIN) ) ->getfield('id,id,title,rules'); // var_dump($auth_group);die(); - $empower_type = M('AuthGroup')->field('data_empower_type,show_data,show_market_admin')->where(array('id'=>$_GET['group_id']))->find(); + $empower_type = M('AuthGroup')->field('data_empower_type,show_data,show_market_admin,show_promote')->where(array('id'=>$_GET['group_id']))->find(); // var_dump($empower_type);die(); $this->assign('data_empower_type', $empower_type['data_empower_type']); $this->assign('show_data', $empower_type['show_data']); $this->assign('auth_group', $auth_group); $this->assign('show_market_admin', $empower_type['show_market_admin']); + $this->assign('show_promote', $empower_type['show_promote']); $this->display(); } @@ -544,6 +545,7 @@ class AuthManagerController extends AdminController{ $data_empower_type = I('data_empower_type'); $show_data = I('show_data'); $show_market_admin = I('show_market_admin'); + $show_promote = I('show_promote'); $promoteData = I('promote_data'); // dump(json_decode($promoteData,true)); @@ -573,6 +575,7 @@ class AuthManagerController extends AdminController{ 'data_president' => $promoteData, 'show_data' => $show_data, 'show_market_admin' => $show_market_admin, + 'show_promote' => $show_promote, ))) { resetUserAuth(); diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index f4e1b387a..fc122fa71 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -56,6 +56,7 @@ class ExportController extends Controller switch ($id) { case 1: $showMarketAdmin = session('user_auth')['show_market_admin']; + $showPromote = session('user_auth')['show_promote']; $headers = [ 'create_time' => '创建时间', 'user_account' => '玩家账号', @@ -70,11 +71,14 @@ class ExportController extends Controller 'play_time' => '最后登录时间', 'play_ip' => '最后登录ip', ]; - $xlsCell = array_values($headers); - $fields = array_keys($headers); if ($showMarketAdmin == 0) { unset($headers['promote_id']); } + if ($showPromote == 0) { + unset($headers['promote_account']); + } + $xlsCell = array_values($headers); + $fields = array_keys($headers); if (isset($_REQUEST['game_name'])) { $map['game_name'] = ['like', trim($_REQUEST['game_name'])."%"]; unset($_REQUEST['game_name']); @@ -144,7 +148,6 @@ class ExportController extends Controller $pages = ceil($accessNum / $perSize); $lastId = 0; - for($i = 1; $i <= $pages; $i++) { $xlsData = M('user_play_info', 'tab_') @@ -158,7 +161,9 @@ class ExportController extends Controller $adminList = getMarketAdminsByPromoteIds(array_column($xlsData, 'promote_id')); } foreach($xlsData as $value) { - ($value['promote_account']=='官方渠道'||$value['promote_account']=='自然注册')?($value['promote_account']=C('OFFICIEL_CHANNEL')):''; + if ($showPromote == 1) { + ($value['promote_account']=='官方渠道'||$value['promote_account']=='自然注册')?($value['promote_account']=C('OFFICIEL_CHANNEL')):''; + } if ($showMarketAdmin == 1) { $value['promote_id'] = isset($adminList[$value['promote_id']]) && $adminList[$value['promote_id']]['admin'] ? $adminList[$value['promote_id']]['admin']['username'] : '无'; } @@ -1199,6 +1204,7 @@ class ExportController extends Controller $total=$total?$total:0; $showMarketAdmin = session('user_auth')['show_market_admin']; + $showPromote = session('user_auth')['show_promote']; $headers = [ 'pay_order_number' => '支付订单号', @@ -1227,6 +1233,9 @@ class ExportController extends Controller if ($showMarketAdmin == 0) { unset($headers['market_admin_id']); } + if ($showPromote == 0) { + unset($headers['promote_account']); + } $xlsCell = array_values($headers); $fields = array_keys($headers); @@ -1277,8 +1286,10 @@ class ExportController extends Controller } $value['merchant_id'] = getMerchantName($value['merchant_id']); checkEncryptionAuth($value['user_account'],'spend_lists'); -// $value['user_account'] = encryption($value['user_account']); - ($value['promote_account']=='官方渠道'||$value['promote_account']=='自然注册')?($value['promote_account']=C('OFFICIEL_CHANNEL')):''; + + if ($showPromote == 1) { + ($value['promote_account']=='官方渠道'||$value['promote_account']=='自然注册')?($value['promote_account']=C('OFFICIEL_CHANNEL')):''; + } $value['extend'] = $value['extend'].'`'; $value['pay_way'] = get_pay_way($value['pay_way']); $value['pay_status'] = get_info_status($value['pay_status'],9); @@ -4169,6 +4180,16 @@ class ExportController extends Controller ['retention_day30', '30日留存'], ]; + if (session('user_auth')['show_promote'] == 0) { + foreach ($xlsCell as $key => $item) { + if ($item[0] == 'promote_name') { + unset($xlsCell[$key]); + break; + } + } + $xlsCell = array_values($xlsCell); + } + $GetData = $_GET; unset($GetData['xlsname']); diff --git a/Application/Admin/Controller/MemberController.class.php b/Application/Admin/Controller/MemberController.class.php index 2a7801cfe..5e38df6c1 100644 --- a/Application/Admin/Controller/MemberController.class.php +++ b/Application/Admin/Controller/MemberController.class.php @@ -171,6 +171,7 @@ class MemberController extends ThinkController ($data[$key]['promote_account']=='官方渠道'||$data[$key]['promote_account']=='自然注册')?($data[$key]['promote_account']=C('OFFICIEL_CHANNEL')):''; } $showMarketAdmin = session('user_auth')['show_market_admin']; + $showPromote = session('user_auth')['show_promote']; if(isset($_REQUEST['export'])){ $isadmin = is_administrator(); //获取等级 @@ -224,6 +225,9 @@ class MemberController extends ThinkController if ($showMarketAdmin == 0) { unset($field['market_admin_username']); } + if ($showPromote == 0) { + unset($field['promote_account']); + } //操作日志 unset($_GET['export']); addOperationLog(array( @@ -286,6 +290,7 @@ class MemberController extends ThinkController $this->assign('repeat_count',$repeat_count); $this->assign('no_repeat_count',$no_repeat_count); $this->assign('showMarketAdmin', $showMarketAdmin); + $this->assign('showPromote', $showPromote); $this->assign('user_count',$user_count); $this->assign('now_count', $userDbRes['recharge_total']); $page = set_pagination($user_count, $row); diff --git a/Application/Admin/Controller/RechargeSumController.class.php b/Application/Admin/Controller/RechargeSumController.class.php index 615d32a6d..05a34ef18 100644 --- a/Application/Admin/Controller/RechargeSumController.class.php +++ b/Application/Admin/Controller/RechargeSumController.class.php @@ -152,6 +152,7 @@ class RechargeSumController extends ThinkController $this->checkListOrCountAuthRestMap($map,[]); + $this->assign('showPromote', session('user_auth')['show_promote']); $this->assign('meta_title', "充值汇总"); $this->assign('list_data', $data); $this->assign('total', $total); @@ -178,6 +179,15 @@ class RechargeSumController extends ThinkController array('newAddPay', "新增玩家付费"), array('accumulated', '本日累计'), ); + if (session('user_auth')['show_promote'] == 0) { + foreach ($expCellName as $key => $row) { + if ($row[0] == 'promote_id') { + unset($expCellName[$key]); + break; + } + } + $expCellName = array_values($expCellName); + } $expTableData = $data; $export->exportExcel($exptitle, $expCellName, $expTableData); } diff --git a/Application/Admin/Controller/SpendController.class.php b/Application/Admin/Controller/SpendController.class.php index 2c8fd3cc1..fad764a01 100644 --- a/Application/Admin/Controller/SpendController.class.php +++ b/Application/Admin/Controller/SpendController.class.php @@ -150,6 +150,7 @@ class SpendController extends ThinkController } $this->assign('showMarketAdmin', session('user_auth')['show_market_admin']); + $this->assign('showPromote', session('user_auth')['show_promote']); $this->assign('isMarketAdmin', $isMarketAdmin); $this->assign('marketAdmins', getMarketAdmins()); $this->assign('startDate', $startDate); diff --git a/Application/Admin/Controller/StatController.class.php b/Application/Admin/Controller/StatController.class.php index c9d6b9b03..f63b9f943 100644 --- a/Application/Admin/Controller/StatController.class.php +++ b/Application/Admin/Controller/StatController.class.php @@ -235,6 +235,7 @@ class StatController extends ThinkController $this->assign('baseGames', $baseGames); $this->checkListOrCountAuthRestMap($map,[]); + $this->assign('showPromote', session('user_auth')['show_promote']); $this->assign('data', $data); $this->assign('order_type', $orderType); $this->assign('order_column', $orderColumn); @@ -843,6 +844,7 @@ AND UNIX_TIMESTAMP( $this->checkListOrCountAuthRestMap($map,[]); $this->meta_title = 'ARPU统计'; + $this->assign('showPromote', session('user_auth')['show_promote']); $this->assign('baseGames', $baseGames); $this->assign('records', $rows); $this->assign('order', $order); diff --git a/Application/Admin/Controller/UserController.class.php b/Application/Admin/Controller/UserController.class.php index 61237e7d9..6d3013b5f 100644 --- a/Application/Admin/Controller/UserController.class.php +++ b/Application/Admin/Controller/UserController.class.php @@ -750,6 +750,7 @@ class UserController extends AdminController $value['market_admin_username'] = isset($adminList[$value['promote_id']]) && $adminList[$value['promote_id']]['admin'] ? $adminList[$value['promote_id']]['admin']['username'] : '无'; } + $this->assign('showPromote', session('user_auth')['show_promote']); $this->assign('showMarketAdmin', session('user_auth')['show_market_admin']); $this->assign('list', $list); $this->meta_title = '角色数据'; diff --git a/Application/Admin/Model/MemberModel.class.php b/Application/Admin/Model/MemberModel.class.php index 5e51e9f25..52d3e1591 100644 --- a/Application/Admin/Model/MemberModel.class.php +++ b/Application/Admin/Model/MemberModel.class.php @@ -83,6 +83,7 @@ class MemberModel extends Model { 'data_president'=>$adminData['data_president'], 'show_data'=>$adminData['show_data'], 'show_market_admin'=>$adminData['show_market_admin'], + 'show_promote'=>$adminData['show_promote'], ); //登录有效时间改为1小时 $expireTime = 3600; diff --git a/Application/Admin/View/AuthManager/dataempower.html b/Application/Admin/View/AuthManager/dataempower.html index 25e467fc3..a016a6dab 100644 --- a/Application/Admin/View/AuthManager/dataempower.html +++ b/Application/Admin/View/AuthManager/dataempower.html @@ -96,6 +96,23 @@ + + 是否显示推广员: + + + + + + + + + diff --git a/Application/Admin/View/Member/user_info.html b/Application/Admin/View/Member/user_info.html index b20adb488..cba880772 100644 --- a/Application/Admin/View/Member/user_info.html +++ b/Application/Admin/View/Member/user_info.html @@ -146,6 +146,7 @@ +
+
+
+
搜索
@@ -114,7 +116,9 @@ 日期 + 渠道来源 + 游戏名称 新增人数 活跃人数 @@ -133,7 +137,9 @@ {$data.date} + {$data.promote_id} + {$data.game_id} {$data.registerNum} {$data.livenNum} diff --git a/Application/Admin/View/Spend/lists.html b/Application/Admin/View/Spend/lists.html index a35a3a547..7bfdae2c8 100644 --- a/Application/Admin/View/Spend/lists.html +++ b/Application/Admin/View/Spend/lists.html @@ -113,6 +113,8 @@
+ +
+ +
+
+
搜索 diff --git a/Application/Admin/View/Stat/userretention.html b/Application/Admin/View/Stat/userretention.html index 714745428..fabef79ec 100644 --- a/Application/Admin/View/Stat/userretention.html +++ b/Application/Admin/View/Stat/userretention.html @@ -59,6 +59,7 @@
+
+
搜索 @@ -84,7 +86,9 @@ 日期 游戏名称 + 渠道名称 + 新增玩家 1日留存 @@ -117,7 +121,9 @@ {$vo.date} {$vo.game_name} + {$vo.promote_name} + {$vo.register_count} 0):?> {$vo['retention_day1']}% diff --git a/Application/Admin/View/User/rolelist.html b/Application/Admin/View/User/rolelist.html index 4d8225dbf..5fd4918ae 100644 --- a/Application/Admin/View/User/rolelist.html +++ b/Application/Admin/View/User/rolelist.html @@ -82,6 +82,7 @@
+
+
 -  @@ -136,7 +138,9 @@ 角色ID 角色名 游戏等级 + 所属推广员 + 所属市场专员 @@ -167,6 +171,7 @@ {$data['role_id']} {$rolename} {$data.role_level} + {$data.promote_account} @@ -174,6 +179,7 @@ {$data.promote_account|encryptStr} + {$data.market_admin_username}