|
@@ -87,18 +87,18 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
|
|
|
if (user == null) {
|
|
|
throw new BaseException("参数错误, 用户信息不存在");
|
|
|
}
|
|
|
+ //查询H5游戏
|
|
|
+ GameDTO h5GameDTO = gameService.getById(gameService.getById(user.getGameId()).getH5GameId());
|
|
|
+ if (h5GameDTO == null) {
|
|
|
+ throw new BaseException("参数错误, 关联H5游戏信息不存在");
|
|
|
+ }
|
|
|
//判断手机号是否被该游戏其他用户绑定
|
|
|
int count = super.count(new LambdaQueryWrapper<User>()
|
|
|
- .eq(User::getGameId, user.getGameId())
|
|
|
+ .eq(User::getGameId, h5GameDTO.getId())
|
|
|
.eq(User::getMobile, mobile));
|
|
|
if (count > 0) {
|
|
|
throw new BaseException("参数错误, 该手机号已被该游戏其他玩家信息绑定");
|
|
|
}
|
|
|
- //查询H5游戏
|
|
|
- GameDTO h5GameDTO = gameService.getById(gameService.getById(user.getGameId()).getH5GameId());
|
|
|
- if (h5GameDTO == null) {
|
|
|
- throw new BaseException("参数错误, 关联H5游戏信息不存在");
|
|
|
- }
|
|
|
//复制用户信息
|
|
|
User h5User = BeanUtil.copy(user, User.class);
|
|
|
h5User.setId(null);
|