|  | @@ -193,16 +193,11 @@ public class ImNetworkRoomServiceImpl extends ServiceImpl<ImNetworkRoomDao, ImNe
 | 
	
		
			
				|  |  |      @Transactional(rollbackFor = Exception.class)
 | 
	
		
			
				|  |  |      public void joinRoomSuccess(String roomId, String imUserId) throws Exception {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        String[] values = imUserId.split(":");
 | 
	
		
			
				|  |  |          // 用户ID
 | 
	
		
			
				|  |  | -        Long userId = Long.parseLong(values[0]);
 | 
	
		
			
				|  |  | +        Long userId = Long.parseLong(imGroupService.analysisImUserId(imUserId));
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          // 客户端类型
 | 
	
		
			
				|  |  | -        ClientEnum clientType = ClientEnum.TEACHER;
 | 
	
		
			
				|  |  | -        if (values.length > 1 && ClientEnum.STUDENT.match(values[1])) {
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -            clientType = ClientEnum.STUDENT;
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | +        ClientEnum clientType = ClientEnum.valueOf(imGroupService.analysisImUserClient(imUserId));
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          log.info("joinRoomSuccess: roomId={}, userId={}", roomId, userId);
 | 
	
		
			
				|  |  |          CourseSchedule courseSchedule = Optional.ofNullable(courseScheduleService.getById(roomId)).
 | 
	
	
		
			
				|  | @@ -316,20 +311,15 @@ public class ImNetworkRoomServiceImpl extends ServiceImpl<ImNetworkRoomDao, ImNe
 | 
	
		
			
				|  |  |      @Transactional(rollbackFor = Exception.class)
 | 
	
		
			
				|  |  |      public void quitRoomSuccess(String roomId, String imUserId) throws Exception {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -        String[] values = imUserId.split(":");
 | 
	
		
			
				|  |  |          // 用户ID
 | 
	
		
			
				|  |  | -        long userId = Long.parseLong(values[0]);
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | +        Long userId = Long.parseLong(imGroupService.analysisImUserId(imUserId));
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          // 客户端类型
 | 
	
		
			
				|  |  | -        UserRoleEnum userRole = UserRoleEnum.TEACHER;
 | 
	
		
			
				|  |  | -        ClientEnum clientType = ClientEnum.TEACHER;
 | 
	
		
			
				|  |  | -        if (values.length > 1 && ClientEnum.STUDENT.match(values[1])) {
 | 
	
		
			
				|  |  | +        ClientEnum clientType = ClientEnum.valueOf(imGroupService.analysisImUserClient(imUserId));
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -            clientType = ClientEnum.STUDENT;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -            userRole = UserRoleEnum.STUDENT;
 | 
	
		
			
				|  |  | -        }
 | 
	
		
			
				|  |  | +        // 客户端类型
 | 
	
		
			
				|  |  | +        UserRoleEnum userRole = UserRoleEnum.convert(clientType);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          log.info("quitRoomSuccess: roomId={}, userId={}", roomId, userId);
 | 
	
		
			
				|  |  |          //防止幂等
 |