From a56d861053357a1c3a096578cad44a19d2bf97d6 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Mon, 20 Apr 2020 14:17:36 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B8=B8=E6=88=8F?= =?UTF-8?q?=E5=88=97=E8=A1=A8bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Home/Controller/GameController.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Application/Home/Controller/GameController.class.php b/Application/Home/Controller/GameController.class.php index 61de417e1..0c8873e3d 100644 --- a/Application/Home/Controller/GameController.class.php +++ b/Application/Home/Controller/GameController.class.php @@ -81,6 +81,9 @@ class GameController extends BaseController $conditions['offline_status'] = 0; } + if (count($gameIds) == 0) { + $gameIds = [0]; + } $conditions['server_type'] = $serverType; $conditions['id'] = ['in', $gameIds]; $conditions['game_status'] = 1; From 99ac9965d9af259267d60364a48f764ae931d4da Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Mon, 20 Apr 2020 14:33:13 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Home/Controller/GameController.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Application/Home/Controller/GameController.class.php b/Application/Home/Controller/GameController.class.php index 0c8873e3d..c3e505a2d 100644 --- a/Application/Home/Controller/GameController.class.php +++ b/Application/Home/Controller/GameController.class.php @@ -288,10 +288,10 @@ class GameController extends BaseController $promoteService = new PromoteService(); $gameIds = $promoteService->getVisibleGameIds($loginPromote); $conditions = []; - if ($gameIds !== true) { + if ($gameIds && count($gameIds) > 0) { $conditions = ['_logic' => 'or', 'android_game_id' => ['in', $gameIds], 'ios_game_id' => ['in', $gameIds]]; } else { - $conditions = '1=1'; + $conditions = '1<>1'; } $games = M('base_game', 'tab_')->where($conditions)->select();