From d426395607e8e5494271452c9e5105d3c3ca2aef Mon Sep 17 00:00:00 2001 From: sunke <18850253506@163.com> Date: Wed, 11 Dec 2019 17:08:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=85=E5=80=BC=E7=8E=A9=E5=AE=B6=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD=E5=A2=9E=E5=8A=A0=E6=B8=B8=E6=88=8F=E7=B4=AF=E8=AE=A1?= =?UTF-8?q?=E7=99=BB=E9=99=86=E5=A4=A9=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/Controller/DownloadController.class.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/Application/Home/Controller/DownloadController.class.php b/Application/Home/Controller/DownloadController.class.php index 45a84c811..f72b18ac6 100644 --- a/Application/Home/Controller/DownloadController.class.php +++ b/Application/Home/Controller/DownloadController.class.php @@ -3115,6 +3115,8 @@ class DownloadController extends BaseController { '充值次数', '昨日充值', '未登录天数', + '玩家游戏累计登陆天数', + '注册时间', '最后登录时间', '推广员账号', @@ -3172,8 +3174,14 @@ class DownloadController extends BaseController { //$spendMap['_string'] = 'uc.game_id = tab_user_play_info.game_id and uc.server_id = tab_user_play_info.server_id and uc.role_id = tab_user_play_info.role_id'; $fieldUC = "sum(uc.recharge_cost) recharge_cost,sum(uc.recharge_count) recharge_count,sum(if(uc.create_time = {$nowTime},uc.recharge_cost,0)) as recharge_cost_today"; - $fieldUI = "ui.user_account,ui.game_name,ui.role_name,ui.role_level,ui.server_name,ui.play_time,ui.play_ip,ui.promote_account,ui.sdk_version"; - $field = $fieldUC . ',' . $fieldUI; + $fieldUI = "ui.user_account,ui.game_name,ui.role_name,ui.role_level,ui.server_name,ui.play_time,ui.play_ip,ui.promote_account,ui.sdk_version,ui.create_time"; + $loginRecordMap['lr.create_time'] = $map['uc.create_time']; + $loginRecordMap['_string'] = 'lr.user_id = uc.user_id and lr.game_id = uc.game_id'; + $fieldLR = M('login_daily_record', 'tab_')->alias('lr') + ->field("count(*) as count") + ->where($loginRecordMap) + ->buildSql(); + $field = $fieldUC . ',' . $fieldUI . ',' . $fieldLR . ' as user_game_login_count'; $subQuery = M('user_play_data_count', 'tab_')->alias('uc') ->field($field) ->join('left join tab_user_play_info as ui on ui.game_id = uc.game_id and ui.server_id = uc.server_id and ui.role_id = uc.role_id') @@ -3227,6 +3235,8 @@ class DownloadController extends BaseController { $csvData['recharge_count'] = empty($value['recharge_count']) ? 0 : $value['recharge_count']; $csvData['recharge_cost_today'] = empty($value['recharge_cost_today']) ? 0 : $value['recharge_cost_today']; $csvData['unlogin_day'] = empty($value['play_time']) ? '--' : intval((strtotime(date('Y-m-d 00:00:00')) - strtotime(date('Y-m-d 00:00:00', $value['play_time']))) / (24 * 3600)); + $csvData['user_game_login_count'] = empty($value['user_game_login_count']) ? 0 : $value['user_game_login_count']; + $csvData['create_time'] = empty($value['create_time']) ? '--' : date('Y-m-d H:i:s', $value['create_time']); $csvData['play_time'] = empty($value['play_time']) ? '--' :date('Y-m-d H:i:s',$value['play_time']); $csvData['promote_account'] = empty($value['promote_account']) ? '--' :$value['promote_account']; @@ -3248,6 +3258,8 @@ class DownloadController extends BaseController { $allData['recharge_count'] = $total['recharge_count']; $allData['recharge_cost_today'] = $total['recharge_cost_today']; $allData['unlogin_day'] = '--'; + $allData['user_game_login_count'] = '--'; + $allData['create_time'] = '--'; $allData['play_time'] = '--'; $allData['promote_account'] = '--'; mb_convert_variables('GBK', 'UTF-8', $allData);