1.记录微信消息

2.重复上线问题解决
This commit is contained in:
zhongzb
2023-05-20 12:56:56 +08:00
parent a35e72ad46
commit fe1bd80082
19 changed files with 194 additions and 23 deletions

View File

@@ -53,6 +53,11 @@ public class UserCache {
RedisUtils.zAdd(onlineKey, uid, optTime.getTime());
}
public boolean isOnline(Long uid) {
String onlineKey = RedisKey.getKey(RedisKey.ONLINE_UID_ZET);
return RedisUtils.zIsMember(onlineKey, uid);
}
//用户下线
public void offline(Long uid, Date optTime) {
String onlineKey = RedisKey.getKey(RedisKey.ONLINE_UID_ZET);