master
ELF 4 years ago
parent 0c4211a951
commit df933cc6b1

@ -2879,7 +2879,14 @@ public function iosDetailExcelInfo($id,$map) {
$xlsCell = array( $xlsCell = array(
array('user_account','玩家账号'), array('user_account','玩家账号'),
array('promote_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('server_name','区服'),
array('role_name','游戏昵称'), array('role_name','游戏昵称'),
array('role_level','等级'), array('role_level','等级'),
@ -2887,12 +2894,38 @@ public function iosDetailExcelInfo($id,$map) {
); );
$records = recordPromoteLogs('数据管理','角色查询导出'); $records = recordPromoteLogs('数据管理','角色查询导出');
$model = M('user_play_info','tab_'); $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 = []; $xlsData = [];
foreach ($data as $key1 => $value1) { foreach ($data as $key1 => $value1) {
$value1['user_account'] = $this->encryption($value1['user_account']); $value1['user_account'] = $this->encryption($value1['user_account']);
$value1['create_time'] = date('Y-m-d H:i:s',$value1['create_time']); if($value1['create_time'] == 0) {
$xlsData[] = $value1; $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); $this->exportExcel($xlsName, $xlsCell, $xlsData,$id);
} }

@ -1739,24 +1739,48 @@ class QueryController extends BaseController
} }
$query = M('user_play_info', 'tab_')->where($map)->order('create_time desc'); $query = M('user_play_info', 'tab_')->where($map)->order('create_time desc');
list($records, $pagination, $count) = $this->paginate($query); list($records, $pagination, $count) = $this->paginate($query);
// var_dump($records);die();
$users = [];
if (count($records) > 0) {
$userIds = array_column($records, '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);
}
foreach ($records as $key => $value) { foreach ($records as $key => $value) {
//订单隐藏算法 //订单隐藏算法
$orderLen = strlen($value['user_account']); $orderLen = strlen($value['user_account']);
$strLen = 3; $strLen = 3;
$hideChar = ''; $hideChar = '';
if ($orderLen <= 8) { if ($orderLen <= 8) {
$strLen = 2; $strLen = 2;
} }
for ($i = 0; $i < $orderLen - $strLen * 2; $i++) { for ($i = 0; $i < $orderLen - $strLen * 2; $i++) {
$hideChar .= '*'; $hideChar .= '*';
} }
if($record['create_time'] == 0) {
$records[$key]['create_time'] = date('Y-m-d', $value['play_time']) . '<br>' . date('H:i:s', $value['play_time']);
} else {
$records[$key]['create_time'] = date('Y-m-d', $value['create_time']) . '<br>' . date('H:i:s', $value['create_time']);
}
$records[$key]['user_account'] = substr($value['user_account'], 0, $strLen) . $hideChar . substr($value['user_account'], $orderLen - $strLen); $records[$key]['user_account'] = substr($value['user_account'], 0, $strLen) . $hideChar . substr($value['user_account'], $orderLen - $strLen);
if (isset($users[$value['user_id']])) {
$user = $users[$value['user_id']];
$records[$key]['register_time'] = date('Y-m-d', $user['register_time']) . '<br>' . date('H:i:s', $user['register_time']);
$records[$key]['login_time'] = date('Y-m-d', $user['login_time']) . '<br>' . date('H:i:s', $user['login_time']);
$records[$key]['register_ip'] = $user['register_ip'];
$records[$key]['login_ip'] = $user['login_ip'];
$records[$key]['device_number'] = $user['device_number'];
} else {
$records[$key]['register_time'] = '--';
$records[$key]['login_time'] = '--';
$records[$key]['register_ip'] = '--';
$records[$key]['login_ip'] = '--';
$records[$key]['device_number'] = '--';
}
} }
$games = get_promote_serach_game(); $games = get_promote_serach_game();

@ -74,6 +74,13 @@
<th>玩家帐号</th> <th>玩家帐号</th>
<th>推广账号</th> <th>推广账号</th>
<th>游戏名称</th> <th>游戏名称</th>
<th>设备码</th>
<th>注册时间</th>
<th>注册IP</th>
<th>最近登录时间</th>
<th>最近登录IP</th>
<th>平台</th> <th>平台</th>
<th>游戏区服</th> <th>游戏区服</th>
<th>角色名</th> <th>角色名</th>
@ -88,17 +95,18 @@
<td>{$record.user_account}</td> <td>{$record.user_account}</td>
<td>{$record.promote_account}</td> <td>{$record.promote_account}</td>
<td>{$record.game_name}</td> <td>{$record.game_name}</td>
<td>{$record.device_number}</td>
<td>{$record.register_time}</td>
<td>{$record.register_ip}</td>
<td>{$record.login_time}</td>
<td>{$record.login_ip}</td>
<td>{:getSDKTypeName($record['sdk_version'])}</td> <td>{:getSDKTypeName($record['sdk_version'])}</td>
<td>{$record.server_name}</td> <td>{$record.server_name}</td>
<td>{$record.role_name}</td> <td>{$record.role_name}</td>
<td>{$record.role_level}</td> <td>{$record.role_level}</td>
<td> <td>{$record.create_time}</td>
<?php if($record['create_time'] == 0):?>
{$record.play_time|date='Y-m-d H:i:s',###}
<?php else:?>
{$record.create_time|date='Y-m-d H:i:s',###}
<?php endif;?>
</td>
</tr> </tr>
</volist> </volist>
</empty> </empty>

@ -393,6 +393,9 @@ input,select,button{outline:none;font-size:14px;font-family:inherit;}
padding: 0 15px; padding: 0 15px;
} }
.normal_table tr td {
padding: 5px 0px;
}
.normal_table tr td a { .normal_table tr td a {
color: #06C color: #06C
} }

Loading…
Cancel
Save