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