Browse Source

完成登录流程等功能

master
前端-胡立永 3 days ago
parent
commit
da1cb2874c
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/mybatis/MybatisInterceptor.java

+ 3
- 1
jeecg-boot/jeecg-boot-base-core/src/main/java/org/jeecg/config/mybatis/MybatisInterceptor.java View File

@ -192,7 +192,9 @@ public class MybatisInterceptor implements Interceptor {
private LoginUser getLoginUser() { private LoginUser getLoginUser() {
LoginUser sysUser = null; LoginUser sysUser = null;
try { try {
sysUser = SecurityUtils.getSubject().getPrincipal() != null ? (LoginUser) SecurityUtils.getSubject().getPrincipal() : null;
if (SecurityUtils.getSubject().getPrincipal() != null && SecurityUtils.getSubject().getPrincipal() instanceof LoginUser){
sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
}
} catch (Exception e) { } catch (Exception e) {
//e.printStackTrace(); //e.printStackTrace();
sysUser = null; sysUser = null;


Loading…
Cancel
Save