From 9d69412ebbaaaf7b457aeafc5a64f718a5e821b3 Mon Sep 17 00:00:00 2001 From: wet <1034391973@qq.com> Date: Thu, 17 Nov 2022 11:16:02 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=9F=E6=88=B7=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Myshipping.Core/Filter/ApiUserFilter.cs | 2 +- Myshipping.Core/Myshipping.Core.xml | 2 +- Myshipping.Core/Service/Auth/AuthService.cs | 4 ++-- Myshipping.Core/SqlSugar/SqlSugarSetup.cs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Myshipping.Core/Filter/ApiUserFilter.cs b/Myshipping.Core/Filter/ApiUserFilter.cs index 28d96d3d..b3514675 100644 --- a/Myshipping.Core/Filter/ApiUserFilter.cs +++ b/Myshipping.Core/Filter/ApiUserFilter.cs @@ -32,7 +32,7 @@ namespace Myshipping.Core identity.AddClaim(new Claim(type: ClaimConst.CLAINM_NAME, value: "管理员")); identity.AddClaim(new Claim(type: ClaimConst.CLAINM_SUPERADMIN, value: AdminType.Admin.ToString())); identity.AddClaim(new Claim(type: ClaimConst.CLAINM_TENANT_TYPE, value: TenantTypeEnum.SYSTEM.ToString())); - identity.AddClaim(new Claim(type: ClaimConst.CLAINM_TENANT_NAME, value: "测试")); + identity.AddClaim(new Claim(type: ClaimConst.TENANT_NAME, value: "测试")); ClaimsPrincipal claimsPrincipal = new ClaimsPrincipal(identity); httpContext.User = claimsPrincipal; } diff --git a/Myshipping.Core/Myshipping.Core.xml b/Myshipping.Core/Myshipping.Core.xml index 859dc407..348d4c8e 100644 --- a/Myshipping.Core/Myshipping.Core.xml +++ b/Myshipping.Core/Myshipping.Core.xml @@ -532,7 +532,7 @@ 租户类型 - + 租户名称 diff --git a/Myshipping.Core/Service/Auth/AuthService.cs b/Myshipping.Core/Service/Auth/AuthService.cs index 23a7ba3b..7911075b 100644 --- a/Myshipping.Core/Service/Auth/AuthService.cs +++ b/Myshipping.Core/Service/Auth/AuthService.cs @@ -93,7 +93,7 @@ public class AuthService : IAuthService, IDynamicApiController, ITransient {ClaimConst.CLAINM_NAME, user.Name}, {ClaimConst.CLAINM_SUPERADMIN, user.AdminType}, { ClaimConst.CLAINM_TENANT_TYPE, tenant.TenantType }, - { ClaimConst.CLAINM_TENANT_NAME, tenant.Name }, + { ClaimConst.TENANT_NAME, tenant.Name }, { ClaimConst.DjyUserId, user.DjyUserId }, }); @@ -148,7 +148,7 @@ public class AuthService : IAuthService, IDynamicApiController, ITransient { ClaimConst.CLAINM_NAME, user.Name }, { ClaimConst.CLAINM_SUPERADMIN, user.AdminType }, { ClaimConst.CLAINM_TENANT_TYPE, tenant.TenantType }, - { ClaimConst.CLAINM_TENANT_NAME, tenant.Name }, + { ClaimConst.TENANT_NAME, tenant.Name }, { ClaimConst.DjyUserId, user.DjyUserId }, }); diff --git a/Myshipping.Core/SqlSugar/SqlSugarSetup.cs b/Myshipping.Core/SqlSugar/SqlSugarSetup.cs index b1d59ef4..3c4a2e5a 100644 --- a/Myshipping.Core/SqlSugar/SqlSugarSetup.cs +++ b/Myshipping.Core/SqlSugar/SqlSugarSetup.cs @@ -336,7 +336,7 @@ public static class SqlSugarSetup { var tenantName = ((dynamic)entityInfo.EntityValue).TenantName; if (string.IsNullOrEmpty(tenantName)) - entityInfo.SetValue(App.User.FindFirst(ClaimConst.CLAINM_TENANT_NAME)?.Value); + entityInfo.SetValue(App.User.FindFirst(ClaimConst.TENANT_NAME)?.Value); } if (entityInfo.PropertyName == "CreatedUserId") {