权限管理

This commit is contained in:
马梓彭 2026-02-08 15:57:40 +08:00
parent 38f7ff3523
commit 33b89559e4
10 changed files with 341 additions and 295 deletions

View File

@ -1,4 +1,7 @@
namespace YD_Event.Application.Role.Dtos;
using System.ComponentModel.DataAnnotations;
using YD_Event.Core.Enum;
namespace YD_Event.Application.Role.Dtos;
public class AddSysRoleInput
{
@ -9,23 +12,6 @@ public class AddSysRoleInput
[MaxLength(32, ErrorMessage = "角色名称限制32个字符内")]
public string Name { get; set; }
/// <summary>
/// 状态
/// </summary>
public AvailabilityStatus Status { get; set; }
/// <summary>
/// 角色编码
/// </summary>
[Required(ErrorMessage = "角色编码为必填项")]
[MaxLength(32, ErrorMessage = "角色名称限制32个字符内")]
public string Code { get; set; }
/// <summary>
/// 排序值
/// </summary>
public int Sort { get; set; }
/// <summary>
/// 备注
/// </summary>
@ -33,8 +19,12 @@ public class AddSysRoleInput
public string Remark { get; set; }
/// <summary>
/// 授权按钮菜单Id
/// 排序
/// </summary>
[Required(ErrorMessage = "请为角色分配权限")]
public List<long> Menus { get; set; }
}
public int Sort { get; set; } = 100;
/// <summary>
/// 状态
/// </summary>
public AvailabilityStatus Status { get; set; } = AvailabilityStatus.Enable;
}

View File

@ -0,0 +1,18 @@
using System.ComponentModel.DataAnnotations;
namespace YD_Event.Application.Role.Dtos;
public class GrantRolePermissionInput
{
/// <summary>
/// 角色ID
/// </summary>
[Required(ErrorMessage = "角色ID不能为空")]
public long Id { get; set; }
/// <summary>
/// 菜单ID集合
/// </summary>
[Required(ErrorMessage = "请选择权限")]
public List<long> MenuIds { get; set; }
}

View File

@ -1,9 +1,12 @@
namespace YD_Event.Application.Role.Dtos;
using System.ComponentModel.DataAnnotations;
namespace YD_Event.Application.Role.Dtos;
public class UpdateSysRoleInput : AddSysRoleInput
{
/// <summary>
/// 角色Id
/// 主键Id
/// </summary>
[Required(ErrorMessage = "Id不能为空")]
public long Id { get; set; }
}
}

View File

