update 优化 token过期提醒

This commit is contained in:
疯狂的狮子Li
2026-07-06 09:23:23 +08:00
parent a5b65da892
commit 4baa9edfa1
@@ -46,10 +46,10 @@ public class SaTokenExceptionHandler {
String requestURI = request.getRequestURI();
log.error("请求地址'{}',认证失败'{}',无法访问系统资源", requestURI, e.getMessage());
String msg = switch (e.getType()) {
case NotLoginException.TOKEN_TIMEOUT -> "登录已过期,请重新登录";
case NotLoginException.TOKEN_TIMEOUT,
NotLoginException.TOKEN_FREEZE -> "登录已过期,请重新登录";
case NotLoginException.BE_REPLACED -> "当前账号已在其他设备登录,您已被强制下线";
case NotLoginException.KICK_OUT -> "账号已被管理员强制下线";
case NotLoginException.TOKEN_FREEZE -> "账号已被冻结,请联系管理员处理";
default -> "登录状态异常,请重新登录";
};
return R.fail(HttpStatus.HTTP_UNAUTHORIZED, msg);