😎调整用户接口权限模式(按钮权限+接口资源 互补)
This commit is contained in:
parent
ac4265296a
commit
24f33c4d40
@ -16,11 +16,6 @@ public class CacheConst
|
||||
/// </summary>
|
||||
public const string KeyUserApi = "sys_user_api:";
|
||||
|
||||
/// <summary>
|
||||
/// 基础接口缓存(接口集合)
|
||||
/// </summary>
|
||||
public const string KeyBaseApi = "sys_base_api:";
|
||||
|
||||
/// <summary>
|
||||
/// 用户机构缓存
|
||||
/// </summary>
|
||||
|
||||
@ -1,22 +0,0 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core;
|
||||
|
||||
/// <summary>
|
||||
/// 系统基础接口表
|
||||
/// </summary>
|
||||
[SugarTable(null, "系统基础接口表")]
|
||||
[SysTable]
|
||||
public class SysBaseApi : EntityBaseId
|
||||
{
|
||||
/// <summary>
|
||||
/// 接口路由
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "接口路由", ColumnDataType = StaticConfig.CodeFirst_BigString)]
|
||||
[Required]
|
||||
public string Route { get; set; }
|
||||
}
|
||||
@ -42,8 +42,5 @@ public class OnlineUserJob : IJob
|
||||
|
||||
// 缓存租户列表
|
||||
await serviceScope.ServiceProvider.GetRequiredService<SysTenantService>().CacheTenant();
|
||||
|
||||
// 初始化管理员角色接口资源
|
||||
await serviceScope.ServiceProvider.GetRequiredService<SysRoleService>().InitAdminRoleApi();
|
||||
}
|
||||
}
|
||||
@ -1,52 +0,0 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core;
|
||||
|
||||
/// <summary>
|
||||
/// 系统基础接口资源表种子数据
|
||||
/// </summary>
|
||||
public class SysBaseApiSeedData : ISqlSugarEntitySeedData<SysBaseApi>
|
||||
{
|
||||
/// <summary>
|
||||
/// 种子数据
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public IEnumerable<SysBaseApi> HasData()
|
||||
{
|
||||
return new[]
|
||||
{
|
||||
new SysBaseApi { Id = 1300000000010, Route = "sysAuth/login" },
|
||||
new SysBaseApi { Id = 1300000000020, Route = "sysAuth/unLockScreen" },
|
||||
new SysBaseApi { Id = 1300000000030, Route = "sysAuth/userInfo" },
|
||||
new SysBaseApi { Id = 1300000000040, Route = "sysAuth/refreshToken" },
|
||||
new SysBaseApi { Id = 1300000000050, Route = "sysAuth/loginConfig" },
|
||||
new SysBaseApi { Id = 1300000000060, Route = "sysAuth/watermarkConfig" },
|
||||
new SysBaseApi { Id = 1300000000070, Route = "sysAuth/captcha" },
|
||||
new SysBaseApi { Id = 1300000000080, Route = "sysAuth/logout" },
|
||||
new SysBaseApi { Id = 1300000000090, Route = "sysMenu/loginMenuTree" },
|
||||
new SysBaseApi { Id = 1300000000100, Route = "sysOAuth/signIn" },
|
||||
new SysBaseApi { Id = 1300000000110, Route = "sysOAuth/signInCallback" },
|
||||
new SysBaseApi { Id = 1300000000120, Route = "sysOnlineUser/page" },
|
||||
new SysBaseApi { Id = 1300000000130, Route = "sysOrg/list" },
|
||||
new SysBaseApi { Id = 1300000000140, Route = "sysPos/list" },
|
||||
new SysBaseApi { Id = 1300000000150, Route = "sysRole/page" },
|
||||
new SysBaseApi { Id = 1300000000160, Route = "sysRole/list" },
|
||||
new SysBaseApi { Id = 1300000000170, Route = "sysFile/uploadAvatar" },
|
||||
new SysBaseApi { Id = 1300000000180, Route = "sysFile/uploadSignature" },
|
||||
new SysBaseApi { Id = 1300000000190, Route = "sysUser/baseInfo" },
|
||||
new SysBaseApi { Id = 1300000000200, Route = "sysUser/changePwd" },
|
||||
new SysBaseApi { Id = 1300000000210, Route = "sysNotice/page" },
|
||||
new SysBaseApi { Id = 1300000000220, Route = "sysNotice/add" },
|
||||
new SysBaseApi { Id = 1300000000230, Route = "sysNotice/update" },
|
||||
new SysBaseApi { Id = 1300000000240, Route = "sysNotice/delete" },
|
||||
new SysBaseApi { Id = 1300000000250, Route = "sysNotice/public" },
|
||||
new SysBaseApi { Id = 1300000000260, Route = "sysNotice/setRead" },
|
||||
new SysBaseApi { Id = 1300000000270, Route = "sysNotice/pageReceived" },
|
||||
new SysBaseApi { Id = 1300000000280, Route = "sysNotice/unReadList" },
|
||||
};
|
||||
}
|
||||
}
|
||||
@ -12,6 +12,7 @@ namespace Admin.NET.Core.Service;
|
||||
/// <summary>
|
||||
/// 系统登录授权服务 🧩
|
||||
/// </summary>
|
||||
[AllowAnonymous]
|
||||
[ApiDescriptionSettings(Order = 500)]
|
||||
public class SysAuthService : IDynamicApiController, ITransient
|
||||
{
|
||||
@ -55,7 +56,6 @@ public class SysAuthService : IDynamicApiController, ITransient
|
||||
/// <param name="input"></param>
|
||||
/// <remarks>用户名/密码:superadmin/123456</remarks>
|
||||
/// <returns></returns>
|
||||
[AllowAnonymous]
|
||||
[DisplayName("账号密码登录")]
|
||||
public virtual async Task<LoginOutput> Login([Required] LoginInput input)
|
||||
{
|
||||
@ -188,7 +188,6 @@ public class SysAuthService : IDynamicApiController, ITransient
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[AllowAnonymous]
|
||||
[DisplayName("手机号登录")]
|
||||
public virtual async Task<LoginOutput> LoginPhone([Required] LoginPhoneInput input)
|
||||
{
|
||||
@ -215,7 +214,7 @@ public class SysAuthService : IDynamicApiController, ITransient
|
||||
internal async Task<LoginOutput> CreateToken(SysUser user, LoginModeEnum loginMode)
|
||||
{
|
||||
// 默认PC端登录模式
|
||||
if (loginMode == 0)
|
||||
if (loginMode == 0)
|
||||
loginMode = LoginModeEnum.PC;
|
||||
|
||||
// 单用户登录
|
||||
@ -337,7 +336,6 @@ public class SysAuthService : IDynamicApiController, ITransient
|
||||
/// 获取验证码 🔖
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[AllowAnonymous]
|
||||
[SuppressMonitor]
|
||||
[DisplayName("获取验证码")]
|
||||
public dynamic GetCaptcha()
|
||||
@ -352,7 +350,6 @@ public class SysAuthService : IDynamicApiController, ITransient
|
||||
/// Swagger登录检查 🔖
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[AllowAnonymous]
|
||||
[HttpPost("/api/swagger/checkUrl"), NonUnify]
|
||||
[DisplayName("Swagger登录检查")]
|
||||
public int SwaggerCheckUrl()
|
||||
@ -365,7 +362,6 @@ public class SysAuthService : IDynamicApiController, ITransient
|
||||
/// </summary>
|
||||
/// <param name="auth"></param>
|
||||
/// <returns></returns>
|
||||
[AllowAnonymous]
|
||||
[HttpPost("/api/swagger/submitUrl"), NonUnify]
|
||||
[DisplayName("Swagger登录提交")]
|
||||
public async Task<int> SwaggerSubmitUrl([FromForm] SpecificationAuth auth)
|
||||
|
||||
@ -213,7 +213,7 @@ public class SysConfigService : IDynamicApiController, ITransient
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量更新参数配置值
|
||||
/// 批量更新参数配置值 🔖
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
|
||||
@ -138,7 +138,7 @@ public class SysFileService : IDynamicApiController, ITransient
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 文件预览
|
||||
/// 文件预览 🔖
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
@ -275,7 +275,7 @@ public class SysFileService : IDynamicApiController, ITransient
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取文件
|
||||
/// 获取文件 🔖
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
@ -389,7 +389,7 @@ public class SysFileService : IDynamicApiController, ITransient
|
||||
}
|
||||
else if (App.Configuration["SSHProvider:IsEnable"].ToBoolean())
|
||||
{
|
||||
var fullPath = string.Concat(path.StartsWith("/") ? path : "/" + path, "/", finalName);
|
||||
var fullPath = string.Concat(path.StartsWith('/') ? path : "/" + path, "/", finalName);
|
||||
using (SSHHelper helper = new SSHHelper(App.Configuration["SSHProvider:Host"],
|
||||
App.Configuration["SSHProvider:Port"].ToInt(), App.Configuration["SSHProvider:Username"], App.Configuration["SSHProvider:Password"]))
|
||||
{
|
||||
@ -475,7 +475,7 @@ public class SysFileService : IDynamicApiController, ITransient
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改附件关联对象
|
||||
/// 修改附件关联对象 🔖
|
||||
/// </summary>
|
||||
/// <param name="ids"></param>
|
||||
/// <param name="relationName"></param>
|
||||
|
||||
@ -35,6 +35,7 @@ public class SysMenuService : IDynamicApiController, ITransient
|
||||
/// 获取登录菜单树 🔖
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[AllowAnonymous]
|
||||
[DisplayName("获取登录菜单树")]
|
||||
public async Task<List<MenuOutput>> GetLoginMenuTree()
|
||||
{
|
||||
|
||||
@ -29,7 +29,7 @@ public class SysOpenAccessService : IDynamicApiController, ITransient
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 生成签名
|
||||
/// 生成签名 🔖
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
|
||||
@ -1,45 +0,0 @@
|
||||
// Admin.NET 项目的版权、商标、专利和其他相关权利均受相应法律法规的保护。使用本项目应遵守相关法律法规和许可证的要求。
|
||||
//
|
||||
// 本项目主要遵循 MIT 许可证和 Apache 许可证(版本 2.0)进行分发和使用。许可证位于源代码树根目录中的 LICENSE-MIT 和 LICENSE-APACHE 文件。
|
||||
//
|
||||
// 不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动!任何基于本项目二次开发而产生的一切法律纠纷和责任,我们不承担任何责任!
|
||||
|
||||
namespace Admin.NET.Core.Service;
|
||||
|
||||
/// <summary>
|
||||
/// 系统基础接口资源服务
|
||||
/// </summary>
|
||||
public class SysBaseApiService : ITransient
|
||||
{
|
||||
private readonly SqlSugarRepository<SysBaseApi> _sysBaseApiRep;
|
||||
|
||||
public SysBaseApiService(SqlSugarRepository<SysBaseApi> sysBaseApiRep)
|
||||
{
|
||||
_sysBaseApiRep = sysBaseApiRep;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置基础接口资源
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
public async Task SetBaseApi(BaseApiInput input)
|
||||
{
|
||||
await _sysBaseApiRep.DeleteAsync(u => u.Id > 0);
|
||||
|
||||
var baseApis = input.ApiList.Select(u => new SysBaseApi
|
||||
{
|
||||
Route = u
|
||||
}).ToList();
|
||||
await _sysBaseApiRep.InsertRangeAsync(baseApis);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取基础接口资源集合
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public async Task<List<string>> GetBaseApiList()
|
||||
{
|
||||
return await _sysBaseApiRep.AsQueryable().Select(u => u.Route).ToListAsync();
|
||||
}
|
||||
}
|
||||
@ -17,8 +17,8 @@ public class SysRoleService : IDynamicApiController, ITransient
|
||||
private readonly SysRoleOrgService _sysRoleOrgService;
|
||||
private readonly SysRoleMenuService _sysRoleMenuService;
|
||||
private readonly SysRoleApiService _sysRoleApiService;
|
||||
private readonly SysBaseApiService _sysBaseApiService;
|
||||
private readonly SysOrgService _sysOrgService;
|
||||
private readonly SysMenuService _sysMenuService;
|
||||
private readonly SysUserRoleService _sysUserRoleService;
|
||||
private readonly SysCacheService _sysCacheService;
|
||||
private readonly SysCommonService _sysCommonService;
|
||||
@ -28,8 +28,8 @@ public class SysRoleService : IDynamicApiController, ITransient
|
||||
SysRoleOrgService sysRoleOrgService,
|
||||
SysRoleMenuService sysRoleMenuService,
|
||||
SysRoleApiService sysRoleApiService,
|
||||
SysBaseApiService sysBaseApiService,
|
||||
SysOrgService sysOrgService,
|
||||
SysMenuService sysMenuService,
|
||||
SysUserRoleService sysUserRoleService,
|
||||
SysCacheService sysCacheService,
|
||||
SysCommonService sysCommonService)
|
||||
@ -39,8 +39,8 @@ public class SysRoleService : IDynamicApiController, ITransient
|
||||
_sysRoleOrgService = sysRoleOrgService;
|
||||
_sysRoleMenuService = sysRoleMenuService;
|
||||
_sysRoleApiService = sysRoleApiService;
|
||||
_sysBaseApiService = sysBaseApiService;
|
||||
_sysOrgService = sysOrgService;
|
||||
_sysMenuService = sysMenuService;
|
||||
_sysUserRoleService = sysUserRoleService;
|
||||
_sysCacheService = sysCacheService;
|
||||
_sysCommonService = sysCommonService;
|
||||
@ -289,28 +289,30 @@ public class SysRoleService : IDynamicApiController, ITransient
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据角色Id获取接口资源集合 🔖
|
||||
/// 获取角色接口资源集合 🔖
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[DisplayName("根据角色Id获取接口资源集合")]
|
||||
public async Task<List<string>> GetOwnApiList([FromQuery] RoleInput input)
|
||||
[DisplayName("获取角色接口资源集合")]
|
||||
public async Task<List<string>> GetRoleApiList([FromQuery] RoleInput input)
|
||||
{
|
||||
return await _sysRoleApiService.GetRoleApiList(new List<long> { input.Id });
|
||||
var roleApis = await _sysRoleApiService.GetRoleApiList(new List<long> { input.Id });
|
||||
var roleButtons = await GetRoleButtonList(new List<long> { input.Id });
|
||||
return roleApis.Union(roleButtons).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取用户拥有接口资源集合(缓存) 🔖
|
||||
/// 获取用户接口资源集合 🔖
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[DisplayName("获取用户拥有接口资源集合")]
|
||||
[DisplayName("获取用户接口资源集合")]
|
||||
public async Task<List<string>> GetUserApiList()
|
||||
{
|
||||
var userId = _userManager.UserId;
|
||||
var apiList = _sysCacheService.Get<List<string>>(CacheConst.KeyUserApi + userId);
|
||||
if (apiList == null)
|
||||
{
|
||||
// 超管时获取所有接口资源
|
||||
// 超管账号获取所有接口资源
|
||||
if (_userManager.SuperAdmin)
|
||||
{
|
||||
var allApiList = _sysCommonService.GetApiList();
|
||||
@ -327,6 +329,8 @@ public class SysRoleService : IDynamicApiController, ITransient
|
||||
{
|
||||
var roleIds = await _sysUserRoleService.GetUserRoleIdList(_userManager.UserId);
|
||||
apiList = await _sysRoleApiService.GetRoleApiList(roleIds);
|
||||
var roleButtons = await GetRoleButtonList(roleIds);
|
||||
apiList = apiList.Union(roleButtons).ToList();
|
||||
}
|
||||
_sysCacheService.Set(CacheConst.KeyUserApi + userId, apiList, TimeSpan.FromDays(7));
|
||||
}
|
||||
@ -334,64 +338,37 @@ public class SysRoleService : IDynamicApiController, ITransient
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置基础接口资源
|
||||
/// 获取用户按钮权限集合
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
[DisplayName("设置基础接口资源")]
|
||||
public async Task SetBaseApi(BaseApiInput input)
|
||||
[NonAction]
|
||||
public async Task<List<string>> GetUserButtonList()
|
||||
{
|
||||
_sysCacheService.Remove(CacheConst.KeyBaseApi);
|
||||
var menuIdList = new List<long>();
|
||||
if (!_userManager.SuperAdmin)
|
||||
{
|
||||
var roleIdList = await _sysUserRoleService.GetUserRoleIdList(_userManager.UserId);
|
||||
menuIdList = await _sysRoleMenuService.GetRoleMenuIdList(roleIdList);
|
||||
}
|
||||
|
||||
await _sysBaseApiService.SetBaseApi(input);
|
||||
return await _sysRoleRep.ChangeRepository<SqlSugarRepository<SysMenu>>().AsQueryable()
|
||||
.Where(u => u.Type == MenuTypeEnum.Btn)
|
||||
.WhereIF(menuIdList.Count > 0, u => menuIdList.Contains(u.Id))
|
||||
.Select(u => u.Permission).ToListAsync();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取基础接口资源集合
|
||||
/// 获取角色按钮权限集合
|
||||
/// </summary>
|
||||
/// <param name="roleIds"></param>
|
||||
/// <returns></returns>
|
||||
[DisplayName("获取基础接口资源集合")]
|
||||
public async Task<List<string>> GetBaseApiList()
|
||||
[NonAction]
|
||||
public async Task<List<string>> GetRoleButtonList(List<long> roleIds)
|
||||
{
|
||||
var apiList = _sysCacheService.Get<List<string>>(CacheConst.KeyBaseApi);
|
||||
if (apiList == null)
|
||||
{
|
||||
apiList = await _sysBaseApiService.GetBaseApiList();
|
||||
_sysCacheService.Set(CacheConst.KeyBaseApi, apiList);
|
||||
}
|
||||
return apiList;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 初始化管理员角色接口资源
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[DisplayName("初始化管理员角色接口资源")]
|
||||
public async Task InitAdminRoleApi()
|
||||
{
|
||||
// 获取所有接口资源
|
||||
var allApiList = _sysCommonService.GetApiList();
|
||||
|
||||
var idIndex = 0;
|
||||
var sysRoleApis = new List<SysRoleApi>();
|
||||
foreach (var apiOutput in allApiList)
|
||||
{
|
||||
foreach (var controller in apiOutput.Children)
|
||||
{
|
||||
if (controller.Name == "sysTenant") continue; // 排除租户管理接口
|
||||
|
||||
foreach (var api in controller.Children)
|
||||
{
|
||||
sysRoleApis.Add(new SysRoleApi { Id = 1400000000101 + idIndex, RoleId = 1300000000101, Route = api.Route });
|
||||
idIndex++;
|
||||
}
|
||||
}
|
||||
}
|
||||
// 更新系统管理员角色的接口资源
|
||||
var storage = _sysRoleRep.Context.StorageableByObject(sysRoleApis).ToStorage();
|
||||
storage.AsInsertable.ExecuteCommand();
|
||||
storage.AsUpdateable.ExecuteCommand();
|
||||
|
||||
await Task.CompletedTask;
|
||||
var menuIdList = await _sysRoleMenuService.GetRoleMenuIdList(roleIds);
|
||||
return await _sysRoleRep.ChangeRepository<SqlSugarRepository<SysMenu>>().AsQueryable()
|
||||
.Where(u => u.Type == MenuTypeEnum.Btn)
|
||||
.WhereIF(menuIdList.Count > 0, u => menuIdList.Contains(u.Id))
|
||||
.Select(u => u.Permission).ToListAsync();
|
||||
}
|
||||
}
|
||||
@ -7,8 +7,9 @@
|
||||
namespace Admin.NET.Core.Service;
|
||||
|
||||
/// <summary>
|
||||
/// 系统日程服务
|
||||
/// 系统日程服务 🧩
|
||||
/// </summary>
|
||||
[AllowAnonymous]
|
||||
[ApiDescriptionSettings(Order = 295)]
|
||||
public class SysScheduleService : IDynamicApiController, ITransient
|
||||
{
|
||||
@ -23,7 +24,7 @@ public class SysScheduleService : IDynamicApiController, ITransient
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取日程列表
|
||||
/// 获取日程列表 🔖
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[DisplayName("获取日程列表")]
|
||||
@ -38,7 +39,7 @@ public class SysScheduleService : IDynamicApiController, ITransient
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取日程详情
|
||||
/// 获取日程详情 🔖
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
@ -49,7 +50,7 @@ public class SysScheduleService : IDynamicApiController, ITransient
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 增加日程
|
||||
/// 增加日程 🔖
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
@ -62,7 +63,7 @@ public class SysScheduleService : IDynamicApiController, ITransient
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新日程
|
||||
/// 更新日程 🔖
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
@ -74,7 +75,7 @@ public class SysScheduleService : IDynamicApiController, ITransient
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除日程
|
||||
/// 删除日程 🔖
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
@ -86,7 +87,7 @@ public class SysScheduleService : IDynamicApiController, ITransient
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置日程状态
|
||||
/// 设置日程状态 🔖
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
/// <returns></returns>
|
||||
|
||||
@ -9,6 +9,7 @@ namespace Admin.NET.Core.Service;
|
||||
/// <summary>
|
||||
/// 系统用户菜单快捷导航服务 🧩
|
||||
/// </summary>
|
||||
[AllowAnonymous]
|
||||
[ApiDescriptionSettings(Order = 445)]
|
||||
public class SysUserMenuService : IDynamicApiController, ITransient
|
||||
{
|
||||
|
||||
@ -37,7 +37,6 @@ public class SysUserRoleService : ITransient
|
||||
RoleId = u
|
||||
}).ToList();
|
||||
await _sysUserRoleRep.InsertRangeAsync(roles);
|
||||
_sysCacheService.Remove(CacheConst.KeyUserApi + input.UserId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -47,14 +46,6 @@ public class SysUserRoleService : ITransient
|
||||
/// <returns></returns>
|
||||
public async Task DeleteUserRoleByRoleId(long roleId)
|
||||
{
|
||||
await _sysUserRoleRep.AsQueryable()
|
||||
.Where(u => u.RoleId == roleId)
|
||||
.Select(u => u.UserId)
|
||||
.ForEachAsync(userId =>
|
||||
{
|
||||
_sysCacheService.Remove(CacheConst.KeyUserApi + userId);
|
||||
});
|
||||
|
||||
await _sysUserRoleRep.DeleteAsync(u => u.RoleId == roleId);
|
||||
}
|
||||
|
||||
@ -66,7 +57,6 @@ public class SysUserRoleService : ITransient
|
||||
public async Task DeleteUserRoleByUserId(long userId)
|
||||
{
|
||||
await _sysUserRoleRep.DeleteAsync(u => u.UserId == userId);
|
||||
_sysCacheService.Remove(CacheConst.KeyUserApi + userId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@ -280,7 +280,7 @@ public class SysWechatPayService : IDynamicApiController, ITransient
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 退款申请
|
||||
/// 退款申请 🔖
|
||||
/// https://pay.weixin.qq.com/docs/merchant/apis/mini-program-payment/create.html
|
||||
/// </summary>
|
||||
/// <param name="input"></param>
|
||||
@ -332,7 +332,7 @@ public class SysWechatPayService : IDynamicApiController, ITransient
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询单笔退款(通过商户退款单号)
|
||||
/// 查询单笔退款(通过商户退款单号) 🔖
|
||||
/// https://pay.weixin.qq.com/docs/merchant/apis/mini-program-payment/query-by-out-refund-no.html
|
||||
/// </summary>
|
||||
/// <param name="outRefundNumber"></param>
|
||||
@ -348,12 +348,12 @@ public class SysWechatPayService : IDynamicApiController, ITransient
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 微信支付订单号查询(校正)
|
||||
/// 微信支付订单号查询(校正) 🔖
|
||||
/// https://api.mch.weixin.qq.com/v3/pay/transactions/id/{transaction_id}
|
||||
/// </summary>
|
||||
/// <param name="transactionId"></param>
|
||||
/// <returns></returns>
|
||||
[DisplayName("微信支付订单号查询(校正)")]
|
||||
[DisplayName("微信支付订单号查询(校正)")]
|
||||
public async Task<WechatPayOutput> GetPayTransactionByIdAsync(string transactionId)
|
||||
{
|
||||
if (string.IsNullOrEmpty(transactionId))
|
||||
@ -389,12 +389,12 @@ public class SysWechatPayService : IDynamicApiController, ITransient
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 商户订单号查询(校正)
|
||||
/// 商户订单号查询(校正) 🔖
|
||||
/// https://api.mch.weixin.qq.com/v3/pay/transactions/out-trade-no/{out_trade_no}
|
||||
/// </summary>
|
||||
/// <param name="outTradeNumber"></param>
|
||||
/// <returns></returns>
|
||||
[DisplayName("微信商户订单号查询(校正)")]
|
||||
[DisplayName("微信商户订单号查询(校正)")]
|
||||
public async Task<WechatPayOutput> GetPayTransactionByOutTradeNumberAsync(string outTradeNumber)
|
||||
{
|
||||
if (string.IsNullOrEmpty(outTradeNumber))
|
||||
@ -431,11 +431,11 @@ public class SysWechatPayService : IDynamicApiController, ITransient
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取支付记录列表(分页)
|
||||
/// 获取支付记录分页列表 🔖
|
||||
/// </summary>
|
||||
/// <param name="input">PageSysWechatPayInput</param>
|
||||
/// <returns></returns>
|
||||
[DisplayName("获取支付记录列表(分页)")]
|
||||
[DisplayName("获取支付记录分页列表")]
|
||||
public async Task<SqlSugarPagedList<SysWechatPay>> PageAsync(PageSysWechatPayInput input)
|
||||
{
|
||||
var query = _sysWechatPayRep.AsQueryable()
|
||||
|
||||
@ -212,7 +212,7 @@ public class SysWxOpenService : IDynamicApiController, ITransient
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 生成二维码
|
||||
/// 生成小程序二维码 🔖
|
||||
/// </summary>
|
||||
/// <param name="input"> 扫码进入的小程序页面路径,最大长度 128 个字符,不能为空; eg: pages / index ? id = AY000001 </param>
|
||||
/// <returns></returns>
|
||||
|
||||
@ -79,24 +79,18 @@ namespace Admin.NET.Web.Core
|
||||
/// <returns></returns>
|
||||
private static async Task<bool> CheckAuthorizeAsync(DefaultHttpContext httpContext)
|
||||
{
|
||||
// 排除超管权限
|
||||
// 排除超管账号
|
||||
if (App.User.FindFirst(ClaimConst.AccountType)?.Value == ((int)AccountTypeEnum.SuperAdmin).ToString())
|
||||
return true;
|
||||
|
||||
// 接口路由权限
|
||||
// 当前接口路由
|
||||
var path = httpContext.Request.Path.ToString();
|
||||
|
||||
var serviceScope = httpContext.RequestServices.CreateScope();
|
||||
|
||||
// 若当前路由在已有角色接口资源里面则放行
|
||||
var sysRoleService = serviceScope.ServiceProvider.GetRequiredService<SysRoleService>();
|
||||
|
||||
// 若当前路由在基础接口资源集合里面则放行
|
||||
var baseApis = await sysRoleService.GetBaseApiList();
|
||||
if (baseApis.Exists(u => path.Contains(u, StringComparison.CurrentCultureIgnoreCase)))
|
||||
return true;
|
||||
|
||||
// 判断当前路由是否在角色已有接口资源里面
|
||||
var roleApis = await sysRoleService.GetUserApiList();
|
||||
return roleApis.Exists(u => path.Contains(u, StringComparison.CurrentCultureIgnoreCase));
|
||||
return roleApis.Exists(u => path.Equals(u, StringComparison.CurrentCultureIgnoreCase));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -132,7 +132,7 @@ export const SysConfigApiAxiosParamCreator = function (configuration?: Configura
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 批量更新参数配置值
|
||||
* @summary 批量更新参数配置值 🔖
|
||||
* @param {Array<BatchConfigInput>} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -595,7 +595,7 @@ export const SysConfigApiFp = function(configuration?: Configuration) {
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 批量更新参数配置值
|
||||
* @summary 批量更新参数配置值 🔖
|
||||
* @param {Array<BatchConfigInput>} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -748,7 +748,7 @@ export const SysConfigApiFactory = function (configuration?: Configuration, base
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 批量更新参数配置值
|
||||
* @summary 批量更新参数配置值 🔖
|
||||
* @param {Array<BatchConfigInput>} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -868,7 +868,7 @@ export class SysConfigApi extends BaseAPI {
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 批量更新参数配置值
|
||||
* @summary 批量更新参数配置值 🔖
|
||||
* @param {Array<BatchConfigInput>} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
|
||||
@ -177,6 +177,73 @@ export const SysFileApiAxiosParamCreator = function (configuration?: Configurati
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取文件 🔖
|
||||
* @param {number} id 主键Id
|
||||
* @param {string} [fileName] 文件名称
|
||||
* @param {string} [fileType] 文件类型
|
||||
* @param {string} [url] 文件Url
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiSysFileFileGet: async (id: number, fileName?: string, fileType?: string, url?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
if (id === null || id === undefined) {
|
||||
throw new RequiredError('id','Required parameter id was null or undefined when calling apiSysFileFileGet.');
|
||||
}
|
||||
const localVarPath = `/api/sysFile/file`;
|
||||
// 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: 'GET', ...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;
|
||||
}
|
||||
|
||||
if (fileName !== undefined) {
|
||||
localVarQueryParameter['FileName'] = fileName;
|
||||
}
|
||||
|
||||
if (fileType !== undefined) {
|
||||
localVarQueryParameter['FileType'] = fileType;
|
||||
}
|
||||
|
||||
if (url !== undefined) {
|
||||
localVarQueryParameter['Url'] = url;
|
||||
}
|
||||
|
||||
if (id !== undefined) {
|
||||
localVarQueryParameter['Id'] = id;
|
||||
}
|
||||
|
||||
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};
|
||||
|
||||
return {
|
||||
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取文件分页列表 🔖
|
||||
@ -227,7 +294,7 @@ export const SysFileApiAxiosParamCreator = function (configuration?: Configurati
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 文件预览
|
||||
* @summary 文件预览 🔖
|
||||
* @param {number} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -703,6 +770,23 @@ export const SysFileApiFp = function(configuration?: Configuration) {
|
||||
return axios.request(axiosRequestArgs);
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取文件 🔖
|
||||
* @param {number} id 主键Id
|
||||
* @param {string} [fileName] 文件名称
|
||||
* @param {string} [fileType] 文件类型
|
||||
* @param {string} [url] 文件Url
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysFileFileGet(id: number, fileName?: string, fileType?: string, url?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultSysFile>>> {
|
||||
const localVarAxiosArgs = await SysFileApiAxiosParamCreator(configuration).apiSysFileFileGet(id, fileName, fileType, url, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取文件分页列表 🔖
|
||||
@ -719,7 +803,7 @@ export const SysFileApiFp = function(configuration?: Configuration) {
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 文件预览
|
||||
* @summary 文件预览 🔖
|
||||
* @param {number} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -873,6 +957,19 @@ export const SysFileApiFactory = function (configuration?: Configuration, basePa
|
||||
async apiSysFileDownloadFilePost(body?: FileInput, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultIActionResult>> {
|
||||
return SysFileApiFp(configuration).apiSysFileDownloadFilePost(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取文件 🔖
|
||||
* @param {number} id 主键Id
|
||||
* @param {string} [fileName] 文件名称
|
||||
* @param {string} [fileType] 文件类型
|
||||
* @param {string} [url] 文件Url
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysFileFileGet(id: number, fileName?: string, fileType?: string, url?: string, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultSysFile>> {
|
||||
return SysFileApiFp(configuration).apiSysFileFileGet(id, fileName, fileType, url, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取文件分页列表 🔖
|
||||
@ -885,7 +982,7 @@ export const SysFileApiFactory = function (configuration?: Configuration, basePa
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 文件预览
|
||||
* @summary 文件预览 🔖
|
||||
* @param {number} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -1011,6 +1108,20 @@ export class SysFileApi extends BaseAPI {
|
||||
public async apiSysFileDownloadFilePost(body?: FileInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultIActionResult>> {
|
||||
return SysFileApiFp(this.configuration).apiSysFileDownloadFilePost(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 获取文件 🔖
|
||||
* @param {number} id 主键Id
|
||||
* @param {string} [fileName] 文件名称
|
||||
* @param {string} [fileType] 文件类型
|
||||
* @param {string} [url] 文件Url
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysFileApi
|
||||
*/
|
||||
public async apiSysFileFileGet(id: number, fileName?: string, fileType?: string, url?: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultSysFile>> {
|
||||
return SysFileApiFp(this.configuration).apiSysFileFileGet(id, fileName, fileType, url, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 获取文件分页列表 🔖
|
||||
@ -1024,7 +1135,7 @@ export class SysFileApi extends BaseAPI {
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 文件预览
|
||||
* @summary 文件预览 🔖
|
||||
* @param {number} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
|
||||
@ -128,7 +128,7 @@ export const SysOpenAccessApiAxiosParamCreator = function (configuration?: Confi
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 生成签名
|
||||
* @summary 生成签名 🔖
|
||||
* @param {GenerateSignatureInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -352,7 +352,7 @@ export const SysOpenAccessApiFp = function(configuration?: Configuration) {
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 生成签名
|
||||
* @summary 生成签名 🔖
|
||||
* @param {GenerateSignatureInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -436,7 +436,7 @@ export const SysOpenAccessApiFactory = function (configuration?: Configuration,
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 生成签名
|
||||
* @summary 生成签名 🔖
|
||||
* @param {GenerateSignatureInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -507,7 +507,7 @@ export class SysOpenAccessApi extends BaseAPI {
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 生成签名
|
||||
* @summary 生成签名 🔖
|
||||
* @param {GenerateSignatureInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
|
||||
@ -23,7 +23,6 @@ import { AdminResultListInt64 } from '../models';
|
||||
import { AdminResultListRoleOutput } from '../models';
|
||||
import { AdminResultListString } from '../models';
|
||||
import { AdminResultSqlSugarPagedListPageRoleOutput } from '../models';
|
||||
import { BaseApiInput } from '../models';
|
||||
import { DeleteRoleInput } from '../models';
|
||||
import { PageRoleInput } from '../models';
|
||||
import { RoleApiInput } from '../models';
|
||||
@ -86,49 +85,6 @@ export const SysRoleApiAxiosParamCreator = function (configuration?: Configurati
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取基础接口资源集合
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiSysRoleBaseApiListGet: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/api/sysRole/baseApiList`;
|
||||
// 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: 'GET', ...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;
|
||||
}
|
||||
|
||||
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};
|
||||
|
||||
return {
|
||||
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 删除角色 🔖
|
||||
@ -321,49 +277,6 @@ export const SysRoleApiAxiosParamCreator = function (configuration?: Configurati
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 初始化管理员角色接口资源
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiSysRoleInitAdminRoleApiPost: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/api/sysRole/initAdminRoleApi`;
|
||||
// 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;
|
||||
}
|
||||
|
||||
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};
|
||||
|
||||
return {
|
||||
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取角色列表 🔖
|
||||
@ -407,63 +320,6 @@ export const SysRoleApiAxiosParamCreator = function (configuration?: Configurati
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 根据角色Id获取接口资源集合 🔖
|
||||
* @param {number} id 主键Id
|
||||
* @param {StatusEnum} [status] 状态
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiSysRoleOwnApiListGet: async (id: number, status?: StatusEnum, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
if (id === null || id === undefined) {
|
||||
throw new RequiredError('id','Required parameter id was null or undefined when calling apiSysRoleOwnApiListGet.');
|
||||
}
|
||||
const localVarPath = `/api/sysRole/ownApiList`;
|
||||
// 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: 'GET', ...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;
|
||||
}
|
||||
|
||||
if (status !== undefined) {
|
||||
localVarQueryParameter['Status'] = status;
|
||||
}
|
||||
|
||||
if (id !== undefined) {
|
||||
localVarQueryParameter['Id'] = id;
|
||||
}
|
||||
|
||||
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};
|
||||
|
||||
return {
|
||||
url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
|
||||
options: localVarRequestOptions,
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 根据角色Id获取菜单Id集合 🔖
|
||||
@ -628,20 +484,25 @@ export const SysRoleApiAxiosParamCreator = function (configuration?: Configurati
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 设置基础接口资源
|
||||
* @param {BaseApiInput} [body]
|
||||
* @summary 获取角色接口资源集合 🔖
|
||||
* @param {number} id 主键Id
|
||||
* @param {StatusEnum} [status] 状态
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
apiSysRoleSetBaseApiPost: async (body?: BaseApiInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
const localVarPath = `/api/sysRole/setBaseApi`;
|
||||
apiSysRoleRoleApiListGet: async (id: number, status?: StatusEnum, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
||||
// verify required parameter 'id' is not null or undefined
|
||||
if (id === null || id === undefined) {
|
||||
throw new RequiredError('id','Required parameter id was null or undefined when calling apiSysRoleRoleApiListGet.');
|
||||
}
|
||||
const localVarPath = `/api/sysRole/roleApiList`;
|
||||
// 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 localVarRequestOptions :AxiosRequestConfig = { method: 'GET', ...baseOptions, ...options};
|
||||
const localVarHeaderParameter = {} as any;
|
||||
const localVarQueryParameter = {} as any;
|
||||
|
||||
@ -654,7 +515,13 @@ export const SysRoleApiAxiosParamCreator = function (configuration?: Configurati
|
||||
localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
|
||||
}
|
||||
|
||||
localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
|
||||
if (status !== undefined) {
|
||||
localVarQueryParameter['Status'] = status;
|
||||
}
|
||||
|
||||
if (id !== undefined) {
|
||||
localVarQueryParameter['Id'] = id;
|
||||
}
|
||||
|
||||
const query = new URLSearchParams(localVarUrlObj.search);
|
||||
for (const key in localVarQueryParameter) {
|
||||
@ -666,8 +533,6 @@ export const SysRoleApiAxiosParamCreator = function (configuration?: Configurati
|
||||
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,
|
||||
@ -772,7 +637,7 @@ export const SysRoleApiAxiosParamCreator = function (configuration?: Configurati
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取用户拥有接口资源集合(缓存) 🔖
|
||||
* @summary 获取用户接口资源集合 🔖
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
@ -836,19 +701,6 @@ export const SysRoleApiFp = function(configuration?: Configuration) {
|
||||
return axios.request(axiosRequestArgs);
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取基础接口资源集合
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysRoleBaseApiListGet(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultListString>>> {
|
||||
const localVarAxiosArgs = await SysRoleApiAxiosParamCreator(configuration).apiSysRoleBaseApiListGet(options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 删除角色 🔖
|
||||
@ -905,19 +757,6 @@ export const SysRoleApiFp = function(configuration?: Configuration) {
|
||||
return axios.request(axiosRequestArgs);
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 初始化管理员角色接口资源
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysRoleInitAdminRoleApiPost(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
|
||||
const localVarAxiosArgs = await SysRoleApiAxiosParamCreator(configuration).apiSysRoleInitAdminRoleApiPost(options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取角色列表 🔖
|
||||
@ -931,21 +770,6 @@ export const SysRoleApiFp = function(configuration?: Configuration) {
|
||||
return axios.request(axiosRequestArgs);
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 根据角色Id获取接口资源集合 🔖
|
||||
* @param {number} id 主键Id
|
||||
* @param {StatusEnum} [status] 状态
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysRoleOwnApiListGet(id: number, status?: StatusEnum, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultListString>>> {
|
||||
const localVarAxiosArgs = await SysRoleApiAxiosParamCreator(configuration).apiSysRoleOwnApiListGet(id, status, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 根据角色Id获取菜单Id集合 🔖
|
||||
@ -992,13 +816,14 @@ export const SysRoleApiFp = function(configuration?: Configuration) {
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 设置基础接口资源
|
||||
* @param {BaseApiInput} [body]
|
||||
* @summary 获取角色接口资源集合 🔖
|
||||
* @param {number} id 主键Id
|
||||
* @param {StatusEnum} [status] 状态
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysRoleSetBaseApiPost(body?: BaseApiInput, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
|
||||
const localVarAxiosArgs = await SysRoleApiAxiosParamCreator(configuration).apiSysRoleSetBaseApiPost(body, options);
|
||||
async apiSysRoleRoleApiListGet(id: number, status?: StatusEnum, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultListString>>> {
|
||||
const localVarAxiosArgs = await SysRoleApiAxiosParamCreator(configuration).apiSysRoleRoleApiListGet(id, status, options);
|
||||
return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
|
||||
const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
|
||||
return axios.request(axiosRequestArgs);
|
||||
@ -1034,7 +859,7 @@ export const SysRoleApiFp = function(configuration?: Configuration) {
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取用户拥有接口资源集合(缓存) 🔖
|
||||
* @summary 获取用户接口资源集合 🔖
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
@ -1064,15 +889,6 @@ export const SysRoleApiFactory = function (configuration?: Configuration, basePa
|
||||
async apiSysRoleAddPost(body?: AddRoleInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
|
||||
return SysRoleApiFp(configuration).apiSysRoleAddPost(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取基础接口资源集合
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysRoleBaseApiListGet(options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultListString>> {
|
||||
return SysRoleApiFp(configuration).apiSysRoleBaseApiListGet(options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 删除角色 🔖
|
||||
@ -1113,15 +929,6 @@ export const SysRoleApiFactory = function (configuration?: Configuration, basePa
|
||||
async apiSysRoleGrantMenuPost(body?: RoleMenuInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
|
||||
return SysRoleApiFp(configuration).apiSysRoleGrantMenuPost(body, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 初始化管理员角色接口资源
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysRoleInitAdminRoleApiPost(options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
|
||||
return SysRoleApiFp(configuration).apiSysRoleInitAdminRoleApiPost(options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取角色列表 🔖
|
||||
@ -1131,17 +938,6 @@ export const SysRoleApiFactory = function (configuration?: Configuration, basePa
|
||||
async apiSysRoleListGet(options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultListRoleOutput>> {
|
||||
return SysRoleApiFp(configuration).apiSysRoleListGet(options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 根据角色Id获取接口资源集合 🔖
|
||||
* @param {number} id 主键Id
|
||||
* @param {StatusEnum} [status] 状态
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysRoleOwnApiListGet(id: number, status?: StatusEnum, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultListString>> {
|
||||
return SysRoleApiFp(configuration).apiSysRoleOwnApiListGet(id, status, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 根据角色Id获取菜单Id集合 🔖
|
||||
@ -1176,13 +972,14 @@ export const SysRoleApiFactory = function (configuration?: Configuration, basePa
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 设置基础接口资源
|
||||
* @param {BaseApiInput} [body]
|
||||
* @summary 获取角色接口资源集合 🔖
|
||||
* @param {number} id 主键Id
|
||||
* @param {StatusEnum} [status] 状态
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
async apiSysRoleSetBaseApiPost(body?: BaseApiInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
|
||||
return SysRoleApiFp(configuration).apiSysRoleSetBaseApiPost(body, options).then((request) => request(axios, basePath));
|
||||
async apiSysRoleRoleApiListGet(id: number, status?: StatusEnum, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultListString>> {
|
||||
return SysRoleApiFp(configuration).apiSysRoleRoleApiListGet(id, status, options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
@ -1206,7 +1003,7 @@ export const SysRoleApiFactory = function (configuration?: Configuration, basePa
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取用户拥有接口资源集合(缓存) 🔖
|
||||
* @summary 获取用户接口资源集合 🔖
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
@ -1234,16 +1031,6 @@ export class SysRoleApi extends BaseAPI {
|
||||
public async apiSysRoleAddPost(body?: AddRoleInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
|
||||
return SysRoleApiFp(this.configuration).apiSysRoleAddPost(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 获取基础接口资源集合
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysRoleApi
|
||||
*/
|
||||
public async apiSysRoleBaseApiListGet(options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultListString>> {
|
||||
return SysRoleApiFp(this.configuration).apiSysRoleBaseApiListGet(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 删除角色 🔖
|
||||
@ -1288,16 +1075,6 @@ export class SysRoleApi extends BaseAPI {
|
||||
public async apiSysRoleGrantMenuPost(body?: RoleMenuInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
|
||||
return SysRoleApiFp(this.configuration).apiSysRoleGrantMenuPost(body, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 初始化管理员角色接口资源
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysRoleApi
|
||||
*/
|
||||
public async apiSysRoleInitAdminRoleApiPost(options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
|
||||
return SysRoleApiFp(this.configuration).apiSysRoleInitAdminRoleApiPost(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 获取角色列表 🔖
|
||||
@ -1308,18 +1085,6 @@ export class SysRoleApi extends BaseAPI {
|
||||
public async apiSysRoleListGet(options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultListRoleOutput>> {
|
||||
return SysRoleApiFp(this.configuration).apiSysRoleListGet(options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 根据角色Id获取接口资源集合 🔖
|
||||
* @param {number} id 主键Id
|
||||
* @param {StatusEnum} [status] 状态
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysRoleApi
|
||||
*/
|
||||
public async apiSysRoleOwnApiListGet(id: number, status?: StatusEnum, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultListString>> {
|
||||
return SysRoleApiFp(this.configuration).apiSysRoleOwnApiListGet(id, status, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 根据角色Id获取菜单Id集合 🔖
|
||||
@ -1357,14 +1122,15 @@ export class SysRoleApi extends BaseAPI {
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 设置基础接口资源
|
||||
* @param {BaseApiInput} [body]
|
||||
* @summary 获取角色接口资源集合 🔖
|
||||
* @param {number} id 主键Id
|
||||
* @param {StatusEnum} [status] 状态
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysRoleApi
|
||||
*/
|
||||
public async apiSysRoleSetBaseApiPost(body?: BaseApiInput, options?: AxiosRequestConfig) : Promise<AxiosResponse<void>> {
|
||||
return SysRoleApiFp(this.configuration).apiSysRoleSetBaseApiPost(body, options).then((request) => request(this.axios, this.basePath));
|
||||
public async apiSysRoleRoleApiListGet(id: number, status?: StatusEnum, options?: AxiosRequestConfig) : Promise<AxiosResponse<AdminResultListString>> {
|
||||
return SysRoleApiFp(this.configuration).apiSysRoleRoleApiListGet(id, status, options).then((request) => request(this.axios, this.basePath));
|
||||
}
|
||||
/**
|
||||
*
|
||||
@ -1390,7 +1156,7 @@ export class SysRoleApi extends BaseAPI {
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 获取用户拥有接口资源集合(缓存) 🔖
|
||||
* @summary 获取用户接口资源集合 🔖
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof SysRoleApi
|
||||
|
||||
@ -33,7 +33,7 @@ export const SysScheduleApiAxiosParamCreator = function (configuration?: Configu
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary 增加日程
|
||||
* @summary 增加日程 🔖
|
||||
* @param {AddScheduleInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -81,7 +81,7 @@ export const SysScheduleApiAxiosParamCreator = function (configuration?: Configu
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 删除日程
|
||||
* @summary 删除日程 🔖
|
||||
* @param {DeleteScheduleInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -129,7 +129,7 @@ export const SysScheduleApiAxiosParamCreator = function (configuration?: Configu
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取日程详情
|
||||
* @summary 获取日程详情 🔖
|
||||
* @param {number} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -178,7 +178,7 @@ export const SysScheduleApiAxiosParamCreator = function (configuration?: Configu
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取日程列表
|
||||
* @summary 获取日程列表 🔖
|
||||
* @param {ListScheduleInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -226,7 +226,7 @@ export const SysScheduleApiAxiosParamCreator = function (configuration?: Configu
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 设置日程状态
|
||||
* @summary 设置日程状态 🔖
|
||||
* @param {ScheduleInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -274,7 +274,7 @@ export const SysScheduleApiAxiosParamCreator = function (configuration?: Configu
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 更新日程
|
||||
* @summary 更新日程 🔖
|
||||
* @param {UpdateScheduleInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -331,7 +331,7 @@ export const SysScheduleApiFp = function(configuration?: Configuration) {
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary 增加日程
|
||||
* @summary 增加日程 🔖
|
||||
* @param {AddScheduleInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -345,7 +345,7 @@ export const SysScheduleApiFp = function(configuration?: Configuration) {
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 删除日程
|
||||
* @summary 删除日程 🔖
|
||||
* @param {DeleteScheduleInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -359,7 +359,7 @@ export const SysScheduleApiFp = function(configuration?: Configuration) {
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取日程详情
|
||||
* @summary 获取日程详情 🔖
|
||||
* @param {number} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -373,7 +373,7 @@ export const SysScheduleApiFp = function(configuration?: Configuration) {
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取日程列表
|
||||
* @summary 获取日程列表 🔖
|
||||
* @param {ListScheduleInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -387,7 +387,7 @@ export const SysScheduleApiFp = function(configuration?: Configuration) {
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 设置日程状态
|
||||
* @summary 设置日程状态 🔖
|
||||
* @param {ScheduleInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -401,7 +401,7 @@ export const SysScheduleApiFp = function(configuration?: Configuration) {
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 更新日程
|
||||
* @summary 更新日程 🔖
|
||||
* @param {UpdateScheduleInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -424,7 +424,7 @@ export const SysScheduleApiFactory = function (configuration?: Configuration, ba
|
||||
return {
|
||||
/**
|
||||
*
|
||||
* @summary 增加日程
|
||||
* @summary 增加日程 🔖
|
||||
* @param {AddScheduleInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -434,7 +434,7 @@ export const SysScheduleApiFactory = function (configuration?: Configuration, ba
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 删除日程
|
||||
* @summary 删除日程 🔖
|
||||
* @param {DeleteScheduleInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -444,7 +444,7 @@ export const SysScheduleApiFactory = function (configuration?: Configuration, ba
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取日程详情
|
||||
* @summary 获取日程详情 🔖
|
||||
* @param {number} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -454,7 +454,7 @@ export const SysScheduleApiFactory = function (configuration?: Configuration, ba
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取日程列表
|
||||
* @summary 获取日程列表 🔖
|
||||
* @param {ListScheduleInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -464,7 +464,7 @@ export const SysScheduleApiFactory = function (configuration?: Configuration, ba
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 设置日程状态
|
||||
* @summary 设置日程状态 🔖
|
||||
* @param {ScheduleInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -474,7 +474,7 @@ export const SysScheduleApiFactory = function (configuration?: Configuration, ba
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 更新日程
|
||||
* @summary 更新日程 🔖
|
||||
* @param {UpdateScheduleInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -494,7 +494,7 @@ export const SysScheduleApiFactory = function (configuration?: Configuration, ba
|
||||
export class SysScheduleApi extends BaseAPI {
|
||||
/**
|
||||
*
|
||||
* @summary 增加日程
|
||||
* @summary 增加日程 🔖
|
||||
* @param {AddScheduleInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -505,7 +505,7 @@ export class SysScheduleApi extends BaseAPI {
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 删除日程
|
||||
* @summary 删除日程 🔖
|
||||
* @param {DeleteScheduleInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -516,7 +516,7 @@ export class SysScheduleApi extends BaseAPI {
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 获取日程详情
|
||||
* @summary 获取日程详情 🔖
|
||||
* @param {number} id
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -527,7 +527,7 @@ export class SysScheduleApi extends BaseAPI {
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 获取日程列表
|
||||
* @summary 获取日程列表 🔖
|
||||
* @param {ListScheduleInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -538,7 +538,7 @@ export class SysScheduleApi extends BaseAPI {
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 设置日程状态
|
||||
* @summary 设置日程状态 🔖
|
||||
* @param {ScheduleInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -549,7 +549,7 @@ export class SysScheduleApi extends BaseAPI {
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 更新日程
|
||||
* @summary 更新日程 🔖
|
||||
* @param {UpdateScheduleInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
|
||||
@ -83,7 +83,7 @@ export const SysWechatPayApiAxiosParamCreator = function (configuration?: Config
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取支付记录列表(分页)
|
||||
* @summary 获取支付记录分页列表 🔖
|
||||
* @param {PageSysWechatPayInput} [body] PageSysWechatPayInput
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -314,7 +314,7 @@ export const SysWechatPayApiAxiosParamCreator = function (configuration?: Config
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 微信支付订单号查询(校正) https://api.mch.weixin.qq.com/v3/pay/transactions/id/{transaction_id}
|
||||
* @summary 微信支付订单号查询(校正) 🔖 https://api.mch.weixin.qq.com/v3/pay/transactions/id/{transaction_id}
|
||||
* @param {string} transactionId
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -363,7 +363,7 @@ export const SysWechatPayApiAxiosParamCreator = function (configuration?: Config
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 商户订单号查询(校正) https://api.mch.weixin.qq.com/v3/pay/transactions/out-trade-no/{out_trade_no}
|
||||
* @summary 商户订单号查询(校正) 🔖 https://api.mch.weixin.qq.com/v3/pay/transactions/out-trade-no/{out_trade_no}
|
||||
* @param {string} outTradeNumber
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -460,7 +460,7 @@ export const SysWechatPayApiAxiosParamCreator = function (configuration?: Config
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 查询单笔退款(通过商户退款单号) https://pay.weixin.qq.com/docs/merchant/apis/mini-program-payment/query-by-out-refund-no.html
|
||||
* @summary 查询单笔退款(通过商户退款单号) 🔖 https://pay.weixin.qq.com/docs/merchant/apis/mini-program-payment/query-by-out-refund-no.html
|
||||
* @param {string} outRefundNumber
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -509,7 +509,7 @@ export const SysWechatPayApiAxiosParamCreator = function (configuration?: Config
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 退款申请 https://pay.weixin.qq.com/docs/merchant/apis/mini-program-payment/create.html
|
||||
* @summary 退款申请 🔖 https://pay.weixin.qq.com/docs/merchant/apis/mini-program-payment/create.html
|
||||
* @param {RefundRequestInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -580,7 +580,7 @@ export const SysWechatPayApiFp = function(configuration?: Configuration) {
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取支付记录列表(分页)
|
||||
* @summary 获取支付记录分页列表 🔖
|
||||
* @param {PageSysWechatPayInput} [body] PageSysWechatPayInput
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -648,7 +648,7 @@ export const SysWechatPayApiFp = function(configuration?: Configuration) {
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 微信支付订单号查询(校正) https://api.mch.weixin.qq.com/v3/pay/transactions/id/{transaction_id}
|
||||
* @summary 微信支付订单号查询(校正) 🔖 https://api.mch.weixin.qq.com/v3/pay/transactions/id/{transaction_id}
|
||||
* @param {string} transactionId
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -662,7 +662,7 @@ export const SysWechatPayApiFp = function(configuration?: Configuration) {
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 商户订单号查询(校正) https://api.mch.weixin.qq.com/v3/pay/transactions/out-trade-no/{out_trade_no}
|
||||
* @summary 商户订单号查询(校正) 🔖 https://api.mch.weixin.qq.com/v3/pay/transactions/out-trade-no/{out_trade_no}
|
||||
* @param {string} outTradeNumber
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -690,7 +690,7 @@ export const SysWechatPayApiFp = function(configuration?: Configuration) {
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 查询单笔退款(通过商户退款单号) https://pay.weixin.qq.com/docs/merchant/apis/mini-program-payment/query-by-out-refund-no.html
|
||||
* @summary 查询单笔退款(通过商户退款单号) 🔖 https://pay.weixin.qq.com/docs/merchant/apis/mini-program-payment/query-by-out-refund-no.html
|
||||
* @param {string} outRefundNumber
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -704,7 +704,7 @@ export const SysWechatPayApiFp = function(configuration?: Configuration) {
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 退款申请 https://pay.weixin.qq.com/docs/merchant/apis/mini-program-payment/create.html
|
||||
* @summary 退款申请 🔖 https://pay.weixin.qq.com/docs/merchant/apis/mini-program-payment/create.html
|
||||
* @param {RefundRequestInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -737,7 +737,7 @@ export const SysWechatPayApiFactory = function (configuration?: Configuration, b
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 获取支付记录列表(分页)
|
||||
* @summary 获取支付记录分页列表 🔖
|
||||
* @param {PageSysWechatPayInput} [body] PageSysWechatPayInput
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -785,7 +785,7 @@ export const SysWechatPayApiFactory = function (configuration?: Configuration, b
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 微信支付订单号查询(校正) https://api.mch.weixin.qq.com/v3/pay/transactions/id/{transaction_id}
|
||||
* @summary 微信支付订单号查询(校正) 🔖 https://api.mch.weixin.qq.com/v3/pay/transactions/id/{transaction_id}
|
||||
* @param {string} transactionId
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -795,7 +795,7 @@ export const SysWechatPayApiFactory = function (configuration?: Configuration, b
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 商户订单号查询(校正) https://api.mch.weixin.qq.com/v3/pay/transactions/out-trade-no/{out_trade_no}
|
||||
* @summary 商户订单号查询(校正) 🔖 https://api.mch.weixin.qq.com/v3/pay/transactions/out-trade-no/{out_trade_no}
|
||||
* @param {string} outTradeNumber
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -815,7 +815,7 @@ export const SysWechatPayApiFactory = function (configuration?: Configuration, b
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 查询单笔退款(通过商户退款单号) https://pay.weixin.qq.com/docs/merchant/apis/mini-program-payment/query-by-out-refund-no.html
|
||||
* @summary 查询单笔退款(通过商户退款单号) 🔖 https://pay.weixin.qq.com/docs/merchant/apis/mini-program-payment/query-by-out-refund-no.html
|
||||
* @param {string} outRefundNumber
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -825,7 +825,7 @@ export const SysWechatPayApiFactory = function (configuration?: Configuration, b
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 退款申请 https://pay.weixin.qq.com/docs/merchant/apis/mini-program-payment/create.html
|
||||
* @summary 退款申请 🔖 https://pay.weixin.qq.com/docs/merchant/apis/mini-program-payment/create.html
|
||||
* @param {RefundRequestInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -856,7 +856,7 @@ export class SysWechatPayApi extends BaseAPI {
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 获取支付记录列表(分页)
|
||||
* @summary 获取支付记录分页列表 🔖
|
||||
* @param {PageSysWechatPayInput} [body] PageSysWechatPayInput
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -909,7 +909,7 @@ export class SysWechatPayApi extends BaseAPI {
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 微信支付订单号查询(校正) https://api.mch.weixin.qq.com/v3/pay/transactions/id/{transaction_id}
|
||||
* @summary 微信支付订单号查询(校正) 🔖 https://api.mch.weixin.qq.com/v3/pay/transactions/id/{transaction_id}
|
||||
* @param {string} transactionId
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -920,7 +920,7 @@ export class SysWechatPayApi extends BaseAPI {
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 商户订单号查询(校正) https://api.mch.weixin.qq.com/v3/pay/transactions/out-trade-no/{out_trade_no}
|
||||
* @summary 商户订单号查询(校正) 🔖 https://api.mch.weixin.qq.com/v3/pay/transactions/out-trade-no/{out_trade_no}
|
||||
* @param {string} outTradeNumber
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -942,7 +942,7 @@ export class SysWechatPayApi extends BaseAPI {
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 查询单笔退款(通过商户退款单号) https://pay.weixin.qq.com/docs/merchant/apis/mini-program-payment/query-by-out-refund-no.html
|
||||
* @summary 查询单笔退款(通过商户退款单号) 🔖 https://pay.weixin.qq.com/docs/merchant/apis/mini-program-payment/query-by-out-refund-no.html
|
||||
* @param {string} outRefundNumber
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -953,7 +953,7 @@ export class SysWechatPayApi extends BaseAPI {
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 退款申请 https://pay.weixin.qq.com/docs/merchant/apis/mini-program-payment/create.html
|
||||
* @summary 退款申请 🔖 https://pay.weixin.qq.com/docs/merchant/apis/mini-program-payment/create.html
|
||||
* @param {RefundRequestInput} [body]
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
|
||||
@ -81,7 +81,7 @@ export const SysWxOpenApiAxiosParamCreator = function (configuration?: Configura
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 生成二维码
|
||||
* @summary 生成小程序二维码 🔖
|
||||
* @param {GenerateQRImageInput} [body] 扫码进入的小程序页面路径,最大长度 128 个字符,不能为空; eg: pages / index ? id = AY000001
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -467,7 +467,7 @@ export const SysWxOpenApiFp = function(configuration?: Configuration) {
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 生成二维码
|
||||
* @summary 生成小程序二维码 🔖
|
||||
* @param {GenerateQRImageInput} [body] 扫码进入的小程序页面路径,最大长度 128 个字符,不能为空; eg: pages / index ? id = AY000001
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -587,7 +587,7 @@ export const SysWxOpenApiFactory = function (configuration?: Configuration, base
|
||||
},
|
||||
/**
|
||||
*
|
||||
* @summary 生成二维码
|
||||
* @summary 生成小程序二维码 🔖
|
||||
* @param {GenerateQRImageInput} [body] 扫码进入的小程序页面路径,最大长度 128 个字符,不能为空; eg: pages / index ? id = AY000001
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
@ -681,7 +681,7 @@ export class SysWxOpenApi extends BaseAPI {
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @summary 生成二维码
|
||||
* @summary 生成小程序二维码 🔖
|
||||
* @param {GenerateQRImageInput} [body] 扫码进入的小程序页面路径,最大长度 128 个字符,不能为空; eg: pages / index ? id = AY000001
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
|
||||
@ -112,7 +112,6 @@ export * from './admin-result-wx-phone-output';
|
||||
export * from './amount';
|
||||
export * from './api-output';
|
||||
export * from './assembly';
|
||||
export * from './base-api-input';
|
||||
export * from './base-proc-input';
|
||||
export * from './batch-config-input';
|
||||
export * from './calendar';
|
||||
@ -221,6 +220,7 @@ export * from './log-input';
|
||||
export * from './log-level';
|
||||
export * from './log-vis-output';
|
||||
export * from './login-input';
|
||||
export * from './login-mode-enum';
|
||||
export * from './login-output';
|
||||
export * from './login-phone-input';
|
||||
export * from './login-user-output';
|
||||
|
||||
@ -12,6 +12,7 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { LoginModeEnum } from './login-mode-enum';
|
||||
/**
|
||||
* 用户登录参数
|
||||
*
|
||||
@ -53,4 +54,10 @@ export interface LoginInput {
|
||||
* @memberof LoginInput
|
||||
*/
|
||||
code?: string | null;
|
||||
|
||||
/**
|
||||
* @type {LoginModeEnum}
|
||||
* @memberof LoginInput
|
||||
*/
|
||||
loginMode?: LoginModeEnum;
|
||||
}
|
||||
|
||||
@ -12,27 +12,13 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
/**
|
||||
* 设置基础接口资源
|
||||
*
|
||||
/**
|
||||
* 登录模式枚举<br /> PC模式 PC = 1<br /> APP APP = 2<br />
|
||||
* @export
|
||||
* @interface BaseApiInput
|
||||
* @enum {string}
|
||||
*/
|
||||
export interface BaseApiInput {
|
||||
|
||||
/**
|
||||
* 主键Id
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof BaseApiInput
|
||||
*/
|
||||
id: number;
|
||||
|
||||
/**
|
||||
* 接口路由集合
|
||||
*
|
||||
* @type {Array<string>}
|
||||
* @memberof BaseApiInput
|
||||
*/
|
||||
apiList?: Array<string> | null;
|
||||
export enum LoginModeEnum {
|
||||
NUMBER_1 = 1,
|
||||
NUMBER_2 = 2
|
||||
}
|
||||
|
||||
@ -12,6 +12,7 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { LoginModeEnum } from './login-mode-enum';
|
||||
/**
|
||||
*
|
||||
*
|
||||
@ -37,4 +38,10 @@ export interface LoginPhoneInput {
|
||||
* @example 123456
|
||||
*/
|
||||
code: string;
|
||||
|
||||
/**
|
||||
* @type {LoginModeEnum}
|
||||
* @memberof LoginPhoneInput
|
||||
*/
|
||||
loginMode?: LoginModeEnum;
|
||||
}
|
||||
|
||||
@ -12,6 +12,7 @@
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { LoginModeEnum } from './login-mode-enum';
|
||||
/**
|
||||
* 系统在线用户表
|
||||
*
|
||||
@ -99,4 +100,10 @@ export interface SysOnlineUser {
|
||||
* @memberof SysOnlineUser
|
||||
*/
|
||||
os?: string | null;
|
||||
|
||||
/**
|
||||
* @type {LoginModeEnum}
|
||||
* @memberof SysOnlineUser
|
||||
*/
|
||||
loginMode?: LoginModeEnum;
|
||||
}
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
<el-radio-group v-model="state.ruleForm.type">
|
||||
<el-radio :value="1">目录</el-radio>
|
||||
<el-radio :value="2">菜单</el-radio>
|
||||
<!-- <el-radio :value="3">按钮</el-radio> -->
|
||||
<el-radio :value="3">按钮</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
@ -1,140 +0,0 @@
|
||||
<template>
|
||||
<div class="sys-baseApi-container">
|
||||
<el-drawer v-model="state.isVisible" size="30%">
|
||||
<template #header>
|
||||
<div style="color: #fff">
|
||||
<el-icon size="16" style="margin-right: 3px; display: inline; vertical-align: middle"> <ele-Link /> </el-icon>
|
||||
<span>设置基础接口资源【免鉴权授权】</span>
|
||||
</div>
|
||||
</template>
|
||||
<el-card class="tree-card" shadow="hover" style="height: calc(100vh - 110px)" body-style="height:100%; overflow:auto">
|
||||
<template #header>
|
||||
<div class="card-header">
|
||||
<div class="tree-h-flex">
|
||||
<div class="tree-h-left">
|
||||
<el-input :prefix-icon="Search" v-model="filterText" placeholder="API路由" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<el-form-item v-loading="state.loading" style="margin-bottom: 45px">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="24" class="mb8">
|
||||
<el-tree
|
||||
ref="treeRef"
|
||||
class="filter-tree"
|
||||
:data="state.allApiData"
|
||||
:filter-node-method="filterNode"
|
||||
node-key="route"
|
||||
:props="{ children: 'children', label: 'name' }"
|
||||
show-checkbox
|
||||
icon="ele-Menu"
|
||||
highlight-current
|
||||
>
|
||||
<template #default="{ node, data }">
|
||||
<span v-if="node.level == 1 || node.level == 2">{{ node.label }}</span>
|
||||
<span v-if="node.level == 3">
|
||||
<el-icon style="margin-right: 3px; display: inline; vertical-align: middle"><ele-Link /></el-icon>
|
||||
{{ node.label }} 【{{ node.key }}】
|
||||
<el-tag type="primary" v-if="data.httpMethod === 'GET'">GET</el-tag>
|
||||
<el-tag type="success" v-else-if="data.httpMethod === 'POST'">POST</el-tag>
|
||||
<el-tag type="warning" v-else-if="data.httpMethod === 'PUT'">PUT</el-tag>
|
||||
<el-tag type="danger" v-else-if="data.httpMethod === 'DELETE'">DELETE</el-tag>
|
||||
<el-tag type="info" v-else>{{ data.httpMethod }}</el-tag>
|
||||
</span>
|
||||
</template>
|
||||
</el-tree>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
</el-card>
|
||||
<template #footer>
|
||||
<div style="margin-bottom: 20px; margin-right: 20px">
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
<el-button type="primary" @click="submit">确 定</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-drawer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { reactive, onMounted, ref, watch } from 'vue';
|
||||
import type { ElTree } from 'element-plus';
|
||||
import { Search, MoreFilled } from '@element-plus/icons-vue';
|
||||
|
||||
import { getAPI } from '/@/utils/axios-utils';
|
||||
import { SysCommonApi, SysRoleApi } from '/@/api-services/api';
|
||||
|
||||
const filterText = ref('');
|
||||
const treeRef = ref<InstanceType<typeof ElTree>>();
|
||||
|
||||
const state = reactive({
|
||||
loading: false,
|
||||
isVisible: false,
|
||||
allApiData: [] as any,
|
||||
ownApiList: [] as any,
|
||||
selectRow: [] as any,
|
||||
selectedTabName: 0,
|
||||
});
|
||||
|
||||
// 页面初始化
|
||||
onMounted(() => {
|
||||
initTreeData();
|
||||
});
|
||||
|
||||
// 节点过滤
|
||||
watch(filterText, (val) => {
|
||||
treeRef.value!.filter(val);
|
||||
});
|
||||
|
||||
// 初始化树
|
||||
const initTreeData = async () => {
|
||||
state.loading = true;
|
||||
var res = await getAPI(SysCommonApi).apiSysCommonApiListGet();
|
||||
var tData = res.data.result ?? [];
|
||||
|
||||
treeRef.value?.setCheckedKeys([]); // 清空选中值
|
||||
|
||||
state.allApiData = tData;
|
||||
state.loading = false;
|
||||
};
|
||||
|
||||
// 打开页面
|
||||
const openDrawer = async () => {
|
||||
state.selectedTabName = 0;
|
||||
state.isVisible = true;
|
||||
state.loading = false;
|
||||
|
||||
// 获取已有基础接口资源
|
||||
var res1 = await getAPI(SysRoleApi).apiSysRoleBaseApiListGet();
|
||||
state.ownApiList = res1.data.result ?? [];
|
||||
|
||||
setTimeout(() => {
|
||||
treeRef.value?.setCheckedKeys(state.ownApiList ?? []);
|
||||
}, 200);
|
||||
|
||||
state.loading = false;
|
||||
};
|
||||
|
||||
// 节点过滤
|
||||
const filterNode = (value: string, data: any) => {
|
||||
if (!value) return true;
|
||||
return data.route.includes(value);
|
||||
};
|
||||
|
||||
// 取消
|
||||
const cancel = () => {
|
||||
state.isVisible = false;
|
||||
};
|
||||
|
||||
// 设置基础接口资源
|
||||
const submit = async () => {
|
||||
state.ownApiList = treeRef.value?.getCheckedKeys() as Array<string>;
|
||||
await getAPI(SysRoleApi).apiSysRoleSetBaseApiPost({ id: 0, apiList: state.ownApiList });
|
||||
cancel();
|
||||
};
|
||||
|
||||
// 导出对象
|
||||
defineExpose({ openDrawer });
|
||||
</script>
|
||||
@ -61,7 +61,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { reactive, onMounted, ref, watch } from 'vue';
|
||||
import type { ElTree } from 'element-plus';
|
||||
import { Search, MoreFilled } from '@element-plus/icons-vue';
|
||||
import { Search } from '@element-plus/icons-vue';
|
||||
|
||||
import { getAPI } from '/@/utils/axios-utils';
|
||||
import { SysCommonApi, SysRoleApi } from '/@/api-services/api';
|
||||
@ -111,7 +111,7 @@ const openDrawer = async (row: any) => {
|
||||
state.loading = false;
|
||||
|
||||
// 获取已有接口资源
|
||||
var res1 = await getAPI(SysRoleApi).apiSysRoleOwnApiListGet(state.roleId);
|
||||
var res1 = await getAPI(SysRoleApi).apiSysRoleRoleApiListGet(state.roleId);
|
||||
state.ownApiList = res1.data.result ?? [];
|
||||
|
||||
setTimeout(() => {
|
||||
|
||||
@ -32,7 +32,6 @@
|
||||
<vxe-grid ref="xGrid" class="xGrid-style" v-bind="options" v-on="gridEvents">
|
||||
<template #toolbar_buttons>
|
||||
<el-button type="primary" icon="ele-Plus" @click="handleAdd" v-auth="'sysRole/add'"> 新增 </el-button>
|
||||
<el-button type="primary" icon="ele-Link" @click="openBaseApi" plain> 设置基础接口资源 </el-button>
|
||||
</template>
|
||||
<template #toolbar_tools></template>
|
||||
<template #empty>
|
||||
@ -82,7 +81,6 @@ import { Local } from '/@/utils/storage';
|
||||
import EditRole from '/@/views/system/role/component/editRole.vue';
|
||||
import GrantData from '/@/views/system/role/component/grantData.vue';
|
||||
import GrantApi from '/@/views/system/role/component/grantApi.vue';
|
||||
import BaseApi from '/@/views/system/role/component/baseApi.vue';
|
||||
import ModifyRecord from '/@/components/table/modifyRecord.vue';
|
||||
|
||||
import { getAPI } from '/@/utils/axios-utils';
|
||||
@ -93,7 +91,6 @@ const xGrid = ref<VxeGridInstance>();
|
||||
const editRoleRef = ref<InstanceType<typeof EditRole>>();
|
||||
const grantDataRef = ref<InstanceType<typeof GrantData>>();
|
||||
const grantApiRef = ref<InstanceType<typeof GrantApi>>();
|
||||
const baseApiRef = ref<InstanceType<typeof BaseApi>>();
|
||||
const state = reactive({
|
||||
queryParams: {
|
||||
name: undefined,
|
||||
@ -215,9 +212,4 @@ const openGrantData = (row: any) => {
|
||||
const openGrantApi = (row: any) => {
|
||||
grantApiRef.value?.openDrawer(row);
|
||||
};
|
||||
|
||||
// 打开基础接口资源页面
|
||||
const openBaseApi = () => {
|
||||
baseApiRef.value?.openDrawer();
|
||||
};
|
||||
</script>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user