From 585057f98e642dd609804c15d8aec72a45c46fec Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Mon, 25 Nov 2019 16:24:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=B9=B3=E5=8F=B0-=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E7=AE=A1=E7=90=86->=E8=A7=92=E8=89=B2=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2|=E5=85=85=E5=80=BC=E7=8E=A9=E5=AE=B6|=E5=9B=A2?= =?UTF-8?q?=E9=98=9F/=E6=8E=A8=E5=B9=BF=E5=91=98=E4=B8=9A=E7=BB=A9--?= =?UTF-8?q?=E6=A3=80=E7=B4=A2=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/Controller/QueryController.class.php | 61 +++++++++------ .../Home/View/default/Query/achievement.html | 74 ++++++++++--------- .../View/default/Query/userRecharges.html | 32 ++++---- .../Home/View/default/Query/userRoles.html | 74 ++++++++++--------- 4 files changed, 131 insertions(+), 110 deletions(-) diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php index 59b2f1a13..50e8def6c 100644 --- a/Application/Home/Controller/QueryController.class.php +++ b/Application/Home/Controller/QueryController.class.php @@ -1603,7 +1603,7 @@ class QueryController extends BaseController public function userRoles() { - $gameId = I('game_id', 0); + $relationGameId = I('relation_game_id', 0); $serverId = I('server_id', 0); $isSelf = I('is_self', 0); $roleName = I('role_name', ''); @@ -1633,8 +1633,13 @@ class QueryController extends BaseController $map['_string'] = '1<>1'; } - if ($gameId != 0) { - $map['game_id'] = $gameId; + 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]; } if ($serverId != 0) { $map['server_id'] = $serverId; @@ -1645,9 +1650,6 @@ class QueryController extends BaseController if ($userAccount != '') { $map['user_account'] = ['like', '%' . $userAccount . '%']; } - if ($sdkVersion != 0) { - $map['sdk_version'] = $sdkVersion; - } if ($roleLevelBegin != 0 && $roleLevelEnd == 0) { $map['role_level'] = ['egt', $roleLevelBegin]; } elseif ($roleLevelEnd != 0 && $roleLevelBegin == 0) { @@ -1693,7 +1695,7 @@ class QueryController extends BaseController } - $games = $this->getGamesByPromote($promote); + $games = get_promote_serach_game(); $this->assign('games', $games); $this->assign('records', $records); @@ -1704,7 +1706,7 @@ class QueryController extends BaseController public function userRecharges() { - $gameId = I('game_id', 0); + $relationGameId = I('relation_game_id', 0); $serverId = I('server_id', 0); $isSelf = I('is_self', 0); $roleName = I('role_name', ''); @@ -1748,9 +1750,14 @@ class QueryController extends BaseController } $subMap = []; - if ($gameId != 0) { - $map['game_id'] = $gameId; - $subMap['game_id'] = $gameId; + 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]; + $subMap['game_id'] = ['in', $gameId]; } if ($serverId != 0) { $map['server_id'] = $serverId; @@ -1762,9 +1769,6 @@ class QueryController extends BaseController if ($userAccount != '') { $map['user_account'] = ['like', '%' . $userAccount . '%']; } - if ($sdkVersion != 0) { - $map['sdk_version'] = $sdkVersion; - } if ($isSelf) { $map['promote_id'] = $queryPromote['id']; } @@ -1865,7 +1869,7 @@ class QueryController extends BaseController } } - $games = $this->getGamesByPromote($promote); + $games = get_promote_serach_game(); $this->assign('games', $games); $this->assign('records', $records); @@ -1894,7 +1898,16 @@ class QueryController extends BaseController public function getGameServers() { $gameId = I('game_id', 0); - $servers = M('server', 'tab_')->field(['id', 'server_id', 'server_name'])->where(['game_id' => $gameId])->order('server_id asc')->select(); + $sdkVersion = I('sdk_version', 0); + $servers = []; + if (!empty($gameId)) { + $map['relation_game_id'] = $gameId; + if (in_array($sdkVersion, [1, 2])) { + $map['sdk_version'] = $sdkVersion; + } + $gameIds = M('game', 'tab_')->where($map)->getField('id', true); + $servers = M('server', 'tab_')->field(['id', 'server_id', 'server_name'])->where(['game_id' => ['in', $gameIds]])->order('server_id asc')->select(); + } $this->ajaxReturn([ 'status' => 1, 'msg' => '成功', @@ -1965,7 +1978,7 @@ class QueryController extends BaseController $defaultTime = date('Y-m-d', time()); } $sdkVersion = I('sdk_version', 0); - $gameId = I('game_id', 0); + $relationGameId = I('relation_game_id', 0); $serverId = I('server_id', 0); $parentId = I('parent_id', 0); $promoteId = I('promote_id', 0); @@ -1990,7 +2003,7 @@ class QueryController extends BaseController $searchLevel = $parent['level'] + 1; $searchLevelName = $promoteService->getLevelName($searchLevel); - $games = $this->getGamesByPromote($parent); + $games = get_promote_serach_game(); $subPromotes = M('promote', 'tab_')->field(['id', 'account', 'real_name'])->where(['parent_id' => $parent['id']])->select(); @@ -2024,15 +2037,17 @@ class QueryController extends BaseController 'isContainSubs' => true, 'basicPromotes' => $basicPromotes, ]; - if ($gameId > 0) { - $params['game_id'] = $gameId; + 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]; } if ($serverId > 0) { $params['server_id'] = $serverId; } - if ($sdkVersion > 0) { - $params['sdk_version'] = $sdkVersion; - } if ($status > 0) { $params['lock_status'] = $status; } diff --git a/Application/Home/View/default/Query/achievement.html b/Application/Home/View/default/Query/achievement.html index 68699376b..06106905f 100644 --- a/Application/Home/View/default/Query/achievement.html +++ b/Application/Home/View/default/Query/achievement.html @@ -26,25 +26,25 @@