diff --git a/Application/Home/Common/function.php b/Application/Home/Common/function.php index 1fb3c1774..2827ba43b 100644 --- a/Application/Home/Common/function.php +++ b/Application/Home/Common/function.php @@ -1197,4 +1197,19 @@ function promoteCan($promoteId, \Closure $callback) function getChildGameAddPermission($promoteId) { return D('Promote')->where(array('id' => $promoteId))->getField('child_game_permission'); +} + +function gameSearch($relationGameId, $sdkVersion) +{ + $map = '1 = 1'; + if ($relationGameId != 0) { + $map['relation_game_id'] = $relationGameId; + } + if ($sdkVersion != 0) { + $map['sdk_version'] = $sdkVersion; + } + $gameIds = M('game', 'tab_')->where($map)->getField('id', true); + $gameIds = $gameIds ?? [-1]; + + return $gameIds; } \ No newline at end of file diff --git a/Application/Home/Controller/DownloadController.class.php b/Application/Home/Controller/DownloadController.class.php index 7fb7f3c61..012598ebe 100644 --- a/Application/Home/Controller/DownloadController.class.php +++ b/Application/Home/Controller/DownloadController.class.php @@ -1188,6 +1188,9 @@ class DownloadController extends BaseController { $gameMap['sdk_version'] = $sdkVersion; } $gameId1 = M('game', 'tab_')->where($gameMap)->getField('id', true); + if(empty($gameId1)) { + $gameId1 = [-100]; + } $map['game_id'] = ['in', $gameId1]; } empty(I('server_id')) || $map['tab_pay_info.server_id'] = I('server_id'); @@ -1382,6 +1385,9 @@ class DownloadController extends BaseController { $gameMap['sdk_version'] = $sdkVersion; } $gameId1 = M('game', 'tab_')->where($gameMap)->getField('id', true); + if(empty($gameId1)) { + $gameId1 = [-100]; + } $map['game_id'] = ['in', $gameId1]; $subMap['game_id'] = ['in', $gameId1]; } @@ -1504,6 +1510,9 @@ class DownloadController extends BaseController { $gameMap['sdk_version'] = $sdkVersion; } $gameId1 = M('game', 'tab_')->where($gameMap)->getField('id', true); + if(empty($gameId1)) { + $gameId1 = [-100]; + } $map['game_id'] = ['in', $gameId1]; } if ($serverId > 0) { @@ -1603,6 +1612,9 @@ class DownloadController extends BaseController { $gameMap['sdk_version'] = $sdkVersion; } $gameId1 = M('game', 'tab_')->where($gameMap)->getField('id', true); + if(empty($gameId1)) { + $gameId1 = [-100]; + } $map['game_id'] = ['in', $gameId1]; } if ($serverId != 0) { @@ -1896,11 +1908,11 @@ class DownloadController extends BaseController { ->limit(($i-1)*$perSize ,$perSize)->select(); 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(); + $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(); - $v['promote_id']= $promoteInfo['nickname']; + $v['promote_id']= $promoteInfo['account']; $csvData['extend'] = $this->encryption($v['extend']); $csvData['create_time'] = $v['create_time']; $csvData['user_account'] = $v['user_account']; diff --git a/Application/Home/Controller/PlayersController.class.php b/Application/Home/Controller/PlayersController.class.php index f067ef786..2162efa41 100644 --- a/Application/Home/Controller/PlayersController.class.php +++ b/Application/Home/Controller/PlayersController.class.php @@ -42,6 +42,9 @@ class PlayersController extends BaseController { $gameMap['sdk_version'] = $sdkVersion; } $gameId = M('game', 'tab_')->where($gameMap)->getField('id', true); + if(empty($gameId)) { + $gameId = [100000]; + } $map['game_id'] = ['in', $gameId]; } if (!empty($serverId)) { @@ -89,8 +92,8 @@ class PlayersController extends BaseController { //分页 $parameter['p'] = $page; $parameter['row'] = $row; - $parameter['begtime'] = $initBegTime; - $parameter['endtime'] = $initEndTime; + $parameter['begtime'] = I('begtime'); + $parameter['endtime'] = I('endtime'); $parameter['relation_game_id'] = $relationGameId; $parameter['sdk_version'] = $sdkVersion; $parameter['server_id'] = $serverId; diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php index 9af3fa9a9..a5aaf12bb 100644 --- a/Application/Home/Controller/QueryController.class.php +++ b/Application/Home/Controller/QueryController.class.php @@ -1678,14 +1678,8 @@ class QueryController extends BaseController } if ($relationGameId != 0 || $sdkVersion != 0) { - if ($relationGameId != 0) { - $gameMap['relation_game_id'] = $relationGameId; - } - if ($sdkVersion != 0) { - $gameMap['sdk_version'] = $sdkVersion; - } - $gameId = M('game', 'tab_')->where($gameMap)->getField('id', true); - $map['game_id'] = ['in', $gameId]; + $gameIds = gameSearch($relationGameId, $sdkVersion); + $map['game_id'] = ['in', $gameIds]; } if ($serverId != 0) { $map['server_id'] = $serverId; @@ -1791,16 +1785,9 @@ class QueryController extends BaseController $subMap = ['promote_id' => ['in', $ids]]; if ($relationGameId != 0 || $sdkVersion != 0) { - if ($relationGameId != 0) { - $gameMap['relation_game_id'] = $relationGameId; - } - if ($sdkVersion != 0) { - $gameMap['sdk_version'] = $sdkVersion; - } - $gameId = M('game', 'tab_')->where($gameMap)->getField('id', true); - - $map['uc.game_id'] = ['in', $gameId]; - $subMap['game_id'] = ['in', $gameId]; + $gameIds = gameSearch($relationGameId, $sdkVersion); + $map['uc.game_id'] = ['in', $gameIds]; + $subMap['game_id'] = ['in', $gameIds]; } if ($serverId != 0) { $map['uc.server_id'] = $serverId; @@ -1894,7 +1881,6 @@ class QueryController extends BaseController foreach ($records as &$list) { if (empty($list['user_account']) ) { $list['user_account'] = M('user', 'tab_')->where("id = {$list['user_id']}")->getField('account'); - $list['user_account'] = empty($list['user_account']) ? '--' : encryption($list['user_account']); } $list['user_account'] = empty($list['user_account']) ? '--' : encryption($list['user_account']); $list['game_name'] = empty($list['game_name']) ? '--' : $list['game_name']; @@ -2079,14 +2065,8 @@ class QueryController extends BaseController 'basicPromotes' => $basicPromotes, ]; if ($relationGameId != 0 || $sdkVersion != 0) { - if ($relationGameId != 0) { - $gameMap['relation_game_id'] = $relationGameId; - } - if ($sdkVersion != 0) { - $gameMap['sdk_version'] = $sdkVersion; - } - $gameId = M('game', 'tab_')->where($gameMap)->getField('id', true); - $params['game_id'] = ['in', $gameId]; + $gameIds = gameSearch($relationGameId, $sdkVersion); + $params['game_id'] = ['in', $gameIds]; } if ($serverId > 0) { $params['server_id'] = $serverId; diff --git a/Application/Home/View/default/Home/landingPage.html b/Application/Home/View/default/Home/landingPage.html index b9b47fe62..eebc796f7 100644 --- a/Application/Home/View/default/Home/landingPage.html +++ b/Application/Home/View/default/Home/landingPage.html @@ -261,7 +261,7 @@
¥10至尊下载
-
¥10至尊下载
+
¥10至尊下载
diff --git a/Application/Home/View/default/Query/userRecharges.html b/Application/Home/View/default/Query/userRecharges.html index 5fedd4150..541918ba3 100644 --- a/Application/Home/View/default/Query/userRecharges.html +++ b/Application/Home/View/default/Query/userRecharges.html @@ -159,7 +159,7 @@ - 注册时间 + 注册时间