|
@@ -221,9 +221,19 @@ public class ImNetworkRoomServiceImpl extends ServiceImpl<ImNetworkRoomDao, ImNe
|
|
@Override
|
|
@Override
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
public void joinRoomFailure(String roomId, ClientEnum clientType) {
|
|
public void joinRoomFailure(String roomId, ClientEnum clientType) {
|
|
|
|
+
|
|
|
|
+ // 当前登录用户ID
|
|
Long userId = sysUserService.getUserId();
|
|
Long userId = sysUserService.getUserId();
|
|
log.info("joinRoomFailure: roomId={}, userId={}", roomId, userId);
|
|
log.info("joinRoomFailure: roomId={}, userId={}", roomId, userId);
|
|
- imNetworkRoomMemberService.getDao().delByRidAndUid(roomId, userId);
|
|
|
|
|
|
+
|
|
|
|
+ // 网络教室用户身份
|
|
|
|
+ UserRoleEnum userRole = UserRoleEnum.TEACHER;
|
|
|
|
+ if (ClientEnum.STUDENT == clientType) {
|
|
|
|
+ userRole = UserRoleEnum.STUDENT;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 删除网络教室学员
|
|
|
|
+ imNetworkRoomMemberService.getDao().delByRidAndUid(roomId, userId, userRole.ordinal());
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|