@ -1,11 +1,12 @@
using YD_Event.Application.Role.Dtos;
using YD_Event.Core.Shared;
namespace YD_Event.Application.Role;
/// <summary>
/// 角色管理
/// </summary>
public class SysRoleService : BaseService<SysRole>
public class SysRoleService : BaseService<SysRole>, ITransient
{
private readonly ISqlSugarRepository<SysRole> _sysRoleRepository;
private readonly ISqlSugarRepository<SysRoleMenu> _sysRoleMenuRepository;
@ -28,7 +29,8 @@ public class SysRoleService : BaseService<SysRole>
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
[HttpGet]
[DisplayName("角色分页查询")]
[HttpGet("page")]
public async Task<PageResult<SysRolePageOutput>> Page([FromQuery] SysRoleQueryInput dto)
{
return await _sysRoleRepository.AsQueryable()
@ -52,25 +54,22 @@ public class SysRoleService : BaseService<SysRole>
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
[Description("添加角色")]
[DisplayName("添加角色")]
[HttpPost("add")]
[UnitOfWork]
public async Task AddRole(AddSysRoleInput dto)
{
if (await _sysRoleRepository.IsAnyAsync(x => x.Code == dto.Code))
{
throw Oops.Bah("角色编码已存在");
}
var role = dto.Adapt<SysRole>();
role.Id = _idGenerator.NewLong();
var roleMenus = dto.Menus.Select(x => new SysRoleMenu()
// 自动生成Code,避免重复
role.Code = $"Role_{role.Id}";
if (await _sysRoleRepository.IsAnyAsync(x => x.Name == dto.Name))
{
MenuId = x,
RoleId = role.Id
}).ToList();
throw new InvalidOperationException($"角色名称 {dto.Name} 已存在");
}
await _sysRoleRepository.InsertAsync(role);
await _sysRoleMenuRepository.InsertRangeAsync(roleMenus);
}
/// <summary>
@ -78,7 +77,7 @@ public class SysRoleService : BaseService<SysRole>
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
[Description("更新角色")]
[DisplayName("更新角色")]
[HttpPut("edit")]
[UnitOfWork]
public async Task UpdateRole(UpdateSysRoleInput dto)
@ -86,22 +85,42 @@ public class SysRoleService : BaseService<SysRole>
var sysRole = await _sysRoleRepository.GetByIdAsync(dto.Id);
if (sysRole == null)
{
throw Oops.Bah("无效参数");
throw new InvalidOperationException("角色不存在");
}
if (await _sysRoleRepository.IsAnyAsync(x => x.Id != dto.Id && x.Code == dto.Code))
if (await _sysRoleRepository.IsAnyAsync(x => x.Id != dto.Id && x.Name == dto.Name))
{
throw Oops.Bah("角色编码已存在");
throw new InvalidOperationException($"角色名称 {dto.Name} 已存在");
}
dto.Adapt(sysRole);
var roleMenus = dto.Menus.Select(x => new SysRoleMenu()
await _sysRoleRepository.UpdateAsync(sysRole);
}
/// <summary>
/// 授权角色权限
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[DisplayName("授权角色权限")]
[HttpPost("grantPermission")]
[UnitOfWork]
public async Task GrantPermission(GrantRolePermissionInput input)
{
var sysRole = await _sysRoleRepository.GetByIdAsync(input.Id);
if (sysRole == null) throw new InvalidOperationException("角色不存在");
var roleMenus = input.MenuIds.Select(x => new SysRoleMenu()
{
MenuId = x,
RoleId = sysRole.Id
RoleId = input.Id
}).ToList();
await _sysRoleRepository.UpdateAsync(sysRole);
await _sysRoleMenuRepository.DeleteAsync(x => x.RoleId == sysRole.Id);
await _sysRoleMenuRepository.InsertRangeAsync(roleMenus);
await _sysRoleMenuRepository.DeleteAsync(x => x.RoleId == input.Id);
if (roleMenus.Any())
{
await _sysRoleMenuRepository.InsertRangeAsync(roleMenus);
}
await _easyCachingProvider.RemoveByPrefixAsync(CacheConst.PermissionKey);
}
@ -110,14 +129,16 @@ public class SysRoleService : BaseService<SysRole>
/// </summary>
/// <param name="id">角色id</param>
/// <returns></returns>
[Description("获取角色可访问的菜单和按钮id")]
[HttpGet("getRuleMenu")]
public async Task<List<long>> GetRuleMenu([FromQuery] long id)
[DisplayName("获取角色可访问的菜单和按钮id")]
[HttpGet("getRoleMenu")]
public async Task<List<long>> GetRoleMenu([FromQuery] long id)
{
return await _sysRoleRepository.AsQueryable().InnerJoin<SysRoleMenu>((role, roleMenu) => role.Id == roleMenu.RoleId)
return await _sysRoleRepository.AsQueryable()
.InnerJoin<SysRoleMenu>((role, roleMenu) => role.Id == roleMenu.RoleId)
.InnerJoin<SysMenu>((role, roleMenu, menu) => roleMenu.MenuId == menu.Id)
.Where((role, roleMenu, menu) => role.Id == id && menu.Status == AvailabilityStatus.Enable)
.Select((role, roleMenu) => roleMenu.MenuId).ToListAsync();
.Select((role, roleMenu) => roleMenu.MenuId)
.ToListAsync();
}
/// <summary>
@ -125,7 +146,8 @@ public class SysRoleService : BaseService<SysRole>
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
[Description("修改角色状态"), HttpPut("setStatus")]
[DisplayName("修改角色状态")]
[HttpPut("setStatus")]
public override async Task SetStatus(AvailabilityDto dto)
{
await base.SetStatus(dto);
@ -137,10 +159,13 @@ public class SysRoleService : BaseService<SysRole>
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
[Description("删除角色"), HttpDelete("delete")]
[DisplayName("删除角色")]
[HttpDelete("delete")]
public override async Task Delete(KeyDto dto)
{
await base.Delete(dto);
// 物理删除关联权限
await _sysRoleMenuRepository.DeleteAsync(x => x.RoleId == dto.Id);
await _easyCachingProvider.RemoveByPrefixAsync(CacheConst.PermissionKey);
}
@ -148,8 +173,8 @@ public class SysRoleService : BaseService<SysRole>
/// 角色下拉选项
/// </summary>
/// <returns></returns>
[Description("角色下拉选项")]
[HttpGet]
[DisplayName("角色下拉选项")]
[HttpGet("select")]
public async Task<List<SelectOutput>> RoleSelect()
{
return await _sysRoleRepository.AsQueryable().Where(x => x.Status == AvailabilityStatus.Enable)
@ -161,4 +186,4 @@ public class SysRoleService : BaseService<SysRole>
Label = x.Name
}).ToListAsync();
}
}
}

