fix 修复 关闭租户后 在线用户token解析异常问题
This commit is contained in:
parent
bec7f8c802
commit
a345bcc0a0
@ -12,11 +12,6 @@ public interface GlobalConstants {
|
||||
*/
|
||||
String GLOBAL_REDIS_KEY = "global:";
|
||||
|
||||
/**
|
||||
* 登录用户 redis key
|
||||
*/
|
||||
String LOGIN_TOKEN_KEY = GLOBAL_REDIS_KEY + "Authorization:login:token:";
|
||||
|
||||
/**
|
||||
* 验证码 redis key
|
||||
*/
|
||||
|
@ -46,7 +46,7 @@ public class SysUserOnlineController extends BaseController {
|
||||
List<String> keys = StpUtil.searchTokenValue("", 0, -1, false);
|
||||
List<UserOnlineDTO> userOnlineDTOList = new ArrayList<>();
|
||||
for (String key : keys) {
|
||||
String token = key.replace(GlobalConstants.LOGIN_TOKEN_KEY, "");
|
||||
String token = StringUtils.substringAfterLast(key, ":");
|
||||
// 如果已经过期则跳过
|
||||
if (StpUtil.stpLogic.getTokenActivityTimeoutByToken(token) < -1) {
|
||||
continue;
|
||||
|
Loading…
x
Reference in New Issue
Block a user