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); }