|
|
|
@ -2879,7 +2879,14 @@ public function iosDetailExcelInfo($id,$map) {
|
|
|
|
|
$xlsCell = array(
|
|
|
|
|
array('user_account','玩家账号'),
|
|
|
|
|
array('promote_account','推广账号'),
|
|
|
|
|
array('game_name','游戏名称'),
|
|
|
|
|
array('game_name','游戏名称'),
|
|
|
|
|
|
|
|
|
|
array('device_number','设备码'),
|
|
|
|
|
array('register_time','注册时间'),
|
|
|
|
|
array('register_ip','注册IP'),
|
|
|
|
|
array('login_time','最近登录时间'),
|
|
|
|
|
array('login_ip','最近登录IP'),
|
|
|
|
|
|
|
|
|
|
array('server_name','区服'),
|
|
|
|
|
array('role_name','游戏昵称'),
|
|
|
|
|
array('role_level','等级'),
|
|
|
|
@ -2887,12 +2894,38 @@ public function iosDetailExcelInfo($id,$map) {
|
|
|
|
|
);
|
|
|
|
|
$records = recordPromoteLogs('数据管理','角色查询导出');
|
|
|
|
|
$model = M('user_play_info','tab_');
|
|
|
|
|
$data = $model->field('user_account,promote_account,game_name,server_name,role_name,role_level,create_time')->where($map)->order('create_time desc')->select();
|
|
|
|
|
$data = $model->field('user_id,user_account,promote_account,game_name,server_name,role_name,role_level,create_time,play_time')->where($map)->order('create_time desc')->select();
|
|
|
|
|
|
|
|
|
|
$users = [];
|
|
|
|
|
if (count($data) > 0) {
|
|
|
|
|
$userIds = array_column($data, 'user_id');
|
|
|
|
|
$users = M('user', 'tab_')->field(['id', 'register_time', 'login_time', 'register_ip', 'login_ip', 'device_number'])->where(['id' => ['in', $userIds]])->select();
|
|
|
|
|
$users = index_by_column('id', $users);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$xlsData = [];
|
|
|
|
|
foreach ($data as $key1 => $value1) {
|
|
|
|
|
$value1['user_account'] = $this->encryption($value1['user_account']);
|
|
|
|
|
$value1['create_time'] = date('Y-m-d H:i:s',$value1['create_time']);
|
|
|
|
|
$xlsData[] = $value1;
|
|
|
|
|
$value1['user_account'] = $this->encryption($value1['user_account']);
|
|
|
|
|
if($value1['create_time'] == 0) {
|
|
|
|
|
$value1['create_time'] = date('Y-m-d H:i:s', $value['play_time']);
|
|
|
|
|
} else {
|
|
|
|
|
$value1['create_time'] = date('Y-m-d H:i:s', $value['create_time']);
|
|
|
|
|
}
|
|
|
|
|
if (isset($users[$value1['user_id']])) {
|
|
|
|
|
$user = $users[$value1['user_id']];
|
|
|
|
|
$value1['register_time'] = date('Y-m-d H:i:s', $user['register_time']);
|
|
|
|
|
$value1['login_time'] = date('Y-m-d H:i:s', $user['login_time']);
|
|
|
|
|
$value1['register_ip'] = $user['register_ip'];
|
|
|
|
|
$value1['login_ip'] = $user['login_ip'];
|
|
|
|
|
$value1['device_number'] = $user['device_number'];
|
|
|
|
|
} else {
|
|
|
|
|
$value1['register_time'] = '--';
|
|
|
|
|
$value1['login_time'] = '--';
|
|
|
|
|
$value1['register_ip'] = '--';
|
|
|
|
|
$value1['login_ip'] = '--';
|
|
|
|
|
$value1['device_number'] = '--';
|
|
|
|
|
}
|
|
|
|
|
$xlsData[] = $value1;
|
|
|
|
|
}
|
|
|
|
|
$this->exportExcel($xlsName, $xlsCell, $xlsData,$id);
|
|
|
|
|
}
|
|
|
|
|