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

@@ -13,19 +13,9 @@ namespace NetAdmin.SysComponent.Host.Controllers.Sys;
/// 用户服务
/// </summary>
[ApiDescriptionSettings(nameof(Sys), Module = nameof(Sys))]
public sealed class UserController : ControllerBase<IUserCache, IUserService>, IUserModule
public sealed class UserController
(IUserCache cache, IConfigCache configCache) : ControllerBase<IUserCache, IUserService>(cache), IUserModule
{
private readonly IConfigCache _configCache;
/// <summary>
/// Initializes a new instance of the <see cref="UserController" /> class.
/// </summary>
public UserController(IUserCache cache, IConfigCache configCache) //
: base(cache)
{
_configCache = configCache;
}
/// <summary>
/// 批量删除用户
/// </summary>
@@ -84,7 +74,6 @@ public sealed class UserController : ControllerBase<IUserCache, IUserService>, I
/// <summary>
/// 获取单个用户
/// </summary>
[NonAction]
public Task<QueryUserRsp> GetAsync(QueryUserReq req)
{
return Cache.GetAsync(req);
@@ -145,7 +134,7 @@ public sealed class UserController : ControllerBase<IUserCache, IUserService>, I
[AllowAnonymous]
public async Task<UserInfoRsp> RegisterAsync(RegisterUserReq req)
{
var config = await _configCache.GetLatestConfigAsync();
var config = await configCache.GetLatestConfigAsync();
return await Cache.RegisterAsync(req with {
DeptId = config.UserRegisterDeptId