From 07f7bca3ee17e13926aebed838b33c4c5716bcf5 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Thu, 12 Nov 2020 10:34:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/TestingResourceController.class.php | 1 + Application/Admin/View/TestingResource/index.html | 8 ++++++++ .../Repository/TestingResourceRepository.class.php | 14 +++++++++++--- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/Application/Admin/Controller/TestingResourceController.class.php b/Application/Admin/Controller/TestingResourceController.class.php index cef4675da..1946fa047 100644 --- a/Application/Admin/Controller/TestingResourceController.class.php +++ b/Application/Admin/Controller/TestingResourceController.class.php @@ -26,6 +26,7 @@ class TestingResourceController extends ThinkController $gameRepository = new GameRepository(); + $this->assign('statusList', TestingResourceRepository::$userStatusList); $this->assign('games', $gameRepository->getChoiceGames()); $this->assign('servers', $gameRepository->getServersByGameId($gameId)); $this->assign('count', $count); diff --git a/Application/Admin/View/TestingResource/index.html b/Application/Admin/View/TestingResource/index.html index 7d82a6907..a0ba8f644 100644 --- a/Application/Admin/View/TestingResource/index.html +++ b/Application/Admin/View/TestingResource/index.html @@ -113,6 +113,14 @@ +
+ +
搜索
diff --git a/Application/Base/Repository/TestingResourceRepository.class.php b/Application/Base/Repository/TestingResourceRepository.class.php index 21d81347a..f9315dc8f 100644 --- a/Application/Base/Repository/TestingResourceRepository.class.php +++ b/Application/Base/Repository/TestingResourceRepository.class.php @@ -360,13 +360,17 @@ class TestingResourceRepository $statusText = '正常'; if (is_null($user) || is_null($testingUser)) { $statusText = '错误'; - } elseif ($user['lock_status'] != 1) { - $statusText = '锁定'; } elseif ($testingUser['status'] == 2) { $statusText = '警告'; } elseif ($testingUser['status'] == 3) { $statusText = '禁用'; - } + } + + if (is_null($user)) { + $statusText .= '(账号不存在)'; + } elseif ($user['lock_status'] != 1) { + $statusText .= '(账号锁定)'; + } $records[] = [ 'id' => $role['id'], @@ -401,6 +405,7 @@ class TestingResourceRepository $gameId = $params['game_id'] ?? 0; $serverId = $params['server_id'] ?? ''; $account = $params['account'] ?? ''; + $status = $params['status'] ?? 0; $roleName = $params['role_name'] ?? ''; $conditions = []; @@ -434,6 +439,9 @@ class TestingResourceRepository if ($createTimeEnd) { $strCondition .= ' and create_time <=' . strtotime($createTimeEnd . ' 23:59:59'); } + if ($status != 0) { + $subConditions['status'] = $status; + } $subConditions['verify_status'] = 1; $subSql = M('testing_user', 'tab_')->field(['user_id'])->where($subConditions)->select(false);