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