|
@@ -152,7 +152,6 @@ public class RoomServiceImpl implements RoomService {
|
|
|
userInfo.setUpdateDt(curTime);
|
|
|
userDao.save(userInfo);
|
|
|
}
|
|
|
- List<RoomMember> roomMembers = roomMemberDao.findByRid(roomId);
|
|
|
log.info("join success: roomId = {}, userId = {}, userName={}, role = {}", roomId, userId, roleEnum);
|
|
|
if(registrationId != null){
|
|
|
if(examResult.getIsFinishedExam() == 1){
|
|
@@ -1279,7 +1278,6 @@ public class RoomServiceImpl implements RoomService {
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED)
|
|
|
public boolean statusSync(ChannelStateNotify notify) throws Exception {
|
|
|
- log.info("statusSync notify:{}",notify);
|
|
|
String roomId = notify.getChannelId();
|
|
|
String userId = notify.getUserId();
|
|
|
RoomMember roomMember = roomMemberDao.findByRidAndUid(roomId, userId);
|
|
@@ -1293,17 +1291,21 @@ public class RoomServiceImpl implements RoomService {
|
|
|
}else if(notify.getEvent() == 2){
|
|
|
//房间创建
|
|
|
}else if(notify.getEvent() == 3){
|
|
|
+ log.info("房间销毁 roomId: {}, userId: {}",roomId, userId);
|
|
|
//房间销毁(删除缓存的sessionId)
|
|
|
redisTemplate.delete("sessionId:" + roomId);
|
|
|
}else if(notify.getEvent() == 11){
|
|
|
//成员加入
|
|
|
+ log.info("成员加入 roomId: {}, userId: {}",roomId, userId);
|
|
|
// roomMemberDao.updateMsidByRidAndUid(roomId,userId,msidFlag);
|
|
|
joinRoomSuccess(roomMember.getExamRegistrationId(),roomId,userId);
|
|
|
}else if(notify.getEvent() == 12){
|
|
|
//成员退出
|
|
|
+ log.info("成员退出 roomId: {}, userId: {}",roomId, userId);
|
|
|
// roomMemberDao.updateMsidByRidAndUid(roomId,userId,msidFlag);
|
|
|
leaveRoomSuccess(roomMember.getExamRegistrationId(),roomId,userId);
|
|
|
}else if(notify.getEvent() == 20){
|
|
|
+ log.info("资源变动 roomId: {}, userId: {}",roomId, userId);
|
|
|
boolean msidFlag = false;
|
|
|
Integer state = null;
|
|
|
List<Member> members = notify.getMembers();
|
|
@@ -1328,7 +1330,9 @@ public class RoomServiceImpl implements RoomService {
|
|
|
//资源发生变动
|
|
|
if(state == null || state == 0 || !msidFlag){
|
|
|
roomMemberDao.updateMsidByRidAndUid(roomId,userId,msidFlag);
|
|
|
- imHelper.configRecord(roomId);
|
|
|
+ if(roomMember.getExamRegistrationId() == null){
|
|
|
+ imHelper.configRecord(roomId);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
return true;
|