工具类
This commit is contained in:
@ -29,6 +29,21 @@ public class SecurityUtils
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取用户账户
|
||||||
|
**/
|
||||||
|
public static Long getAppUserId()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return getLoginUser().getUser().getUserId();
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
throw new CustomException("获取用户账户异常", HttpStatus.HTTP_UNAUTHORIZED);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取用户
|
* 获取用户
|
||||||
**/
|
**/
|
||||||
|
Reference in New Issue
Block a user