master
ELF 4 years ago
parent e5d4c2e231
commit 7bb9aa833c

@ -441,9 +441,18 @@ class TestingResourceService
$bindingRole = null;
if ($binding) {
$gameRepository = new GameRepository();
$baseGames = $gameRepository->getBaseGames();
$gameIds = [$gameId];
if ($game['data_share'] == 1) {
$baseGame = $gameRepository->getBaseGameByGameId($gameId, $baseGames);
$gameIds = $gameRepository->getGameIdsByBaseGame($baseGame);
}
$bindingRole = M('user_play_info', 'tab_')
->field(['id', 'role_id', 'user_id', 'promote_id', 'game_id'])
->where(['game_id' => $gameId, 'role_id' => $binding['bind_role_id']])
->where(['game_id' => ['in', $gameIds], 'role_id' => $binding['bind_role_id']])
->find();
if (is_null($bindingRole)) {
throw new \Exception('绑定玩家角色不存在');

Loading…
Cancel
Save