mirror of
https://github.com/nsnail/NetAdmin.git
synced 2025-12-29 00:55:48 +08:00
feat: ✨ 基础模块
注册登录 用户管理 角色管理 部门管理 消息管理 接口管理 菜单管理 字典管理 缓存管理 请求日志 系统设置 版本信息 代码生成
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user