master
ELF 4 years ago
parent 75754a8957
commit 2dc69ac892

@ -2975,7 +2975,7 @@ public function iosDetailExcelInfo($id,$map) {
public function playactionExcelInfo($id,$map) { public function playactionExcelInfo($id,$map) {
$xlsName = "玩家行为日志"; $xlsName = "玩家行为日志";
$xlsCell = array( $xlsCell = array(
'cp订单号', // 'cp订单号',
'充值时间', '充值时间',
'玩家账号', '玩家账号',
'游戏名称', '游戏名称',
@ -2986,7 +2986,7 @@ public function iosDetailExcelInfo($id,$map) {
'订单金额' '订单金额'
); );
$model = M('pay_info','tab_'); $model = M('pay_info','tab_');
$data1 = $model->field('id')->where($map)->select(); $count = M('pay_info','tab_')->field('id')->where($map)->count();
$csvFileName = $xlsName.'.csv'; $csvFileName = $xlsName.'.csv';
//设置好告诉浏览器要下载excel文件的headers //设置好告诉浏览器要下载excel文件的headers
header('Content-Description: File Transfer'); header('Content-Description: File Transfer');
@ -2999,7 +2999,7 @@ public function iosDetailExcelInfo($id,$map) {
mb_convert_variables('gb2312', 'UTF-8', $xlsCell); mb_convert_variables('gb2312', 'UTF-8', $xlsCell);
fputcsv($fp, $xlsCell);//将数据格式化为CSV格式并写入到output流中 fputcsv($fp, $xlsCell);//将数据格式化为CSV格式并写入到output流中
$accessNum = '100000';//从数据库获取总量,假设是十万 $accessNum = '100000';//从数据库获取总量,假设是十万
$accessNum = count($data1)?:0 ; $accessNum = $count ?? 0;
$perSize = 5000;//每次查询的条数 $perSize = 5000;//每次查询的条数
$pages = ceil($accessNum / $perSize); $pages = ceil($accessNum / $perSize);
for($i = 1; $i <= $pages; $i++) { for($i = 1; $i <= $pages; $i++) {
@ -3012,10 +3012,10 @@ public function iosDetailExcelInfo($id,$map) {
$gameId = $v['game_id']; $gameId = $v['game_id'];
$serverInfo = M('server','tab_')->field('server_name')->where(['server_num'=>$serverId,'game_id'=>$gameId])->find(); $serverInfo = M('server','tab_')->field('server_name')->where(['server_num'=>$serverId,'game_id'=>$gameId])->find();
$v['promote_id']= $promoteInfo['account']; $v['promote_id']= $promoteInfo['account'];
if(empty($v['extend'])) { /* if(empty($v['extend'])) {
$v['extend'] = $v['order_id']; $v['extend'] = $v['order_id'];
} } */
$csvData['extend'] = $this->encryption($v['extend']); // $csvData['extend'] = $this->encryption($v['extend']);
$csvData['create_time'] = $v['create_time']; $csvData['create_time'] = $v['create_time'];
$csvData['user_account'] = $this->encryption($v['user_account']); $csvData['user_account'] = $this->encryption($v['user_account']);
$csvData['game_name'] = $v['game_name']; $csvData['game_name'] = $v['game_name'];

@ -98,8 +98,8 @@ class PlayersController extends BaseController {
$count = M('pay_info', 'tab_') $count = M('pay_info', 'tab_')
->field('tab_pay_info.id') ->field('tab_pay_info.id')
->where($map) ->where($map)
->select(); ->count();
$count = count($count); $count = intval($count);
//分页 //分页
$parameter['p'] = $page; $parameter['p'] = $page;

@ -288,7 +288,6 @@ class QueryController extends BaseController
->where($map) ->where($map)
->count(); ->count();
} }
if (!empty($data)) { if (!empty($data)) {
foreach ($data as &$list) { foreach ($data as &$list) {
$loginMap['user_id'] = $list['id']; $loginMap['user_id'] = $list['id'];
@ -297,7 +296,7 @@ class QueryController extends BaseController
->where($loginMap) ->where($loginMap)
->order('login_time desc') ->order('login_time desc')
->find(); ->find();
$list['new_login_time'] = date('Y-m-d H:i:s', $newLoginData['login_time']); $list['new_login_time'] = date('Y-m-d H:i:s', $newLoginData['login_time']);
$list['new_login_ip'] = $newLoginData['login_ip']; $list['new_login_ip'] = $newLoginData['login_ip'];
$list['account'] = substr($list['account'], 0, 2) . '******' . substr($list['account'], 8); $list['account'] = substr($list['account'], 0, 2) . '******' . substr($list['account'], 8);

@ -130,12 +130,6 @@
</div> </div>
</div> </div>
<div class="form-group normal_space">
<input type="text" name="extend" class="txt normal_txt" placeholder="cp订单号"
value="{:I('extend')}">
</div>
<div class="form-group normal_space"> <div class="form-group normal_space">
<input type="submit" class="submit" id='submit' url="{:U('Players/playAction','model='.$model['name'],false)}" <input type="submit" class="submit" id='submit' url="{:U('Players/playAction','model='.$model['name'],false)}"
value="查询"> value="查询">
@ -151,7 +145,7 @@
<div class="tabcon trunk-list"> <div class="tabcon trunk-list">
<table class="table normal_table"> <table class="table normal_table">
<tr class="odd"> <tr class="odd">
<th>cp订单号</th> <!-- <th>cp订单号</th> -->
<th>充值时间</th> <th>充值时间</th>
<th>玩家账号</th> <th>玩家账号</th>
<th>游戏名称</th> <th>游戏名称</th>
@ -172,7 +166,6 @@
<else/> <else/>
<volist name="listData" id="vo"> <volist name="listData" id="vo">
<tr class="num2"> <tr class="num2">
<td>{$vo.extend}</td>
<td>{$vo.create_time}</td> <td>{$vo.create_time}</td>
<td>{$vo.user_account}</td> <td>{$vo.user_account}</td>
<td>{$vo.game_name}</td> <td>{$vo.game_name}</td>

Loading…
Cancel
Save