View File

@ -2,13 +2,6 @@
public class AddSysUserInput
{
/// <summary>
/// 用户名
/// </summary>
[Required(ErrorMessage = "用户名为必填项")]
[MaxLength(32, ErrorMessage = "用户名限制32个字符内")]
public string Account { get; set; }
/// <summary>
/// 姓名
/// </summary>
@ -17,55 +10,20 @@ public class AddSysUserInput
public string Name { get; set; }
/// <summary>
/// 性别
/// 账号
/// </summary>
public Gender Gender { get; set; }
[Required(ErrorMessage = "账号为必填项")]
[MaxLength(32, ErrorMessage = "账号限制32个字符内")]
public string Account { get; set; }
/// <summary>
/// 组织机构id
/// </summary>
public long OrgId { get; set; }
/// <summary>
/// 昵称
/// </summary>
[DataValidation(AllowNullValue = true)]
[MaxLength(32, ErrorMessage = "昵称限制32个字符")]
public string NickName { get; set; }
/// <summary>
/// 生日
/// </summary>
public DateOnly? Birthday { get; set; }
/// <summary>
/// 手机号码
/// </summary>
[MaxLength(16, ErrorMessage = "手机号码限制16个字符内")]
[DataValidation(ValidationTypes.PhoneNumber, ErrorMessage = "手机号码不合法", AllowNullValue = true)]
public string Mobile { get; set; }
/// <summary>
/// 可用状态
/// </summary>
public AvailabilityStatus Status { get; set; }
/// <summary>
/// 邮箱
/// </summary>
[MaxLength(64, ErrorMessage = "邮箱限制64个字符内")]
[DataValidation(ValidationTypes.EmailAddress, ErrorMessage = "邮箱地址不合法", AllowNullValue = true)]
public string Email { get; set; }
/// <summary>
/// 备注
/// </summary>
[MaxLength(200, ErrorMessage = "备注限制200字符内")]
[DataValidation(AllowNullValue = true)]
public string Remark { get; set; }
/// <summary>
/// 角色
/// 关联角色ID集合
/// </summary>
[Required(ErrorMessage = "请选择关联角色")]
public List<long> Roles { get; set; }
}
/// <summary>
/// 状态(默认启用)
/// </summary>
public AvailabilityStatus Status { get; set; } = AvailabilityStatus.Enable;
}

View File

@ -0,0 +1,16 @@
namespace YD_Event.Application.User.Dtos;
public class GrantRoleInput
{
/// <summary>
/// 用户ID
/// </summary>
[Required]
public long UserId { get; set; }
/// <summary>
/// 角色ID集合
/// </summary>
[Required]
public List<long> RoleIds { get; set; }
}

View File

