工具类

This commit is contained in:
zt
2025-02-19 16:06:17 +08:00
parent 10e5eaf242
commit 3ae103157b

View File

@ -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);
}
}
/** /**
* 获取用户 * 获取用户
**/ **/