From c8a42cdf4668b2c92c768c4871eef455db363e39 Mon Sep 17 00:00:00 2001 From: zuohuaijun Date: Mon, 15 Sep 2025 03:03:23 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=98=8E=E4=BC=98=E5=8C=96=E5=BD=93?= =?UTF-8?q?=E5=89=8D=E7=94=A8=E6=88=B7=E7=8A=B6=E6=80=81=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/App/Auth/AppAuthService.cs | 22 ++--- .../Service/App/Auth/AppUserManager.cs | 4 +- .../Service/Auth/Dto/LoginUserOutput.cs | 23 +---- .../Service/Auth/SysAuthService.cs | 38 ++------- .../Service/Org/SysOrgService.cs | 2 +- .../Service/Role/SysRoleService.cs | 6 +- .../Service/User/SysUserRoleService.cs | 8 +- .../Service/User/UserManager.cs | 68 ++++++++++----- .../Admin.NET.Core/SqlSugar/SqlSugarFilter.cs | 4 +- .../system/apis/sys-common-api.ts | 84 ------------------- .../system/models/add-code-gen-input.ts | 8 -- Web/src/api-services/system/models/index.ts | 2 - .../system/models/login-user-output.ts | 6 +- .../system/models/name-abbr-input.ts | 38 --------- .../api-services/system/models/role-dto.ts | 46 ---------- .../system/models/sys-code-gen.ts | 8 -- .../system/models/update-code-gen-input.ts | 8 -- 17 files changed, 81 insertions(+), 294 deletions(-) delete mode 100644 Web/src/api-services/system/models/name-abbr-input.ts delete mode 100644 Web/src/api-services/system/models/role-dto.ts diff --git a/Admin.NET/Admin.NET.Application/Service/App/Auth/AppAuthService.cs b/Admin.NET/Admin.NET.Application/Service/App/Auth/AppAuthService.cs index d69543da..acb0b617 100644 --- a/Admin.NET/Admin.NET.Application/Service/App/Auth/AppAuthService.cs +++ b/Admin.NET/Admin.NET.Application/Service/App/Auth/AppAuthService.cs @@ -9,6 +9,7 @@ using Furion.DataValidation; using Lazy.Captcha.Core; using Microsoft.AspNetCore.Http; using Yitter.IdGenerator; +using static SKIT.FlurlHttpClient.Wechat.TenpayV3.Models.QueryMarketingMemberCardOpenCardsResponse.Types.Card.Types; namespace Admin.NET.Application.Service.App; @@ -22,6 +23,7 @@ public class AppAuthService : IDynamicApiController, ITransient private readonly SqlSugarRepository _sysUserRep; private readonly IHttpContextAccessor _httpContextAccessor; private readonly SysRoleService _sysRoleService; + private readonly SysUserRoleService _sysUserRoleService; private readonly SysOnlineUserService _sysOnlineUserService; private readonly SysConfigService _sysConfigService; private readonly ICaptcha _captcha; @@ -31,6 +33,7 @@ public class AppAuthService : IDynamicApiController, ITransient SqlSugarRepository sysUserRep, IHttpContextAccessor httpContextAccessor, SysRoleService sysRoleService, + SysUserRoleService sysUserRoleService, SysOnlineUserService sysOnlineUserService, SysConfigService sysConfigService, ICaptcha captcha, @@ -40,6 +43,7 @@ public class AppAuthService : IDynamicApiController, ITransient _sysUserRep = sysUserRep; _httpContextAccessor = httpContextAccessor; _sysRoleService = sysRoleService; + _sysUserRoleService = sysUserRoleService; _sysOnlineUserService = sysOnlineUserService; _sysConfigService = sysConfigService; _captcha = captcha; @@ -206,19 +210,11 @@ public class AppAuthService : IDynamicApiController, ITransient [DisplayName("获取登录账号")] public virtual async Task GetUserInfo() { - var user = await _sysUserRep.GetByIdAsync(_appUserManager.UserId) ?? throw Oops.Oh(ErrorCodeEnum.D1011).StatusCode(401); - // 机构 - var org = await _sysUserRep.ChangeRepository>().GetByIdAsync(user.OrgId); - // 职位 - var pos = await _sysUserRep.ChangeRepository>().GetByIdAsync(user.PosId); + var user = await _sysUserRep.AsQueryable().Includes(u => u.SysOrg).Includes(u => u.SysPos).FirstAsync(u => u.Id == _appUserManager.UserId) ?? throw Oops.Oh(ErrorCodeEnum.D1011).StatusCode(401); // 角色集合 - var roles = await _sysUserRep.ChangeRepository>().AsQueryable() - .LeftJoin((u, a) => u.RoleId == a.Id) - .Where(u => u.UserId == user.Id) - .Select((u, a) => new RoleDto { Id = a.Id, Name = a.Name, Code = a.Code }).ToListAsync(); + var roles = await _sysUserRoleService.GetUserRoleInfoList(user.Id); // 接口集合 var apis = (await _sysRoleService.GetUserApiList())[0]; - return new LoginUserOutput { Id = user.Id, @@ -232,9 +228,9 @@ public class AppAuthService : IDynamicApiController, ITransient Address = user.Address, Signature = user.Signature, OrgId = user.OrgId, - OrgName = org?.Name, - OrgType = org?.Type, - PosName = pos?.Name, + OrgName = user.SysOrg?.Name, + OrgType = user.SysOrg?.Type, + PosName = user.SysPos?.Name, Apis = apis, Roles = roles }; diff --git a/Admin.NET/Admin.NET.Application/Service/App/Auth/AppUserManager.cs b/Admin.NET/Admin.NET.Application/Service/App/Auth/AppUserManager.cs index f02b0462..52e658c8 100644 --- a/Admin.NET/Admin.NET.Application/Service/App/Auth/AppUserManager.cs +++ b/Admin.NET/Admin.NET.Application/Service/App/Auth/AppUserManager.cs @@ -11,10 +11,12 @@ namespace Admin.NET.Application.Service.App; public class AppUserManager : UserManager { private readonly IHttpContextAccessor _httpContextAccessor; + private readonly SysCacheService _sysCacheService; - public AppUserManager(IHttpContextAccessor httpContextAccessor) : base(httpContextAccessor) + public AppUserManager(IHttpContextAccessor httpContextAccessor, SysCacheService sysCacheService) : base(httpContextAccessor, sysCacheService) { _httpContextAccessor = httpContextAccessor; + _sysCacheService = sysCacheService; } // 扩展属性 diff --git a/Admin.NET/Admin.NET.Core/Service/Auth/Dto/LoginUserOutput.cs b/Admin.NET/Admin.NET.Core/Service/Auth/Dto/LoginUserOutput.cs index 683f8f7b..c2d4d331 100644 --- a/Admin.NET/Admin.NET.Core/Service/Auth/Dto/LoginUserOutput.cs +++ b/Admin.NET/Admin.NET.Core/Service/Auth/Dto/LoginUserOutput.cs @@ -99,7 +99,7 @@ public class LoginUserOutput /// /// 角色集合 /// - public List Roles { get; set; } + public List Roles { get; set; } /// /// 水印文字 @@ -110,25 +110,4 @@ public class LoginUserOutput /// 最新密码修改时间 /// public DateTime? LastChangePasswordTime; -} - -/// -/// 角色 -/// -public class RoleDto -{ - /// - /// 角色Id - /// - public long Id { get; set; } - - /// - /// 名称 - /// - public string Name { get; set; } - - /// - /// 编码 - /// - public string Code { get; set; } } \ No newline at end of file diff --git a/Admin.NET/Admin.NET.Core/Service/Auth/SysAuthService.cs b/Admin.NET/Admin.NET.Core/Service/Auth/SysAuthService.cs index cb4b6d89..3ff876c4 100644 --- a/Admin.NET/Admin.NET.Core/Service/Auth/SysAuthService.cs +++ b/Admin.NET/Admin.NET.Core/Service/Auth/SysAuthService.cs @@ -287,23 +287,13 @@ public class SysAuthService : IDynamicApiController, ITransient [DisplayName("获取登录账号")] public virtual async Task GetUserInfo() { - var user = await _sysUserRep.GetByIdAsync(_userManager.UserId) ?? throw Oops.Oh(ErrorCodeEnum.D1011).StatusCode(401); - // 机构 - var org = await _sysUserRep.ChangeRepository>().GetByIdAsync(user.OrgId); - // 职位 - var pos = await _sysUserRep.ChangeRepository>().GetByIdAsync(user.PosId); + var user = await _sysUserRep.AsQueryable().Includes(u => u.SysOrg).Includes(u => u.SysPos).FirstAsync(u => u.Id == _userManager.UserId) ?? throw Oops.Oh(ErrorCodeEnum.D1011).StatusCode(401); // 角色集合 - var roles = await _sysUserRep.ChangeRepository>().AsQueryable() - .LeftJoin((u, a) => u.RoleId == a.Id) - .Where(u => u.UserId == user.Id) - .Select((u, a) => new RoleDto { Id = a.Id, Name = a.Name, Code = a.Code }).ToListAsync(); + var roles = await App.GetRequiredService().GetUserRoleInfoList(user.Id); // 接口集合 var apis = (await App.GetRequiredService().GetUserApiList())[0]; - // 个性化水印文字(若系统水印为空则不显示) - var watermarkText = await _sysUserRep.ChangeRepository>().AsQueryable().Where(u => u.Id == user.TenantId).Select(u => u.Watermark).FirstAsync(); - if (!string.IsNullOrWhiteSpace(watermarkText)) - watermarkText += $"-{user.RealName}"; // $"-{user.RealName}-{_httpContextAccessor.HttpContext.GetRemoteIpAddressToIPv4(true)}-{DateTime.Now}"; - + // 水印文字(若为空则不显示) + var watermarkText = _sysCacheService.Get>(CacheConst.KeyTenant)?.FirstOrDefault(u => u.Id == user.TenantId).Watermark; return new LoginUserOutput { Id = user.Id, @@ -318,28 +308,16 @@ public class SysAuthService : IDynamicApiController, ITransient Address = user.Address, Signature = user.Signature, OrgId = user.OrgId, - OrgName = org?.Name, - OrgType = org?.Type, - PosName = pos?.Name, + OrgName = user.SysOrg?.Name, + OrgType = user.SysOrg?.Type, + PosName = user.SysPos?.Name, Apis = apis, Roles = roles, - WatermarkText = watermarkText, + WatermarkText = string.IsNullOrWhiteSpace(watermarkText) ? watermarkText : watermarkText + $"-{user.RealName}", LastChangePasswordTime = user.LastChangePasswordTime }; } - ///// - ///// 获取刷新Token 🔖 - ///// - ///// - ///// - //[DisplayName("获取刷新Token")] - //public string GetRefreshToken([FromQuery] string accessToken) - //{ - // var refreshTokenExpire = _sysConfigService.GetRefreshTokenExpire().GetAwaiter().GetResult(); - // return JWTEncryption.GenerateRefreshToken(accessToken, refreshTokenExpire); - //} - /// /// 退出系统 🔖 /// diff --git a/Admin.NET/Admin.NET.Core/Service/Org/SysOrgService.cs b/Admin.NET/Admin.NET.Core/Service/Org/SysOrgService.cs index 31d0f051..37e51fb4 100644 --- a/Admin.NET/Admin.NET.Core/Service/Org/SysOrgService.cs +++ b/Admin.NET/Admin.NET.Core/Service/Org/SysOrgService.cs @@ -401,7 +401,7 @@ public class SysOrgService : IDynamicApiController, ITransient } // 缓存当前用户最大角色数据范围 - _sysCacheService.Set(CacheConst.KeyRoleMaxDataScope + userId, strongerDataScopeType, TimeSpan.FromDays(7)); + _sysCacheService.Set($"{CacheConst.KeyRoleMaxDataScope}{userId}", strongerDataScopeType, TimeSpan.FromDays(7)); // 根据角色集合获取机构集合 var roleOrgIdList = await _sysRoleOrgService.GetRoleOrgIdList(customDataScopeRoleIdList); diff --git a/Admin.NET/Admin.NET.Core/Service/Role/SysRoleService.cs b/Admin.NET/Admin.NET.Core/Service/Role/SysRoleService.cs index 7be57962..27dc710f 100644 --- a/Admin.NET/Admin.NET.Core/Service/Role/SysRoleService.cs +++ b/Admin.NET/Admin.NET.Core/Service/Role/SysRoleService.cs @@ -403,7 +403,7 @@ public class SysRoleService : IDynamicApiController, ITransient public async Task>> GetUserApiList() { var userId = _userManager.UserId; - var apiList = _sysCacheService.Get>>(CacheConst.KeyUserApi + userId); + var apiList = _sysCacheService.Get>>($"{CacheConst.KeyUserApi}{userId}"); if (apiList != null) return apiList; apiList = [[], []]; @@ -441,7 +441,7 @@ public class SysRoleService : IDynamicApiController, ITransient // 排序接口名称 apiList[0].Sort(); apiList[1].Sort(); - _sysCacheService.Set(CacheConst.KeyUserApi + userId, apiList, TimeSpan.FromDays(7)); // 缓存7天 + _sysCacheService.Set($"{CacheConst.KeyUserApi}{userId}", apiList, TimeSpan.FromDays(7)); // 缓存7天 return apiList; } @@ -499,7 +499,7 @@ public class SysRoleService : IDynamicApiController, ITransient var userIdList = await _sysUserRoleService.GetUserIdList(roleId); foreach (var userId in userIdList) { - _sysCacheService.Remove(CacheConst.KeyUserApi + userId); + _sysCacheService.Remove($"{CacheConst.KeyUserApi}{userId}"); } } } \ No newline at end of file diff --git a/Admin.NET/Admin.NET.Core/Service/User/SysUserRoleService.cs b/Admin.NET/Admin.NET.Core/Service/User/SysUserRoleService.cs index c2216355..638f3fc5 100644 --- a/Admin.NET/Admin.NET.Core/Service/User/SysUserRoleService.cs +++ b/Admin.NET/Admin.NET.Core/Service/User/SysUserRoleService.cs @@ -39,7 +39,7 @@ public class SysUserRoleService : ITransient await _sysUserRoleRep.InsertRangeAsync(userRoles); // 清除缓存 - _sysCacheService.Remove(CacheConst.KeyUserApi + input.UserId); + _sysCacheService.Remove($"{CacheConst.KeyUserApi}{input.UserId}"); } /// @@ -61,7 +61,7 @@ public class SysUserRoleService : ITransient // 清除缓存 foreach (var userId in input.UserIdList) { - _sysCacheService.Remove(CacheConst.KeyUserApi + userId); + _sysCacheService.Remove($"{CacheConst.KeyUserApi}{userId}"); } } @@ -80,7 +80,7 @@ public class SysUserRoleService : ITransient // 清除缓存 foreach (var userId in userIdList) { - _sysCacheService.Remove(CacheConst.KeyUserApi + userId); + _sysCacheService.Remove($"{CacheConst.KeyUserApi}{userId}"); } await _sysUserRoleRep.DeleteAsync(u => u.RoleId == roleId); @@ -96,7 +96,7 @@ public class SysUserRoleService : ITransient await _sysUserRoleRep.DeleteAsync(u => u.UserId == userId); // 清除缓存 - _sysCacheService.Remove(CacheConst.KeyUserApi + userId); + _sysCacheService.Remove($"{CacheConst.KeyUserApi}{userId}"); } /// diff --git a/Admin.NET/Admin.NET.Core/Service/User/UserManager.cs b/Admin.NET/Admin.NET.Core/Service/User/UserManager.cs index 17df17d8..654ecd51 100644 --- a/Admin.NET/Admin.NET.Core/Service/User/UserManager.cs +++ b/Admin.NET/Admin.NET.Core/Service/User/UserManager.cs @@ -9,92 +9,118 @@ namespace Admin.NET.Core; /// /// 当前登录用户信息 /// -public class UserManager : IScoped +public class UserManager(IHttpContextAccessor httpContextAccessor, SysCacheService sysCacheService) : IScoped { - private readonly IHttpContextAccessor _httpContextAccessor; - /// /// 应用Id /// - public long AppId => (_httpContextAccessor.HttpContext?.User.FindFirst(ClaimConst.AppId)?.Value).ToLong(); + public long AppId => (httpContextAccessor.HttpContext?.User.FindFirst(ClaimConst.AppId)?.Value).ToLong(); /// /// 租户Id /// - public long TenantId => (_httpContextAccessor.HttpContext?.User.FindFirst(ClaimConst.TenantId)?.Value).ToLong(); + public long TenantId => (httpContextAccessor.HttpContext?.User.FindFirst(ClaimConst.TenantId)?.Value).ToLong(); /// /// 用户Id /// - public long UserId => (_httpContextAccessor.HttpContext?.User.FindFirst(ClaimConst.UserId)?.Value).ToLong(); + public long UserId => (httpContextAccessor.HttpContext?.User.FindFirst(ClaimConst.UserId)?.Value).ToLong(); /// /// 用户账号 /// - public string Account => _httpContextAccessor.HttpContext?.User.FindFirst(ClaimConst.Account)?.Value; + public string Account => httpContextAccessor.HttpContext?.User.FindFirst(ClaimConst.Account)?.Value; /// /// 真实姓名 /// - public string RealName => _httpContextAccessor.HttpContext?.User.FindFirst(ClaimConst.RealName)?.Value; + public string RealName => httpContextAccessor.HttpContext?.User.FindFirst(ClaimConst.RealName)?.Value; /// /// 昵称 /// - public string NickName => _httpContextAccessor.HttpContext?.User.FindFirst(ClaimConst.NickName)?.Value; + public string NickName => httpContextAccessor.HttpContext?.User.FindFirst(ClaimConst.NickName)?.Value; /// /// 账号类型 /// - public AccountTypeEnum? AccountType => int.TryParse(_httpContextAccessor.HttpContext?.User.FindFirst(ClaimConst.AccountType)?.Value, out var val) ? (AccountTypeEnum?)val : null; + public AccountTypeEnum? AccountType => int.TryParse(httpContextAccessor.HttpContext?.User.FindFirst(ClaimConst.AccountType)?.Value, out var val) ? (AccountTypeEnum?)val : null; /// /// 是否超级管理员 /// - public bool SuperAdmin => _httpContextAccessor.HttpContext?.User.FindFirst(ClaimConst.AccountType)?.Value == ((int)AccountTypeEnum.SuperAdmin).ToString(); + public bool SuperAdmin => httpContextAccessor.HttpContext?.User.FindFirst(ClaimConst.AccountType)?.Value == ((int)AccountTypeEnum.SuperAdmin).ToString(); /// /// 是否系统管理员 /// - public bool SysAdmin => _httpContextAccessor.HttpContext?.User.FindFirst(ClaimConst.AccountType)?.Value == ((int)AccountTypeEnum.SysAdmin).ToString(); + public bool SysAdmin => httpContextAccessor.HttpContext?.User.FindFirst(ClaimConst.AccountType)?.Value == ((int)AccountTypeEnum.SysAdmin).ToString(); /// /// 组织机构Id /// - public long OrgId => (_httpContextAccessor.HttpContext?.User.FindFirst(ClaimConst.OrgId)?.Value).ToLong(); + public long OrgId => (httpContextAccessor.HttpContext?.User.FindFirst(ClaimConst.OrgId)?.Value).ToLong(); /// /// 组织机构名称 /// - public string OrgName => (_httpContextAccessor.HttpContext?.User.FindFirst(ClaimConst.OrgName)?.Value); + public string OrgName => (httpContextAccessor.HttpContext?.User.FindFirst(ClaimConst.OrgName)?.Value); /// /// 组织机构Id /// - public string OrgType => (_httpContextAccessor.HttpContext?.User.FindFirst(ClaimConst.OrgType)?.Value); + public string OrgType => (httpContextAccessor.HttpContext?.User.FindFirst(ClaimConst.OrgType)?.Value); /// /// 组织机构级别 /// - public int OrgLevel => (_httpContextAccessor.HttpContext?.User.FindFirst(ClaimConst.OrgLevel)?.Value).ToInt(); + public int OrgLevel => (httpContextAccessor.HttpContext?.User.FindFirst(ClaimConst.OrgLevel)?.Value).ToInt(); /// /// 登录模式 /// - public int LoginMode => (_httpContextAccessor.HttpContext?.User.FindFirst(ClaimConst.LoginMode)?.Value).ToInt(); + public int LoginMode => (httpContextAccessor.HttpContext?.User.FindFirst(ClaimConst.LoginMode)?.Value).ToInt(); /// /// Token版本号 /// - public int TokenVersion => (_httpContextAccessor.HttpContext?.User.FindFirst(ClaimConst.TokenVersion)?.Value).ToInt(); + public int TokenVersion => (httpContextAccessor.HttpContext?.User.FindFirst(ClaimConst.TokenVersion)?.Value).ToInt(); /// /// 微信OpenId /// - public string OpenId => _httpContextAccessor.HttpContext?.User.FindFirst(ClaimConst.OpenId)?.Value; + public string OpenId => httpContextAccessor.HttpContext?.User.FindFirst(ClaimConst.OpenId)?.Value; - public UserManager(IHttpContextAccessor httpContextAccessor) + ///// + ///// 角色Id集合 + ///// + //public List RoleIds + //{ + // get + // { + // return sysCacheService.Get>($"{CacheConst.KeyUserOrg}{UserId}"); + // } + //} + + /// + /// 机构Id集合 + /// + public List OrgIds { - _httpContextAccessor = httpContextAccessor; + get + { + return sysCacheService.Get>($"{CacheConst.KeyUserOrg}{UserId}"); + } + } + + /// + /// 权限集合 + /// + public List> Permissions + { + get + { + return sysCacheService.Get>>($"{CacheConst.KeyUserApi}{UserId}"); + } } } \ No newline at end of file diff --git a/Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarFilter.cs b/Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarFilter.cs index 19db5f1a..51e00d7d 100644 --- a/Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarFilter.cs +++ b/Admin.NET/Admin.NET.Core/SqlSugar/SqlSugarFilter.cs @@ -110,7 +110,7 @@ public static class SqlSugarFilter if (string.IsNullOrWhiteSpace(userId)) return maxDataScope; // 获取用户最大数据范围---仅本人数据 - maxDataScope = App.GetRequiredService().Get(CacheConst.KeyRoleMaxDataScope + userId); + maxDataScope = App.GetRequiredService().Get($"{CacheConst.KeyRoleMaxDataScope}{userId}"); // 若为0则获取用户机构组织集合建立缓存 if (maxDataScope == 0) { @@ -119,7 +119,7 @@ public static class SqlSugarFilter { var services = scope.ServiceProvider; services.GetRequiredService().GetUserOrgIdList().GetAwaiter().GetResult(); - maxDataScope = services.GetRequiredService().Get(CacheConst.KeyRoleMaxDataScope + userId); + maxDataScope = services.GetRequiredService().Get($"{CacheConst.KeyRoleMaxDataScope}{userId}"); }); } if (maxDataScope != (int)DataScopeEnum.Self) return maxDataScope; diff --git a/Web/src/api-services/system/apis/sys-common-api.ts b/Web/src/api-services/system/apis/sys-common-api.ts index 897d3a5f..4d0e5753 100644 --- a/Web/src/api-services/system/apis/sys-common-api.ts +++ b/Web/src/api-services/system/apis/sys-common-api.ts @@ -23,7 +23,6 @@ import { AdminNETResultListString } from '../models'; import { AdminNETResultSmKeyPairOutput } from '../models'; import { AdminNETResultStressTestHarnessResult } from '../models'; import { AdminNETResultString } from '../models'; -import { NameAbbrInput } from '../models'; import { StressTestInput } from '../models'; /** * SysCommonApi - axios parameter creator @@ -273,54 +272,6 @@ export const SysCommonApiAxiosParamCreator = function (configuration?: Configura options: localVarRequestOptions, }; }, - /** - * 获取文本简称 - * @summary 获取文本简称 - * @param {NameAbbrInput} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - apiSysCommonNameAbbrPost: async (body?: NameAbbrInput, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/sysCommon/nameAbbr`; - // use dummy base URL string because the URL constructor only accepts absolute URLs. - const localVarUrlObj = new URL(localVarPath, 'https://example.com'); - let baseOptions; - if (configuration) { - baseOptions = configuration.baseOptions; - } - const localVarRequestOptions :AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options}; - const localVarHeaderParameter = {} as any; - const localVarQueryParameter = {} as any; - - // authentication Bearer required - // http bearer authentication required - if (configuration && configuration.accessToken) { - const accessToken = typeof configuration.accessToken === 'function' - ? await configuration.accessToken() - : await configuration.accessToken; - localVarHeaderParameter["Authorization"] = "Bearer " + accessToken; - } - - localVarHeaderParameter['Content-Type'] = 'application/json-patch+json'; - - const query = new URLSearchParams(localVarUrlObj.search); - for (const key in localVarQueryParameter) { - query.set(key, localVarQueryParameter[key]); - } - for (const key in options.params) { - query.set(key, options.params[key]); - } - localVarUrlObj.search = (new URLSearchParams(query)).toString(); - let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; - localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json'; - localVarRequestOptions.data = needsSerialization ? JSON.stringify(body !== undefined ? body : {}) : (body || ""); - - return { - url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash, - options: localVarRequestOptions, - }; - }, /** * * @summary 国密SM2解密字符串 🔖 @@ -632,20 +583,6 @@ export const SysCommonApiFp = function(configuration?: Configuration) { return axios.request(axiosRequestArgs); }; }, - /** - * 获取文本简称 - * @summary 获取文本简称 - * @param {NameAbbrInput} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async apiSysCommonNameAbbrPost(body?: NameAbbrInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise>> { - const localVarAxiosArgs = await SysCommonApiAxiosParamCreator(configuration).apiSysCommonNameAbbrPost(body, options); - return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => { - const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url}; - return axios.request(axiosRequestArgs); - }; - }, /** * * @summary 国密SM2解密字符串 🔖 @@ -773,16 +710,6 @@ export const SysCommonApiFactory = function (configuration?: Configuration, base async apiSysCommonMachineSerialKeyGet(options?: AxiosRequestConfig): Promise> { return SysCommonApiFp(configuration).apiSysCommonMachineSerialKeyGet(options).then((request) => request(axios, basePath)); }, - /** - * 获取文本简称 - * @summary 获取文本简称 - * @param {NameAbbrInput} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - */ - async apiSysCommonNameAbbrPost(body?: NameAbbrInput, options?: AxiosRequestConfig): Promise> { - return SysCommonApiFp(configuration).apiSysCommonNameAbbrPost(body, options).then((request) => request(axios, basePath)); - }, /** * * @summary 国密SM2解密字符串 🔖 @@ -896,17 +823,6 @@ export class SysCommonApi extends BaseAPI { public async apiSysCommonMachineSerialKeyGet(options?: AxiosRequestConfig) : Promise> { return SysCommonApiFp(this.configuration).apiSysCommonMachineSerialKeyGet(options).then((request) => request(this.axios, this.basePath)); } - /** - * 获取文本简称 - * @summary 获取文本简称 - * @param {NameAbbrInput} [body] - * @param {*} [options] Override http request option. - * @throws {RequiredError} - * @memberof SysCommonApi - */ - public async apiSysCommonNameAbbrPost(body?: NameAbbrInput, options?: AxiosRequestConfig) : Promise> { - return SysCommonApiFp(this.configuration).apiSysCommonNameAbbrPost(body, options).then((request) => request(this.axios, this.basePath)); - } /** * * @summary 国密SM2解密字符串 🔖 diff --git a/Web/src/api-services/system/models/add-code-gen-input.ts b/Web/src/api-services/system/models/add-code-gen-input.ts index 8f959f49..30208404 100644 --- a/Web/src/api-services/system/models/add-code-gen-input.ts +++ b/Web/src/api-services/system/models/add-code-gen-input.ts @@ -175,14 +175,6 @@ export interface AddCodeGenInput { */ tableList: Array; - /** - * 简拼 - * - * @type {string} - * @memberof AddCodeGenInput - */ - pinyin?: string | null; - /** * @type {CodeGenMethodEnum} * @memberof AddCodeGenInput diff --git a/Web/src/api-services/system/models/index.ts b/Web/src/api-services/system/models/index.ts index da625b07..6e22a724 100644 --- a/Web/src/api-services/system/models/index.ts +++ b/Web/src/api-services/system/models/index.ts @@ -336,7 +336,6 @@ export * from './mqtt-client-status'; export * from './mqtt-protocol-version'; export * from './mqtt-session-status'; export * from './mzb-input'; -export * from './name-abbr-input'; export * from './navigate'; export * from './network-info'; export * from './network-interface-statistics'; @@ -407,7 +406,6 @@ export * from './reset-column-custom-input'; export * from './reset-interval-enum'; export * from './reset-pwd-user-input'; export * from './role-api-input'; -export * from './role-dto'; export * from './role-input'; export * from './role-menu-input'; export * from './role-org-input'; diff --git a/Web/src/api-services/system/models/login-user-output.ts b/Web/src/api-services/system/models/login-user-output.ts index 9e9523d2..57a32d3c 100644 --- a/Web/src/api-services/system/models/login-user-output.ts +++ b/Web/src/api-services/system/models/login-user-output.ts @@ -13,7 +13,7 @@ */ import { AccountTypeEnum } from './account-type-enum'; -import { RoleDto } from './role-dto'; +import { RoleOutput } from './role-output'; /** * 用户登录信息 * @@ -159,10 +159,10 @@ export interface LoginUserOutput { /** * 角色集合 * - * @type {Array} + * @type {Array} * @memberof LoginUserOutput */ - roles?: Array | null; + roles?: Array | null; /** * 水印文字 diff --git a/Web/src/api-services/system/models/name-abbr-input.ts b/Web/src/api-services/system/models/name-abbr-input.ts deleted file mode 100644 index ff61b63a..00000000 --- a/Web/src/api-services/system/models/name-abbr-input.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Admin.NET 通用权限开发平台 - * 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。
👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - - /** - * 获取文本简称 - * - * @export - * @interface NameAbbrInput - */ -export interface NameAbbrInput { - - /** - * 文本 - * - * @type {string} - * @memberof NameAbbrInput - */ - text?: string | null; - - /** - * 是否全称 - * - * @type {boolean} - * @memberof NameAbbrInput - */ - all?: boolean; -} diff --git a/Web/src/api-services/system/models/role-dto.ts b/Web/src/api-services/system/models/role-dto.ts deleted file mode 100644 index bf7b21b7..00000000 --- a/Web/src/api-services/system/models/role-dto.ts +++ /dev/null @@ -1,46 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Admin.NET 通用权限开发平台 - * 让 .NET 开发更简单、更通用、更流行。整合最新技术,模块插件式开发,前后端分离,开箱即用。
👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任! - * - * OpenAPI spec version: 1.0.0 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - - /** - * 角色 - * - * @export - * @interface RoleDto - */ -export interface RoleDto { - - /** - * 角色Id - * - * @type {number} - * @memberof RoleDto - */ - id?: number; - - /** - * 名称 - * - * @type {string} - * @memberof RoleDto - */ - name?: string | null; - - /** - * 编码 - * - * @type {string} - * @memberof RoleDto - */ - code?: string | null; -} diff --git a/Web/src/api-services/system/models/sys-code-gen.ts b/Web/src/api-services/system/models/sys-code-gen.ts index c8888112..b3df0aba 100644 --- a/Web/src/api-services/system/models/sys-code-gen.ts +++ b/Web/src/api-services/system/models/sys-code-gen.ts @@ -216,12 +216,4 @@ export interface SysCodeGen { * @memberof SysCodeGen */ tableList?: Array | null; - - /** - * 简拼 - * - * @type {string} - * @memberof SysCodeGen - */ - pinyin?: string | null; } diff --git a/Web/src/api-services/system/models/update-code-gen-input.ts b/Web/src/api-services/system/models/update-code-gen-input.ts index db2ed970..f6d5293b 100644 --- a/Web/src/api-services/system/models/update-code-gen-input.ts +++ b/Web/src/api-services/system/models/update-code-gen-input.ts @@ -167,14 +167,6 @@ export interface UpdateCodeGenInput { */ tableList: Array; - /** - * 简拼 - * - * @type {string} - * @memberof UpdateCodeGenInput - */ - pinyin?: string | null; - /** * @type {CodeGenMethodEnum} * @memberof UpdateCodeGenInput