@ -7,18 +7,23 @@ public class QuerySysUserInput : Pagination
/// </summary>
public string Account { get; set; }
/// <summary>
/// 组织机构Id
/// </summary>
public long? OrgId { get; set; }
/// <summary>
/// 手机号
/// </summary>
public string Mobile { get; set; }
/// <summary>
/// 姓名
/// </summary>
public string Name { get; set; }
}
/// <summary>
/// 关联角色ID
/// </summary>
public long? RoleId { get; set; }
/// <summary>
/// 开始时间
/// </summary>
public DateTime? StartTime { get; set; }
/// <summary>
/// 结束时间
/// </summary>
public DateTime? EndTime { get; set; }
}

View File

@ -7,35 +7,15 @@ public class SysUserPageOutput : KeyDto
/// </summary>
public string Name { get; set; }
/// <summary>
/// 状态
/// </summary>
public AvailabilityStatus Status { get; set; }
/// <summary>
/// 账户名
/// </summary>
public string Account { get; set; }
/// <summary>
/// 生日
/// 关联角色名称(逗号分隔)
/// </summary>
public DateOnly? Birthday { get; set; }
/// <summary>
/// 手机号码
/// </summary>
public string Mobile { get; set; }
/// <summary>
/// 性别
/// </summary>
public Gender Gender { get; set; }
/// <summary>
/// 昵称
/// </summary>
public string NickName { get; set; }
public string RoleNames { get; set; }
/// <summary>
/// 创建时间
@ -43,7 +23,7 @@ public class SysUserPageOutput : KeyDto
public DateTime CreatedTime { get; set; }
/// <summary>
/// 邮箱
/// 状态
/// </summary>
public string Email { get; set; }
}
public AvailabilityStatus Status { get; set; }
}

View File

