diff --git a/Application/Home/Controller/DownloadController.class.php b/Application/Home/Controller/DownloadController.class.php index 468fbd5f1..7fb7f3c61 100644 --- a/Application/Home/Controller/DownloadController.class.php +++ b/Application/Home/Controller/DownloadController.class.php @@ -1897,13 +1897,16 @@ class DownloadController extends BaseController { foreach($data as $key => $v) { $v['create_time'] = date('Y-m-d H:i:s',$v['create_time']); $promoteInfo = M('promote','tab_')->field("nickname")->where(['id' => intval($v['promote_id'])])->find(); + $serverId = $v['server_id']; + $gameId = $v['game_id']; + $serverInfo = M('server','tab_')->field('server_name')->where(['server_num'=>$serverId,'game_id'=>$gameId])->find(); $v['promote_id']= $promoteInfo['nickname']; $csvData['extend'] = $this->encryption($v['extend']); $csvData['create_time'] = $v['create_time']; $csvData['user_account'] = $v['user_account']; $csvData['game_name'] = $v['game_name']; $csvData['promote_id'] = $v['promote_id']; - $csvData['server_name'] = $v['server_name']; + $csvData['server_name'] = $serverInfo['server_name']; $csvData['user_id'] = $v['game_player_id']; $csvData['game_player_name'] = $v['game_player_name']; $csvData['price'] = $v['price']; diff --git a/Application/Home/Controller/PlayersController.class.php b/Application/Home/Controller/PlayersController.class.php index 742c5b773..f067ef786 100644 --- a/Application/Home/Controller/PlayersController.class.php +++ b/Application/Home/Controller/PlayersController.class.php @@ -22,7 +22,7 @@ class PlayersController extends BaseController { $userId = trim(I('user_id', '')); $extend = trim(I('extend', '')); //cp订单号 $begTime = strtotime(I('begtime')); - $endTime = strtotime(I('endtime')) + 24*3600; + $endTime = strtotime(I('endtime')); $levelPromote = $this->getLevelPromote(); $queryPromote = $this->getQueryPromote($levelPromote); // $loginPromote = $this->getLoginPromote(); @@ -60,11 +60,11 @@ class PlayersController extends BaseController { $map['tab_pay_info.game_player_id'] = $userId; } if (!empty($begTime) && !empty($endTime)) { - $map['tab_pay_info.create_time'] = ['between', [$begTime, $endTime - 1]]; + $map['tab_pay_info.create_time'] = ['between', [$begTime, $endTime + 24*3600 - 1]]; }else if (empty($begTime) && !empty($endTime)) { - $map['tab_pay_info.create_time'] = ['elt',$endTime]; + $map['tab_pay_info.create_time'] = ['elt',$endTime + 24*3600]; }else if (!empty($begTime) && empty($endTime)) { - $map['tab_pay_info.create_time'] = ['EGT',$begTime]; + $map['tab_pay_info.create_time'] = ['EGT',$begTime + 24*3600]; } $page = intval(I('get.p', 1)); $page = $page ? $page : 1; //默认显示第一页数据arraypage @@ -73,8 +73,12 @@ class PlayersController extends BaseController { foreach($rs as $key => $v) { $rs[$key]['extend'] = encryption($v['extend']); $rs[$key]['create_time'] = date('Y-m-d H:i:s',$v['create_time']); - $promoteInfo = M('promote','tab_')->field("nickname")->where(['id' => intval($v['promote_id'])])->find(); - $rs[$key]['promote_id']= $promoteInfo['nickname']; + $promoteInfo = M('promote','tab_')->field("account")->where(['id' => intval($v['promote_id'])])->find(); + $serverId = $v['server_id']; + $gameId = $v['game_id']; + $serverInfo = M('server','tab_')->field('server_name')->where(['server_num'=>$serverId,'game_id'=>$gameId])->find(); + $rs[$key]['server_name'] = $serverInfo['server_name']; + $rs[$key]['promote_id']= $promoteInfo['account']; } $count = M('pay_info', 'tab_') ->field('tab_pay_info.id')