|
@@ -91,8 +91,7 @@ public class ImNetworkRoomServiceImpl extends ServiceImpl<ImNetworkRoomDao, ImNe
|
|
|
orElseThrow(()->new BizException("房间信息不存在"));
|
|
|
|
|
|
RoleEnum userRole = RoleEnum.RoleStudent;
|
|
|
- if(clientType == ClientEnum.TEACHER
|
|
|
- || courseSchedule.getTeacherId().equals(userId)){
|
|
|
+ if(clientType == ClientEnum.TEACHER){
|
|
|
userRole = RoleEnum.RoleTeacher;
|
|
|
}
|
|
|
log.info("joinRoom params:roomId:{},userRole:{},userId:{}",roomId,userRole,userId);
|
|
@@ -106,7 +105,8 @@ public class ImNetworkRoomServiceImpl extends ServiceImpl<ImNetworkRoomDao, ImNe
|
|
|
}
|
|
|
ImNetworkRoomResult joinRoomResult = new ImNetworkRoomResult();
|
|
|
//初始化房间信息
|
|
|
- ImNetworkRoom room = roomService.initRoom(roomId,userRole,sysUser.getUserId());
|
|
|
+ String imUserId = imGroupService.getImUserId(sysUser.getUserId(), userRole);
|
|
|
+ ImNetworkRoom room = roomService.initRoom(roomId,userRole,imUserId);
|
|
|
BeanUtils.copyProperties(room,joinRoomResult);
|
|
|
//定时销毁房间
|
|
|
//初始化房间用户信息
|
|
@@ -158,8 +158,7 @@ public class ImNetworkRoomServiceImpl extends ServiceImpl<ImNetworkRoomDao, ImNe
|
|
|
orElseThrow(()->new BizException("房间信息不存在"));
|
|
|
|
|
|
RoleEnum userRole = RoleEnum.RoleStudent;
|
|
|
- if((imNetworkBaseDto.getClientType() != null && imNetworkBaseDto.getClientType() == ClientEnum.TEACHER)
|
|
|
- || courseSchedule.getTeacherId().equals(userId)){
|
|
|
+ if(imNetworkBaseDto.getClientType() == ClientEnum.TEACHER){
|
|
|
userRole = RoleEnum.RoleTeacher;
|
|
|
}
|
|
|
log.info("joinRoom params:roomId:{},userRole:{},userId:{}",roomId,userRole,userId);
|
|
@@ -239,7 +238,7 @@ public class ImNetworkRoomServiceImpl extends ServiceImpl<ImNetworkRoomDao, ImNe
|
|
|
studentAttendanceService.signIn(userId,courseSchedule);
|
|
|
}
|
|
|
//获取房间信息
|
|
|
- ImNetworkRoom room = roomService.initRoom(roomId, userRole, userId);
|
|
|
+ ImNetworkRoom room = roomService.initRoom(roomId, userRole, imUserId);
|
|
|
//获取房间用户信息
|
|
|
ImNetworkRoomMember roomMember = imNetworkRoomMemberService.initRoomMember(roomId,sysUser,userRole,!courseSchedule.getMuteAll());
|
|
|
//发送人员变动消息
|