行为日志导出错误修改

master
zhengyongxing 5 years ago
parent 25954045e9
commit 10f2f4b210

@ -160,7 +160,7 @@ class UserActionLogController extends AdminController
/* 获取频道列表 */
$xlsData = M('user_action_log','tab_')
->field("id,action,game_name,account,create_time,ip")
->field("id,action,game_name,account,create_time,ip,type,remarks")
->where($map)
->limit(($i-1)*$perSize ,$perSize)
->order('create_time DESC')->select();
@ -169,6 +169,25 @@ class UserActionLogController extends AdminController
$value['create_time'] = date("Y-m-d H:i:s", $value['create_time']);
$remarks = json_decode($value['remarks'],true);
// dump($data);
if ($value['type'] == 3) {
$value['action'] = '登录 '.($remarks['server_name']?$remarks['server_name']:'无').'-'.($remarks['role_name']?$remarks['role_name']:'无').'-'.($remarks['role_level']?$remarks['role_level']:'无');
} else if ($value['type'] == 4) {
$value['action'] = '退出 '.($remarks['server_name']?$remarks['server_name']:'无').'-'.($remarks['role_name']?$remarks['role_name']:'无').'-'.($remarks['role_level']?$remarks['role_level']:'无');
} else if ($value['type'] == 0) {
$value['action'] = '修改密码';
} else if ($value['type'] == 1) {
$value['action'] = '修改/绑定手机号';
} else if ($value['type'] == 2) {
$value['action'] = '修改身份信息';
} else if ($value['type'] == 5) {
$value['action'] = '上报角色 '.($remarks['server_name']?$remarks['server_name']:'无').'-'.($remarks['role_name']?$remarks['role_name']:'无').'-'.($remarks['role_level']?$remarks['role_level']:'无');
}
unset($value['type']);
unset($value['remarks']);
mb_convert_variables('GBK', 'UTF-8', $value);
fputcsv($fp, $value);

Loading…
Cancel
Save