fix(X-Pack): 使用 Redis 作为缓存中间件开启禁止多端登录导致第三方认证报错 (#14054)

This commit is contained in:
fit2cloud-chenyw
2024-12-15 10:48:59 +08:00
committed by GitHub
parent ab95605cc3
commit e63bae82a3

View File

@@ -95,7 +95,9 @@ public class TokenCacheUtils {
if (useRedis()) {
ValueOperations valueOperations = cacheHandler();
Object obj = valueOperations.get(ONLINE_TOKEN_POOL_KEY + userId);
if (ObjectUtils.isNotEmpty(obj)) return (OnlineUserModel) obj;
if (ObjectUtils.isNotEmpty(obj)) {
return gson.fromJson(gson.toJson(obj), OnlineUserModel.class);
}
return null;
}
Object o = CacheUtils.get(ONLINE_TOKEN_POOL_KEY, userId);