feat: 基础模块

注册登录
用户管理
角色管理
部门管理
消息管理
接口管理
菜单管理
字典管理
缓存管理
请求日志
系统设置
版本信息
代码生成
This commit is contained in:
tk
2023-11-17 18:54:31 +08:00
parent 18b4d7547a
commit d26e4c77cc
755 changed files with 30416 additions and 42743 deletions

View File

@@ -1,3 +1,4 @@
using NetAdmin.Domain.Dto.Sys.Tool;
using NetAdmin.Host.Controllers;
using NetAdmin.SysComponent.Application.Modules.Sys;
using NetAdmin.SysComponent.Application.Services.Sys.Dependency;
@@ -9,29 +10,32 @@ namespace NetAdmin.SysComponent.Host.Controllers.Sys;
/// 工具服务
/// </summary>
[ApiDescriptionSettings(nameof(Sys), Module = nameof(Sys))]
public sealed class ToolsController : ControllerBase<IToolsCache, IToolsService>, IToolsModule
public sealed class ToolsController(IToolsCache cache) : ControllerBase<IToolsCache, IToolsService>(cache), IToolsModule
{
/// <summary>
/// Initializes a new instance of the <see cref="ToolsController" /> class.
/// </summary>
public ToolsController(IToolsCache cache) //
: base(cache) { }
/// <summary>
/// 服务器时间
/// 获取模块信息
/// </summary>
[AllowAnonymous]
public DateTime GetServerUtcTime()
public Task<IEnumerable<GetModulesRsp>> GetModulesAsync()
{
return Cache.GetServerUtcTime();
return Cache.GetModulesAsync();
}
/// <summary>
/// 版本信息
/// 获取服务器时间
/// </summary>
[AllowAnonymous]
public string Version()
public Task<DateTime> GetServerUtcTimeAsync()
{
return Cache.Version();
return Cache.GetServerUtcTimeAsync();
}
/// <summary>
/// 获取版本信息
/// </summary>
[AllowAnonymous]
public Task<string> GetVersionAsync()
{
return Cache.GetVersionAsync();
}
}