|
|
@ -340,7 +340,7 @@ class TestingResourceService
|
|
|
|
|
|
|
|
|
|
|
|
$existBindCount = M('testing_binding', 'tab_')->where(['game_id' => ['in', $gameIds], 'bind_role_id' => $bindRoleId])->count();
|
|
|
|
$existBindCount = M('testing_binding', 'tab_')->where(['game_id' => ['in', $gameIds], 'bind_role_id' => $bindRoleId])->count();
|
|
|
|
if ($existBindCount >= 2) {
|
|
|
|
if ($existBindCount >= 2) {
|
|
|
|
throw new \Exception('同一游戏最多只能绑定两个角色');
|
|
|
|
throw new \Exception('同一角色最多只能被绑定两次');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$testExistBind = M('testing_binding', 'tab_')->field(['id'])->where(['game_id' => ['in', $gameIds], 'role_id' => $testingRoleId])->find();
|
|
|
|
$testExistBind = M('testing_binding', 'tab_')->field(['id'])->where(['game_id' => ['in', $gameIds], 'role_id' => $testingRoleId])->find();
|
|
|
|