@ -1,6 +1,7 @@
using YD_Event.Application.Auth;
using YD_Event.Application.Menu;
using YD_Event.Application.User.Dtos;
using YD_Event.Core.Shared;
namespace YD_Event.Application.User;
@ -11,6 +12,7 @@ public class SysUserService : BaseService<SysUser>, ITransient
{
private readonly ISqlSugarRepository<SysUser> _repository;
private readonly ISqlSugarRepository<SysUserRole> _userRoleRepository;
private readonly ISqlSugarRepository<SysRole> _roleRepository;
private readonly ISqlSugarRepository<SysOrganization> _orgRepository;
private readonly SysMenuService _sysMenuService;
private readonly AuthManager _authManager;
@ -19,6 +21,7 @@ public class SysUserService : BaseService<SysUser>, ITransient
public SysUserService(ISqlSugarRepository<SysUser> repository,
ISqlSugarRepository<SysUserRole> userRoleRepository,
ISqlSugarRepository<SysRole> roleRepository,
ISqlSugarRepository<SysOrganization> orgRepository,
SysMenuService sysMenuService,
AuthManager authManager,
@ -27,6 +30,7 @@ public class SysUserService : BaseService<SysUser>, ITransient
{
_repository = repository;
_userRoleRepository = userRoleRepository;
_roleRepository = roleRepository;
_orgRepository = orgRepository;
_sysMenuService = sysMenuService;
_authManager = authManager;
@ -40,35 +44,52 @@ public class SysUserService : BaseService<SysUser>, ITransient
/// <param name="dto"></param>
/// <returns></returns>
[DisplayName("系统用户分页查询")]
[HttpGet]
[HttpGet("page")]
public async Task<PageResult<SysUserPageOutput>> Page([FromQuery] QuerySysUserInput dto)
{
List<long> orgIdList = new List<long>();
if (dto.OrgId.HasValue)
{
orgIdList.Add(dto.OrgId.Value);
var list = await _orgRepository.AsQueryable().ToChildListAsync(x => x.ParentId, dto.OrgId);
orgIdList.AddRange(list.Select(x => x.Id));
}
return await _repository.AsQueryable()
.Where(x => x.Id > 1)
// 构造基本查询
var query = _repository.AsQueryable()
.Where(x => x.Id > 1) // 排除超级管理员或特定ID
.WhereIF(!string.IsNullOrWhiteSpace(dto.Name), x => x.Name.Contains(dto.Name))
.WhereIF(!string.IsNullOrWhiteSpace(dto.Account), x => x.Account.Contains(dto.Account))
.WhereIF(!string.IsNullOrWhiteSpace(dto.Mobile), x => x.Mobile.Contains(dto.Mobile))
.WhereIF(orgIdList.Any(), x => orgIdList.Contains(x.OrgId))
.Select(x => new SysUserPageOutput
{
Name = x.Name,
Status = x.Status,
Account = x.Account,
Birthday = x.Birthday,
Mobile = x.Mobile,
Gender = x.Gender,
NickName = x.NickName,
CreatedTime = x.CreatedTime,
Email = x.Email,
Id = x.Id
}).ToPagedListAsync(dto);
.WhereIF(dto.StartTime.HasValue, x => x.CreatedTime >= dto.StartTime.Value)
.WhereIF(dto.EndTime.HasValue, x => x.CreatedTime <= dto.EndTime.Value);
// 如果需要按角色筛选
if (dto.RoleId.HasValue)
{
query = query.InnerJoin<SysUserRole>((u, ur) => u.Id == ur.UserId && ur.RoleId == dto.RoleId.Value);
}
var entityList = await query.ToPagedListAsync(dto);
// 转换并填充角色名称
var resultList = new List<SysUserPageOutput>();
// 批量获取角色信息优化性能
var userIds = entityList.Rows.Select(x => x.Id).ToList();
var userRoles = await _userRoleRepository.AsQueryable()
.InnerJoin<SysRole>((ur, r) => ur.RoleId == r.Id)
.Where((ur, r) => userIds.Contains(ur.UserId))
.Select((ur, r) => new { ur.UserId, RoleName = r.Name })
.ToListAsync();
foreach (var user in entityList.Rows)
{
var output = user.Adapt<SysUserPageOutput>();
var roles = userRoles.Where(x => x.UserId == user.Id).Select(x => x.RoleName).ToList();
output.RoleNames = string.Join(",", roles);
resultList.Add(output);
}
return new PageResult<SysUserPageOutput>
{
PageNo = entityList.PageNo,
PageSize = entityList.PageSize,
Total = entityList.Total,
Rows = resultList,
Pages = entityList.Pages
};
}
/// <summary>
@ -76,21 +97,36 @@ public class SysUserService : BaseService<SysUser>, ITransient
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
[UnitOfWork, HttpPost("add")]
[UnitOfWork, HttpPost]
[DisplayName("添加系统用户")]
public async Task AddUser(AddSysUserInput dto)
{
// 校验账号是否已存在
if (await _repository.IsAnyAsync(x => x.Account == dto.Account))
throw new InvalidOperationException($"账号 {dto.Account} 已存在");
var user = dto.Adapt<SysUser>();
user.Id = _idGenerator.NextId();
string encode = _idGenerator.Encode(user.Id);
user.Password = MD5Encryption.Encrypt(encode + "123456");
var roles = dto.Roles.Select(x => new SysUserRole()
user.Password = MD5Encryption.Encrypt(encode + "123456"); // 默认密码
user.CreatedTime = DateTime.Now; // 确保设置创建时间
// 处理角色关联
var roles = new List<SysUserRole>();
if (dto.Roles != null && dto.Roles.Any())
{
RoleId = x,
UserId = user.Id
}).ToList();
roles = dto.Roles.Select(x => new SysUserRole()
{
RoleId = x,
UserId = user.Id
}).ToList();
}
await _repository.InsertAsync(user);
await _userRoleRepository.InsertRangeAsync(roles);
if (roles.Any())
{
await _userRoleRepository.InsertRangeAsync(roles);
}
}
/// <summary>
@ -99,21 +135,69 @@ public class SysUserService : BaseService<SysUser>, ITransient
/// <param name="dto"></param>
/// <returns></returns>
[DisplayName("更新系统用户信息")]
[UnitOfWork, HttpPut("edit")]
[UnitOfWork, HttpPut]
public async Task UpdateUser(UpdateSysUserInput dto)
{
var user = await _repository.GetByIdAsync(dto.Id);
if (user == null) throw Oops.Bah("无效参数");
if (user == null) throw new InvalidOperationException("用户不存在");
// 校验账号是否重复(排除自己)
if (await _repository.IsAnyAsync(x => x.Account == dto.Account && x.Id != dto.Id))
throw new InvalidOperationException($"账号 {dto.Account} 已被使用");
dto.Adapt(user);
var roles = dto.Roles.Select(x => new SysUserRole()
// 处理角色关联:先删后加
var roles = new List<SysUserRole>();
if (dto.Roles != null && dto.Roles.Any())
{
RoleId = x,
UserId = user.Id
}).ToList();
roles = dto.Roles.Select(x => new SysUserRole()
{
RoleId = x,
UserId = user.Id
}).ToList();
}
await _repository.UpdateAsync(user);
await _userRoleRepository.DeleteAsync(x => x.UserId == user.Id);
await _userRoleRepository.InsertRangeAsync(roles);
if (roles.Any())
{
await _userRoleRepository.InsertRangeAsync(roles);
}
await _easyCachingProvider.RemoveByPrefixAsync(CacheConst.PermissionKey);
}
/// <summary>
/// 删除系统用户
/// </summary>
/// <param name="dto"></param>
/// <returns></returns>
[DisplayName("删除系统用户")]
[HttpDelete]
public override async Task Delete(KeyDto dto)
{
await base.Delete(dto);
await _easyCachingProvider.RemoveByPrefixAsync(CacheConst.PermissionKey);
}
[DisplayName("关联角色")]
[HttpPost("grantRole")]
public async Task GrantRole(GrantRoleInput input)
{
var user = await _repository.GetByIdAsync(input.UserId);
if (user == null) throw new InvalidOperationException("用户不存在");
var roles = input.RoleIds.Select(x => new SysUserRole()
{
RoleId = x,
UserId = input.UserId
}).ToList();
await _userRoleRepository.DeleteAsync(x => x.UserId == input.UserId);
if (roles.Any())
{
await _userRoleRepository.InsertRangeAsync(roles);
}
await _easyCachingProvider.RemoveByPrefixAsync(CacheConst.PermissionKey);
}
@ -122,7 +206,7 @@ public class SysUserService : BaseService<SysUser>, ITransient
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpGet]
[HttpGet("detail")]
public async Task<UpdateSysUserInput> Detail([FromQuery] long id)
{
return await _repository.AsQueryable().Where(x => x.Id == id)
@ -131,14 +215,7 @@ public class SysUserService : BaseService<SysUser>, ITransient
Id = x.Id,
Name = x.Name,
Status = x.Status,
OrgId = x.OrgId,
Account = x.Account,
Mobile = x.Mobile,
Remark = x.Remark,
Birthday = x.Birthday,
Email = x.Email,
Gender = x.Gender,
NickName = x.NickName,
Roles = SqlFunc.Subqueryable<SysUserRole>().Where(s => s.UserId == x.Id).ToList(s => s.RoleId)
}).FirstAsync();
}
@ -148,7 +225,7 @@ public class SysUserService : BaseService<SysUser>, ITransient
/// </summary>
/// <returns></returns>
[DisplayName("重置系统用户密码")]
[HttpPatch]
[HttpPatch("reset")]
public async Task Reset(ResetPasswordInput dto)
{
string encrypt = MD5Encryption.Encrypt(_idGenerator.Encode(dto.Id) + dto.Password);
@ -163,7 +240,7 @@ public class SysUserService : BaseService<SysUser>, ITransient
/// </summary>
/// <returns></returns>
[DisplayName("获取登录用户的信息")]
[HttpGet]
[HttpGet("currentUserInfo")]
public async Task<SysUserInfoOutput> CurrentUserInfo()
{
var userId = _authManager.UserId;
@ -206,7 +283,7 @@ public class SysUserService : BaseService<SysUser>, ITransient
/// <param name="dto"></param>
/// <returns></returns>
[DisplayName("用户修改账户密码")]
[HttpPatch]
[HttpPatch("changePassword")]
public async Task ChangePassword(ChangePasswordOutput dto)
{
var userId = _authManager.UserId;
@ -232,7 +309,7 @@ public class SysUserService : BaseService<SysUser>, ITransient
/// <param name="url"></param>
/// <returns></returns>
[DisplayName("用户修改头像")]
[HttpPatch]
[HttpPatch("uploadAvatar")]
public async Task UploadAvatar([FromBody] string url)
{
long userId = _authManager.UserId;
@ -261,4 +338,4 @@ public class SysUserService : BaseService<SysUser>, ITransient
NickName = dto.NickName
}, x => x.Id == userId);
}
}
}

