|
@@ -1178,6 +1178,7 @@ public class RoomServiceImpl implements RoomService {
|
|
|
@Override
|
|
|
public void leaveRoomSuccess(String roomId, String userId, String deviceNum, Long callbackTs) throws Exception {
|
|
|
|
|
|
+ boolean joinTimeMatch = true;
|
|
|
// 用户退出房间多次触发调用判定
|
|
|
RoomMember roomMember = roomMemberDao.findByRidAndUid(roomId, userId);
|
|
|
if (Objects.isNull(roomMember)) {
|
|
@@ -1188,10 +1189,15 @@ public class RoomServiceImpl implements RoomService {
|
|
|
businessLogger.warn("leaveRoomSuccess: REPEATED_EXECUTION roomId={}, userId={}, deviceNum={}", roomId, userId, deviceNum);
|
|
|
return;
|
|
|
}
|
|
|
+
|
|
|
+ // 事件回调时间与加入时间匹配忽略
|
|
|
+ if (RoleEnum.getEnumByValue(roomMember.getRole()) == RoleTeacher) {
|
|
|
+ joinTimeMatch = false;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
// 回调整事件延迟通知
|
|
|
- if (callbackTs < roomMember.getJoinDt().getTime()) {
|
|
|
+ if (callbackTs < roomMember.getJoinDt().getTime() && joinTimeMatch) {
|
|
|
businessLogger.warn("leaveRoomSuccess: DELAY_NOTIFY roomId={}, userId={}, deviceNum={}, callbackTs={}, joinTs={}",
|
|
|
roomId, userId, deviceNum, callbackTs, roomMember.getJoinDt().getTime());
|
|
|
return;
|