mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-18 17:38:48 +08:00
Pre Merge pull request !819 from 描述不符/dev
This commit is contained in:
commit
e6fe47ae07
@ -65,11 +65,15 @@ public class LoginHelper {
|
|||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked cast")
|
@SuppressWarnings("unchecked cast")
|
||||||
public static <T extends LoginUser> T getLoginUser() {
|
public static <T extends LoginUser> T getLoginUser() {
|
||||||
SaSession session = StpUtil.getTokenSession();
|
try {
|
||||||
if (ObjectUtil.isNull(session)) {
|
SaSession session = StpUtil.getTokenSession();
|
||||||
|
if (ObjectUtil.isNull(session)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return (T) session.get(LOGIN_USER_KEY);
|
||||||
|
} catch (Exception e) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return (T) session.get(LOGIN_USER_KEY);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user