refactor: remove unused backend extensions

This commit is contained in:
fuenmao
2026-09-21 15:14:48 +08:00
parent b1a311cf84
commit 54d5c4fda3
113 changed files with 134 additions and 34309 deletions
@@ -20,7 +20,6 @@ public class SysUserService : IDynamicApiController, ITransient
private readonly SysOnlineUserService _sysOnlineUserService;
private readonly SysUserMenuService _sysUserMenuService;
private readonly SysCacheService _sysCacheService;
private readonly SysUserLdapService _sysUserLdapService;
private readonly SqlSugarRepository<SysUser> _sysUserRep;
private readonly IEventPublisher _eventPublisher;
@@ -31,7 +30,6 @@ public class SysUserService : IDynamicApiController, ITransient
SysConfigService sysConfigService,
SysOnlineUserService sysOnlineUserService,
SysCacheService sysCacheService,
SysUserLdapService sysUserLdapService,
SqlSugarRepository<SysUser> sysUserRep,
SysUserMenuService sysUserMenuService,
IEventPublisher eventPublisher)
@@ -43,7 +41,6 @@ public class SysUserService : IDynamicApiController, ITransient
_sysConfigService = sysConfigService;
_sysOnlineUserService = sysOnlineUserService;
_sysCacheService = sysCacheService;
_sysUserLdapService = sysUserLdapService;
_sysUserMenuService = sysUserMenuService;
_sysUserRep = sysUserRep;
_eventPublisher = eventPublisher;
@@ -77,7 +74,6 @@ public class SysUserService : IDynamicApiController, ITransient
OrgName = a.Name,
PosName = b.Name,
RoleName = SqlFunc.Subqueryable<SysUserRole>().LeftJoin<SysRole>((m, n) => m.RoleId == n.Id).Where(m => m.UserId == u.Id).SelectStringJoin((m, n) => n.Name, ","),
DomainAccount = SqlFunc.Subqueryable<SysUserLdap>().Where(m => m.UserId == u.Id).Select(m => m.Account)
}, true)
.ToPagedListAsync(input.Page, input.PageSize);
}
@@ -110,10 +106,6 @@ public class SysUserService : IDynamicApiController, ITransient
input.Id = newUser.Id;
await UpdateRoleAndExtOrg(input);
// 增加域账号
if (!string.IsNullOrWhiteSpace(input.DomainAccount))
await _sysUserLdapService.AddUserLdap(newUser.TenantId!.Value, newUser.Id, newUser.Account, input.DomainAccount);
// 发布系统用户操作事件
await _eventPublisher.PublishAsync(SysUserEventTypeEnum.Add, new
{
@@ -153,10 +145,6 @@ public class SysUserService : IDynamicApiController, ITransient
input.Id = newUser.Id;
await UpdateRoleAndExtOrg(input);
// 增加域账号
if (!string.IsNullOrWhiteSpace(input.DomainAccount))
await _sysUserLdapService.AddUserLdap(newUser.TenantId!.Value, newUser.Id, newUser.Account, input.DomainAccount);
// 发布系统用户操作事件
await _eventPublisher.PublishAsync(SysUserEventTypeEnum.Register, new
{
@@ -199,8 +187,6 @@ public class SysUserService : IDynamicApiController, ITransient
var roleIds = await GetOwnRoleList(input.Id);
if (input.OrgId != user.OrgId || !input.RoleIdList.OrderBy(u => u).SequenceEqual(roleIds.OrderBy(u => u)))
await _sysOnlineUserService.ForceOffline(input.Id);
// 更新域账号
await _sysUserLdapService.AddUserLdap(user.TenantId!.Value, user.Id, user.Account, input.DomainAccount);
// 发布系统用户操作事件
await _eventPublisher.PublishAsync(SysUserEventTypeEnum.Update, new
@@ -270,9 +256,6 @@ public class SysUserService : IDynamicApiController, ITransient
// 删除用户扩展机构
await _sysUserExtOrgService.DeleteUserExtOrgByUserId(input.Id);
// 删除域账号
await _sysUserLdapService.DeleteUserLdapByUserId(input.Id);
// 删除用户收藏菜单
await _sysUserMenuService.DeleteUserMenuList(input.Id);