ke_junjie
2025-06-04 84620534eb627e95811b971a4b552b6a177829bf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using iWare.Wms.Core;
using Furion;
 
namespace iWare.Wms.Application
{
    /// <summary>
    /// 当前用户
    /// </summary>
    public static class CurrentUserInfo
    {
        /// <summary>
        /// 用户id
        /// </summary>
        public static long UserId => long.Parse(App.User.FindFirst(ClaimConst.CLAINM_USERID)?.Value);
 
        /// <summary>
        /// 账号
        /// </summary>
        public static string Account => App.User.FindFirst(ClaimConst.CLAINM_ACCOUNT)?.Value;
 
        /// <summary>
        /// 昵称
        /// </summary>
        public static string Name => App.User.FindFirst(ClaimConst.CLAINM_NAME)?.Value;
 
        /// <summary>
        /// 是否超级管理员
        /// </summary>
        public static bool IsSuperAdmin => App.User.FindFirst(ClaimConst.CLAINM_SUPERADMIN)?.Value == ((int)AdminType.SuperAdmin).ToString();
    }
}