| 
					
				 | 
			
			
				@@ -85,20 +85,32 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Transactional(rollbackFor = Exception.class) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public Boolean appletToH5(Long userId, String mobile) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public Boolean appletToH5(Long userId, String mobile, Integer type) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //用户信息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         User user = super.getById(userId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (user == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             throw new BaseException("参数错误, 用户信息不存在"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        GameDTO gameDTO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //查询H5游戏 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        GameDTO h5GameDTO = gameService.getById(gameService.getById(user.getGameId()).getH5GameId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (h5GameDTO == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            throw new BaseException("参数错误, 关联H5游戏信息不存在"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (type == 1) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            gameDTO = gameService.getById(gameService.getById(user.getGameId()).getH5GameId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } else if (type == 2) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            //查询安卓游戏 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            gameDTO = gameService.getById(gameService.getById(user.getGameId()).getAndroidGameId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } else if (type == 3) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            //查询ios游戏 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            gameDTO = gameService.getById(gameService.getById(user.getGameId()).getIosGameId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            throw new BaseException("参数错误, 导量类型不存在"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        //判断关联游戏是否存在 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (gameDTO == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            throw new BaseException("参数错误, 关联导量游戏信息不存在"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //判断手机号是否被该游戏其他用户绑定 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         int count = super.count(new LambdaQueryWrapper<User>() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                .eq(User::getGameId, h5GameDTO.getId()) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                .eq(User::getGameId, gameDTO.getId()) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 .eq(User::getMobile, mobile)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (count > 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             throw new BaseException("参数错误, 该手机号已被该游戏其他玩家信息绑定"); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -106,7 +118,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         //复制用户信息 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         User h5User = BeanUtil.copy(user, User.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         h5User.setId(null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        h5User.setGameId(h5GameDTO.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        h5User.setGameId(gameDTO.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         h5User.setMobile(mobile); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         h5User.setRelationUserId(user.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         h5User.setRelationCreateTime(LocalDateTime.now()); 
			 |