From 78a24c78f5946706b0bb52882d48a6a5ce44e68b Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Fri, 11 Jun 2021 13:58:07 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Base/Service/TestingResourceService.class.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Application/Base/Service/TestingResourceService.class.php b/Application/Base/Service/TestingResourceService.class.php index 34a5ffb69..6015fdb2b 100644 --- a/Application/Base/Service/TestingResourceService.class.php +++ b/Application/Base/Service/TestingResourceService.class.php @@ -338,12 +338,12 @@ class TestingResourceService throw new \Exception('该玩家账号为测试账号,无法绑定'); } - /* $existBind = M('testing_binding', 'tab_')->field(['id'])->where(['game_id' => $gameId, 'bind_role_id' => $bindRoleId])->find(); - if ($existBind) { - throw new \Exception('该玩家角色已被绑定'); - } */ + $existBindCount = M('testing_binding', 'tab_')->where(['game_id' => ['in', $gameIds], 'bind_role_id' => $bindRoleId])->count(); + if ($existBindCount >= 2) { + throw new \Exception('同一游戏最多只能绑定两个角色'); + } - $testExistBind = M('testing_binding', 'tab_')->field(['id'])->where(['game_id' => $gameId, 'role_id' => $testingRoleId])->find(); + $testExistBind = M('testing_binding', 'tab_')->field(['id'])->where(['game_id' => ['in', $gameIds], 'role_id' => $testingRoleId])->find(); if ($testExistBind) { throw new \Exception('该测试账号角色已绑定有角色'); } From 98c938c8143fa2e4d716481c4cd912eb78deeecd Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Fri, 11 Jun 2021 14:00:51 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Base/Tool/GameResource.class.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Application/Base/Tool/GameResource.class.php b/Application/Base/Tool/GameResource.class.php index f267e6c53..46e4a3604 100644 --- a/Application/Base/Tool/GameResource.class.php +++ b/Application/Base/Tool/GameResource.class.php @@ -30,6 +30,8 @@ class GameResource 248 => LeyouClient::class, // 剑破长空(苹果版) 275 => LeyouClient::class, // 一梦仙境(安卓版) 276 => LeyouClient::class, // 一梦仙境(苹果版) + 280 => LeyouClient::class, // 万剑八荒(安卓版) + 281 => LeyouClient::class, // 万剑八荒(苹果版) ]; public function __construct($game)