feat: 框架代码同步 (#148)

[skip ci]

Co-authored-by: tk <fiyne1a@dingtalk.com>
This commit is contained in:
2024-06-24 16:04:28 +08:00
committed by GitHub
parent d00f0d2d9c
commit 8bc8aa960c
121 changed files with 2369 additions and 1497 deletions

View File

@@ -99,4 +99,12 @@ public sealed class ConfigController(IConfigCache cache) : ControllerBase<IConfi
{
return Cache.QueryAsync(req);
}
/// <summary>
/// 设置配置启用状态
/// </summary>
public Task<int> SetEnabledAsync(SetConfigEnabledReq req)
{
return Cache.SetEnabledAsync(req);
}
}

View File

@@ -95,7 +95,7 @@ public sealed class DeptController(IDeptCache cache) : ControllerBase<IDeptCache
/// <summary>
/// 启用/禁用部门
/// </summary>
public Task SetEnabledAsync(SetDeptEnabledReq req)
public Task<int> SetEnabledAsync(SetDeptEnabledReq req)
{
return Cache.SetEnabledAsync(req);
}

View File

@@ -144,7 +144,7 @@ public sealed class JobController(IJobCache cache) : ControllerBase<IJobCache, I
/// <summary>
/// 启用/禁用作业
/// </summary>
public Task SetEnabledAsync(SetJobEnabledReq req)
public Task<int> SetEnabledAsync(SetJobEnabledReq req)
{
return Cache.SetEnabledAsync(req);
}

View File

@@ -91,11 +91,27 @@ public sealed class RoleController(IRoleCache cache) : ControllerBase<IRoleCache
return Cache.QueryAsync(req);
}
/// <summary>
/// 设置是否显示仪表板
/// </summary>
public Task<int> SetDisplayDashboardAsync(SetDisplayDashboardReq req)
{
return Cache.SetDisplayDashboardAsync(req);
}
/// <summary>
/// 启用/禁用角色
/// </summary>
public Task SetEnabledAsync(SetRoleEnabledReq req)
public Task<int> SetEnabledAsync(SetRoleEnabledReq req)
{
return Cache.SetEnabledAsync(req);
}
/// <summary>
/// 设置是否忽略权限控制
/// </summary>
public Task<int> SetIgnorePermissionControlAsync(SetIgnorePermissionControlReq req)
{
return Cache.SetIgnorePermissionControlAsync(req);
}
}

View File

@@ -96,6 +96,14 @@ public sealed class UserController(IUserCache cache, IConfigCache configCache)
return Cache.GetAsync(req);
}
/// <summary>
/// 获取当前用户应用配置
/// </summary>
public Task<GetSessionUserAppConfigRsp> GetSessionUserAppConfigAsync()
{
return Cache.GetSessionUserAppConfigAsync();
}
/// <summary>
/// 密码登录
/// </summary>
@@ -168,7 +176,7 @@ public sealed class UserController(IUserCache cache, IConfigCache configCache)
/// </summary>
[AllowAnonymous]
[Transaction]
public Task<uint> ResetPasswordAsync(ResetPasswordReq req)
public Task<int> ResetPasswordAsync(ResetPasswordReq req)
{
return Cache.ResetPasswordAsync(req);
}
@@ -195,7 +203,7 @@ public sealed class UserController(IUserCache cache, IConfigCache configCache)
/// 启用/禁用用户
/// </summary>
[Transaction]
public Task SetEnabledAsync(SetUserEnabledReq req)
public Task<int> SetEnabledAsync(SetUserEnabledReq req)
{
return Cache.SetEnabledAsync(req);
}
@@ -213,11 +221,19 @@ public sealed class UserController(IUserCache cache, IConfigCache configCache)
/// 设置密码
/// </summary>
[Transaction]
public Task<uint> SetPasswordAsync(SetPasswordReq req)
public Task<int> SetPasswordAsync(SetPasswordReq req)
{
return Cache.SetPasswordAsync(req);
}
/// <summary>
/// 设置当前用户应用配置
/// </summary>
public Task<int> SetSessionUserAppConfigAsync(SetSessionUserAppConfigReq req)
{
return Cache.SetSessionUserAppConfigAsync(req);
}
/// <summary>
/// 当前用户信息
/// </summary>