From 1cd4e94840cfd801184966c1e05c84b635a83fa9 Mon Sep 17 00:00:00 2001 From: sunke <18850253506@163.com> Date: Thu, 19 Dec 2019 14:01:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E5=B8=81=E5=85=85=E5=80=BC?= =?UTF-8?q?=E5=8C=BA=E6=9C=8D=E9=9A=90=E8=97=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/Controller/DownloadController.class.php | 15 ++++++++++----- .../Home/Controller/PlayersController.class.php | 13 +++++++++---- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/Application/Home/Controller/DownloadController.class.php b/Application/Home/Controller/DownloadController.class.php index 64a0138bb..e63c0e3cb 100644 --- a/Application/Home/Controller/DownloadController.class.php +++ b/Application/Home/Controller/DownloadController.class.php @@ -1909,9 +1909,14 @@ 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("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(); + if($v['server_id'] != 0) { + $serverId1 = $v['server_id']; + $gameId = $v['game_id']; + $serverInfo = M('server','tab_')->field('server_name')->where(['server_num'=>$serverId1,'game_id'=>$gameId])->find(); + $servername = $serverInfo['server_name']; + }else { + $servername = ""; + } $v['promote_id']= $promoteInfo['account']; if(empty($v['extend'])) { $v['extend'] = $v['order_id']; @@ -1921,7 +1926,7 @@ class DownloadController extends BaseController { $csvData['user_account'] = $v['user_account']; $csvData['game_name'] = $v['game_name']; $csvData['promote_id'] = $v['promote_id']; - $csvData['server_name'] = $serverInfo['server_name']; + $csvData['server_name'] = $servername; $csvData['user_id'] = $v['game_player_id']; $csvData['game_player_name'] = $v['game_player_name']; $csvData['price'] = $v['price']; @@ -1975,7 +1980,7 @@ class DownloadController extends BaseController { ->field('account,device_number,promote_account,register_time,register_ip,login_time,login_ip') ->where($map) ->limit(($i-1)*$perSize ,$perSize) - ->order('tab_user.id desc') + ->order('tab_user.id desc') ->select(); foreach($data as $value1) { $csvData['account'] = $this->encryption($value1['account']); diff --git a/Application/Home/Controller/PlayersController.class.php b/Application/Home/Controller/PlayersController.class.php index 4ae5e27b7..950edaee1 100644 --- a/Application/Home/Controller/PlayersController.class.php +++ b/Application/Home/Controller/PlayersController.class.php @@ -80,10 +80,15 @@ class PlayersController extends BaseController { $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("account")->where(['id' => intval($v['promote_id'])])->find(); - $serverId1 = $v['server_id']; - $gameId = $v['game_id']; - $serverInfo = M('server','tab_')->field('server_name')->where(['server_num'=>$serverId1,'game_id'=>$gameId])->find(); - $rs[$key]['server_name'] = $serverInfo['server_name']; + if($v['server_id'] != 0) { + $serverId1 = $v['server_id']; + $gameId = $v['game_id']; + $serverInfo = M('server','tab_')->field('server_name')->where(['server_num'=>$serverId1,'game_id'=>$gameId])->find(); + $rs[$key]['server_name'] = $serverInfo['server_name']; + }else { + $rs[$key]['server_name'] = ""; + } + $rs[$key]['promote_id']= $promoteInfo['account']; }