|
@@ -345,14 +345,18 @@ public class LoginServiceImpl implements IRegisterLoginService {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private User userCreateSave(UserData userData, String userName, String password, String mobile, String openId, String sessionKey) {
|
|
private User userCreateSave(UserData userData, String userName, String password, String mobile, String openId, String sessionKey) {
|
|
|
|
|
+ //获取游戏信息
|
|
|
|
|
+ Game game = gameService.getById(userData.getGameId());
|
|
|
|
|
+ //判断游戏是否禁止注册
|
|
|
|
|
+ if (Objects.equals(game.getRegisterCloseSwitch(), Boolean.TRUE)) {
|
|
|
|
|
+ throw new BaseException("注册异常,请联系客服!");
|
|
|
|
|
+ }
|
|
|
//锁Key
|
|
//锁Key
|
|
|
String lockKey = RedisKeyConstant.USER_CREATE + userData.getGameId() + "_" + userName;
|
|
String lockKey = RedisKeyConstant.USER_CREATE + userData.getGameId() + "_" + userName;
|
|
|
//上锁
|
|
//上锁
|
|
|
if (!distributedLockComponent.doLock(lockKey, 0L, 3L, TimeUnit.MINUTES)) {
|
|
if (!distributedLockComponent.doLock(lockKey, 0L, 3L, TimeUnit.MINUTES)) {
|
|
|
throw new BaseException("用户信息正在注册中, 请勿重复请求!");
|
|
throw new BaseException("用户信息正在注册中, 请勿重复请求!");
|
|
|
}
|
|
}
|
|
|
- //获取游戏信息
|
|
|
|
|
- Game game = gameService.getById(userData.getGameId());
|
|
|
|
|
//渠道id, 链接参数, 分享人id
|
|
//渠道id, 链接参数, 分享人id
|
|
|
Tuple3<Long, Map<String, String>, String> tuple3 = agentService.getUserAgentId(game, userData, openId);
|
|
Tuple3<Long, Map<String, String>, String> tuple3 = agentService.getUserAgentId(game, userData, openId);
|
|
|
//分享人id
|
|
//分享人id
|