修改可空类型

This commit is contained in:
陈淳
2023-01-06 10:15:37 +08:00
parent b7c9b84449
commit 576397a042
29 changed files with 82 additions and 68 deletions

View File

@@ -53,7 +53,7 @@ namespace Yi.Framework.WebCore.MiddlewareExtend
//通过鉴权之后,开始赋值
_currentUser.IsAuthenticated = true;
_currentUser.Id = claims.GetClaim(JwtRegisteredClaimNames.Sid) is null ? 0 : Convert.ToInt64(claims.GetClaim(JwtRegisteredClaimNames.Sid));
_currentUser.UserName = claims.GetClaim(SystemConst.UserName);
_currentUser.UserName = claims.GetClaim(SystemConst.UserName)??"";
_currentUser.Permission = claims.GetClaims(SystemConst.PermissionClaim);
_currentUser.TenantId = claims.GetClaim(SystemConst.TenantId) is null ? null : Guid.Parse(claims.GetClaim(SystemConst.TenantId)!);
await _next(context);