From 8c38a8e2e5f32d824d37d520512fb1684b58f997 Mon Sep 17 00:00:00 2001 From: wangping <995664179@qq.com> Date: Mon, 22 Sep 2025 15:48:38 +0800 Subject: [PATCH] =?UTF-8?q?GetToken=E6=96=B0=E5=A2=9E=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E5=85=BC=E5=AE=B9APP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ATS.NonCustodial.Application/Impl/Admins/AuthService.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/2.services/ATS.NonCustodial.Application/Impl/Admins/AuthService.cs b/src/2.services/ATS.NonCustodial.Application/Impl/Admins/AuthService.cs index fa8166e..326534b 100644 --- a/src/2.services/ATS.NonCustodial.Application/Impl/Admins/AuthService.cs +++ b/src/2.services/ATS.NonCustodial.Application/Impl/Admins/AuthService.cs @@ -421,15 +421,15 @@ namespace ATS.NonCustodial.Application.Impl.Admins { new Claim(ClaimAttributes.userId, user.Id.ToString()), new Claim(ClaimAttributes.userName, user.UserName!), - new Claim(ClaimAttributes.userUnitId, user.UnitId.ToString()), - new Claim(ClaimAttributes.userDeptcodeId, user.DeptcodeId.ToString()), + new Claim(ClaimAttributes.userUnitId, user.UnitId?.ToString() ?? ""), + new Claim(ClaimAttributes.userDeptcodeId, user.DeptcodeId?.ToString()??""), new Claim(ClaimAttributes.userNickName, user?.NickName??"") , new Claim(ClaimAttributes.avatar,user?.Avatar??"") , new Claim(ClaimAttributes.roles,JsonConvert.SerializeObject(roles)), new Claim(ClaimAttributes.orgs,JsonConvert.SerializeObject(Array.Empty())) , new Claim(ClaimAttributes.phone,user?.Phone??""), new Claim(ClaimAttributes.logtime,timeLogin), - new Claim(ClaimAttributes.limits,limits), + new Claim(ClaimAttributes.limits,limits??""), new Claim(ClaimAttributes.IsAdmin,user.IsAdmin?"true":"false"), new Claim(ClaimAttributes.personType,user?.ChatPersonType.ToString()!) });