From ffbef39f05e0e26e5121669d0bc79133ba289e1c Mon Sep 17 00:00:00 2001 From: tianfeng <769204422@qq.com> Date: Thu, 25 Dec 2025 19:42:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=BF=E9=97=B4=E5=9C=A8=E7=BA=BF=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E5=A2=9E=E5=8A=A0=E8=BF=87=E6=9C=9F=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/user/status/impl/OnlineUserServiceImpl.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/mongo/service/user/status/impl/OnlineUserServiceImpl.java b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/mongo/service/user/status/impl/OnlineUserServiceImpl.java index 66085b4a..8457b5f9 100644 --- a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/mongo/service/user/status/impl/OnlineUserServiceImpl.java +++ b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/mongo/service/user/status/impl/OnlineUserServiceImpl.java @@ -6,6 +6,7 @@ import com.red.circle.other.infra.database.mongo.dto.query.user.status.OnlineUse import com.red.circle.other.infra.database.mongo.dto.query.user.status.OnlineUserQuery; import com.red.circle.other.infra.database.mongo.entity.user.status.OnlineUser; import com.red.circle.other.infra.database.mongo.service.user.status.OnlineUserService; +import com.red.circle.tool.core.date.TimestampUtils; import com.red.circle.tool.core.text.StringUtils; import com.red.circle.other.inner.model.cmd.user.OnlineCountQryCmd; import com.red.circle.other.inner.model.cmd.user.OnlineUserBackQryCmd; @@ -287,7 +288,9 @@ public class OnlineUserServiceImpl implements OnlineUserService { @Override public List userOnlineByUserIds(Set userIds) { Criteria criteria = Criteria.where("userId").in(userIds) - .and("status").is(UserOnlineStatusEnum.LANGUAGE_HALL); + .and("status").is(UserOnlineStatusEnum.LANGUAGE_HALL) + .and("expiredTime").gte(TimestampUtils.now()) + ; return mongoTemplate.find(Query.query(criteria) .limit(200), OnlineUser.class); }