feat: 优化rbac结构

This commit is contained in:
chenchun
2024-09-24 11:16:19 +08:00
parent 6359696bde
commit fd0edd93ea
23 changed files with 263 additions and 256 deletions

View File

@@ -127,6 +127,7 @@ namespace Yi.Framework.Rbac.Application.Services.System
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[Permission("system:user:list")]
public override async Task<UserGetOutputDto> GetAsync(Guid id)
{
//使用导航树形查询
@@ -153,7 +154,7 @@ namespace Yi.Framework.Rbac.Application.Services.System
if (await _repository.IsAnyAsync(u => input.UserName!.Equals(u.UserName) && !id.Equals(u.Id)))
{
throw new UserFriendlyException("用户已经存在,更新失败");
throw new UserFriendlyException(UserConst.Exist);
}
var entity = await _repository.GetByIdAsync(id);