diff --git a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/common/user/OnlineStatusCommon.java b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/common/user/OnlineStatusCommon.java index f853a6fb..4738b28f 100644 --- a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/common/user/OnlineStatusCommon.java +++ b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/common/user/OnlineStatusCommon.java @@ -69,7 +69,8 @@ public class OnlineStatusCommon { } private void onlineStatusMessage(OnlineStatusUploadCmd cmd) { - if (redisService.setIfAbsent("OLU:" + cmd.getUserId(), 1, TimeUnit.MINUTES)) { + //客户端每60秒发送一次, 冗余网络延迟等问题 设置为50秒 + if (redisService.setIfAbsent("OLU:" + cmd.getUserId(), 50, TimeUnit.SECONDS)) { userMqMessageService.onlineStatus(new UserOnlineStatusEvent() .setUserId(cmd.getUserId()) .setSysOrigin(SysOriginPlatformEnum.valueOf(cmd.getSysOrigin()))