筛选功能
This commit is contained in:
@@ -28,7 +28,11 @@ public class SecurityUtils
|
||||
{
|
||||
try
|
||||
{
|
||||
return getLoginUser().getUserId();
|
||||
LoginUser logUse = getLoginUser();
|
||||
if (logUse != null){
|
||||
return logUse.getUserId();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -75,7 +79,10 @@ public class SecurityUtils
|
||||
{
|
||||
try
|
||||
{
|
||||
return (LoginUser) getAuthentication().getPrincipal();
|
||||
if (getAuthentication().getPrincipal() instanceof LoginUser){
|
||||
return (LoginUser) getAuthentication().getPrincipal();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user