View File

@ -1794,29 +1794,29 @@
角色名称
</summary>
</member>
<member name="P:YD_Event.Application.Role.Dtos.AddSysRoleInput.Status">
<summary>
状态
</summary>
</member>
<member name="P:YD_Event.Application.Role.Dtos.AddSysRoleInput.Code">
<summary>
角色编码
</summary>
</member>
<member name="P:YD_Event.Application.Role.Dtos.AddSysRoleInput.Sort">
<summary>
排序值
</summary>
</member>
<member name="P:YD_Event.Application.Role.Dtos.AddSysRoleInput.Remark">
<summary>
备注
</summary>
</member>
<member name="P:YD_Event.Application.Role.Dtos.AddSysRoleInput.Menus">
<member name="P:YD_Event.Application.Role.Dtos.AddSysRoleInput.Sort">
<summary>
授权按钮菜单Id
排序
</summary>
</member>
<member name="P:YD_Event.Application.Role.Dtos.AddSysRoleInput.Status">
<summary>
状态
</summary>
</member>
<member name="P:YD_Event.Application.Role.Dtos.GrantRolePermissionInput.Id">
<summary>
角色ID
</summary>
</member>
<member name="P:YD_Event.Application.Role.Dtos.GrantRolePermissionInput.MenuIds">
<summary>
菜单ID集合
</summary>
</member>
<member name="P:YD_Event.Application.Role.Dtos.SysRolePageOutput.Id">
@ -1861,7 +1861,7 @@
</member>
<member name="P:YD_Event.Application.Role.Dtos.UpdateSysRoleInput.Id">
<summary>
角色Id
主键Id
</summary>
</member>
<member name="T:YD_Event.Application.Role.SysRoleService">
@ -1890,7 +1890,14 @@
<param name="dto"></param>
<returns></returns>
</member>
<member name="M:YD_Event.Application.Role.SysRoleService.GetRuleMenu(System.Int64)">
<member name="M:YD_Event.Application.Role.SysRoleService.GrantPermission(YD_Event.Application.Role.Dtos.GrantRolePermissionInput)">
<summary>
授权角色权限
</summary>
<param name="input"></param>
<returns></returns>
</member>
<member name="M:YD_Event.Application.Role.SysRoleService.GetRoleMenu(System.Int64)">
<summary>
获取角色可访问的菜单和按钮id
</summary>
@ -1986,59 +1993,24 @@
<param name="dto"></param>
<returns></returns>
</member>
<member name="P:YD_Event.Application.User.Dtos.AddSysUserInput.Account">
<summary>
用户名
</summary>
</member>
<member name="P:YD_Event.Application.User.Dtos.AddSysUserInput.Name">
<summary>
姓名
</summary>
</member>
<member name="P:YD_Event.Application.User.Dtos.AddSysUserInput.Gender">
<member name="P:YD_Event.Application.User.Dtos.AddSysUserInput.Account">
<summary>
性别
</summary>
</member>
<member name="P:YD_Event.Application.User.Dtos.AddSysUserInput.OrgId">
<summary>
组织机构id
</summary>
</member>
<member name="P:YD_Event.Application.User.Dtos.AddSysUserInput.NickName">
<summary>
昵称
</summary>
</member>
<member name="P:YD_Event.Application.User.Dtos.AddSysUserInput.Birthday">
<summary>
生日
</summary>
</member>
<member name="P:YD_Event.Application.User.Dtos.AddSysUserInput.Mobile">
<summary>
手机号码
</summary>
</member>
<member name="P:YD_Event.Application.User.Dtos.AddSysUserInput.Status">
<summary>
可用状态
</summary>
</member>
<member name="P:YD_Event.Application.User.Dtos.AddSysUserInput.Email">
<summary>
邮箱
</summary>
</member>
<member name="P:YD_Event.Application.User.Dtos.AddSysUserInput.Remark">
<summary>
备注
账号
</summary>
</member>
<member name="P:YD_Event.Application.User.Dtos.AddSysUserInput.Roles">
<summary>
角色
关联角色ID集合
</summary>
</member>
<member name="P:YD_Event.Application.User.Dtos.AddSysUserInput.Status">
<summary>
状态(默认启用)
</summary>
</member>
<member name="P:YD_Event.Application.User.Dtos.AuthAccountPageOutput.Id">
@ -2091,26 +2063,41 @@
新密码
</summary>
</member>
<member name="P:YD_Event.Application.User.Dtos.GrantRoleInput.UserId">
<summary>
用户ID
</summary>
</member>
<member name="P:YD_Event.Application.User.Dtos.GrantRoleInput.RoleIds">
<summary>
角色ID集合
</summary>
</member>
<member name="P:YD_Event.Application.User.Dtos.QuerySysUserInput.Account">
<summary>
账号
</summary>
</member>
<member name="P:YD_Event.Application.User.Dtos.QuerySysUserInput.OrgId">
<summary>
组织机构Id
</summary>
</member>
<member name="P:YD_Event.Application.User.Dtos.QuerySysUserInput.Mobile">
<summary>
手机号
</summary>
</member>
<member name="P:YD_Event.Application.User.Dtos.QuerySysUserInput.Name">
<summary>
姓名
</summary>
</member>
<member name="P:YD_Event.Application.User.Dtos.QuerySysUserInput.RoleId">
<summary>
关联角色ID
</summary>
</member>
<member name="P:YD_Event.Application.User.Dtos.QuerySysUserInput.StartTime">
<summary>
开始时间
</summary>
</member>
<member name="P:YD_Event.Application.User.Dtos.QuerySysUserInput.EndTime">
<summary>
结束时间
</summary>
</member>
<member name="P:YD_Event.Application.User.Dtos.ResetPasswordInput.Password">
<summary>
密码
@ -2191,34 +2178,14 @@
姓名
</summary>
</member>
<member name="P:YD_Event.Application.User.Dtos.SysUserPageOutput.Status">
<summary>
状态
</summary>
</member>
<member name="P:YD_Event.Application.User.Dtos.SysUserPageOutput.Account">
<summary>
账户名
</summary>
</member>
<member name="P:YD_Event.Application.User.Dtos.SysUserPageOutput.Birthday">
<member name="P:YD_Event.Application.User.Dtos.SysUserPageOutput.RoleNames">
<summary>
生日
</summary>
</member>
<member name="P:YD_Event.Application.User.Dtos.SysUserPageOutput.Mobile">
<summary>
手机号码
</summary>
</member>
<member name="P:YD_Event.Application.User.Dtos.SysUserPageOutput.Gender">
<summary>
性别
</summary>
</member>
<member name="P:YD_Event.Application.User.Dtos.SysUserPageOutput.NickName">
<summary>
昵称
关联角色名称(逗号分隔)
</summary>
</member>
<member name="P:YD_Event.Application.User.Dtos.SysUserPageOutput.CreatedTime">
@ -2226,9 +2193,9 @@
创建时间
</summary>
</member>
<member name="P:YD_Event.Application.User.Dtos.SysUserPageOutput.Email">
<member name="P:YD_Event.Application.User.Dtos.SysUserPageOutput.Status">
<summary>
邮箱
状态
</summary>
</member>
<member name="P:YD_Event.Application.User.Dtos.UpdateCurrentUserInput.Name">
@ -2292,6 +2259,13 @@
<param name="dto"></param>
<returns></returns>
</member>
<member name="M:YD_Event.Application.User.SysUserService.Delete(YD_Event.Core.Shared.KeyDto)">
<summary>
删除系统用户
</summary>
<param name="dto"></param>
<returns></returns>
</member>
<member name="M:YD_Event.Application.User.SysUserService.Detail(System.Int64)">
<summary>
系统用户详情