using Furion; namespace Myshipping.Core; /// /// 用户管理 /// public static class UserManager { /// /// 用户id /// public static long UserId => long.Parse(App.User.FindFirst(ClaimConst.CLAINM_USERID)?.Value); /// /// 账号 /// public static string Account => App.User.FindFirst(ClaimConst.CLAINM_ACCOUNT)?.Value; /// /// 昵称 /// public static string Name => App.User.FindFirst(ClaimConst.CLAINM_NAME)?.Value; /// /// 是否超级管理员 /// public static bool IsSuperAdmin => App.User.FindFirst(ClaimConst.CLAINM_SUPERADMIN)?.Value == ((int)AdminType.SuperAdmin).ToString(); /// /// 是否租户管理员 /// public static bool IsTenantAdmin => App.User.FindFirst(ClaimConst.CLAINM_SUPERADMIN)?.Value == ((int)AdminType.Admin).ToString(); /// /// 租户ID /// public static long TENANT_ID => long.Parse(App.User.FindFirst(ClaimConst.TENANT_ID)?.Value); /// /// 租户名称 /// public static string TENANT_NAME => App.User.FindFirst(ClaimConst.TENANT_NAME)?.Value; /// /// 大简云userid /// public static string DjyUserId => App.User.FindFirst(ClaimConst.DjyUserId)?.Value; /// /// 电话 /// public static string TEl => App.User.FindFirst(ClaimConst.Tel)?.Value; /// /// 手机 /// public static string Phone => App.User.FindFirst(ClaimConst.Phone)?.Value; /// /// 邮箱 /// public static string Email => App.User.FindFirst(ClaimConst.Email)?.Value; }