|
|
@ -28,9 +28,9 @@ namespace Sanhe.Abp.Identity |
|
|
|
/// <param name="input"></param> |
|
|
|
/// <param name="input"></param> |
|
|
|
/// <returns></returns> |
|
|
|
/// <returns></returns> |
|
|
|
[HttpPost] |
|
|
|
[HttpPost] |
|
|
|
public async virtual Task<OrganizationUnitDto> CreateAsync(OrganizationUnitCreateDto input) |
|
|
|
public virtual Task<OrganizationUnitDto> CreateAsync(OrganizationUnitCreateDto input) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return await OrganizationUnitAppService.CreateAsync(input); |
|
|
|
return OrganizationUnitAppService.CreateAsync(input); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
@ -40,9 +40,9 @@ namespace Sanhe.Abp.Identity |
|
|
|
/// <returns></returns> |
|
|
|
/// <returns></returns> |
|
|
|
[HttpDelete] |
|
|
|
[HttpDelete] |
|
|
|
[Route("{id}")] |
|
|
|
[Route("{id}")] |
|
|
|
public async virtual Task DeleteAsync(Guid id) |
|
|
|
public virtual Task DeleteAsync(Guid id) |
|
|
|
{ |
|
|
|
{ |
|
|
|
await OrganizationUnitAppService.DeleteAsync(id); |
|
|
|
return OrganizationUnitAppService.DeleteAsync(id); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
@ -52,9 +52,9 @@ namespace Sanhe.Abp.Identity |
|
|
|
/// <returns></returns> |
|
|
|
/// <returns></returns> |
|
|
|
[HttpGet] |
|
|
|
[HttpGet] |
|
|
|
[Route("find-children")] |
|
|
|
[Route("find-children")] |
|
|
|
public async virtual Task<ListResultDto<OrganizationUnitDto>> FindChildrenAsync(OrganizationUnitGetChildrenDto input) |
|
|
|
public virtual Task<ListResultDto<OrganizationUnitDto>> FindChildrenAsync(OrganizationUnitGetChildrenDto input) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return await OrganizationUnitAppService.FindChildrenAsync(input); |
|
|
|
return OrganizationUnitAppService.FindChildrenAsync(input); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
@ -64,9 +64,9 @@ namespace Sanhe.Abp.Identity |
|
|
|
/// <returns></returns> |
|
|
|
/// <returns></returns> |
|
|
|
[HttpGet] |
|
|
|
[HttpGet] |
|
|
|
[Route("{id}")] |
|
|
|
[Route("{id}")] |
|
|
|
public async virtual Task<OrganizationUnitDto> GetAsync(Guid id) |
|
|
|
public virtual Task<OrganizationUnitDto> GetAsync(Guid id) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return await OrganizationUnitAppService.GetAsync(id); |
|
|
|
return OrganizationUnitAppService.GetAsync(id); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
@ -75,9 +75,9 @@ namespace Sanhe.Abp.Identity |
|
|
|
/// <returns></returns> |
|
|
|
/// <returns></returns> |
|
|
|
[HttpGet] |
|
|
|
[HttpGet] |
|
|
|
[Route("root-node")] |
|
|
|
[Route("root-node")] |
|
|
|
public async virtual Task<ListResultDto<OrganizationUnitDto>> GetRootAsync() |
|
|
|
public virtual Task<ListResultDto<OrganizationUnitDto>> GetRootAsync() |
|
|
|
{ |
|
|
|
{ |
|
|
|
return await OrganizationUnitAppService.GetRootAsync(); |
|
|
|
return OrganizationUnitAppService.GetRootAsync(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
@ -87,9 +87,9 @@ namespace Sanhe.Abp.Identity |
|
|
|
/// <returns></returns> |
|
|
|
/// <returns></returns> |
|
|
|
[HttpGet] |
|
|
|
[HttpGet] |
|
|
|
[Route("last-children")] |
|
|
|
[Route("last-children")] |
|
|
|
public async virtual Task<OrganizationUnitDto> GetLastChildOrNullAsync(Guid? parentId) |
|
|
|
public virtual Task<OrganizationUnitDto> GetLastChildOrNullAsync(Guid? parentId) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return await OrganizationUnitAppService.GetLastChildOrNullAsync(parentId); |
|
|
|
return OrganizationUnitAppService.GetLastChildOrNullAsync(parentId); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
@ -98,9 +98,9 @@ namespace Sanhe.Abp.Identity |
|
|
|
/// <returns></returns> |
|
|
|
/// <returns></returns> |
|
|
|
[HttpGet] |
|
|
|
[HttpGet] |
|
|
|
[Route("all")] |
|
|
|
[Route("all")] |
|
|
|
public async virtual Task<ListResultDto<OrganizationUnitDto>> GetAllListAsync() |
|
|
|
public virtual Task<ListResultDto<OrganizationUnitDto>> GetAllListAsync() |
|
|
|
{ |
|
|
|
{ |
|
|
|
return await OrganizationUnitAppService.GetAllListAsync(); |
|
|
|
return OrganizationUnitAppService.GetAllListAsync(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
@ -109,9 +109,9 @@ namespace Sanhe.Abp.Identity |
|
|
|
/// <param name="input"></param> |
|
|
|
/// <param name="input"></param> |
|
|
|
/// <returns></returns> |
|
|
|
/// <returns></returns> |
|
|
|
[HttpGet] |
|
|
|
[HttpGet] |
|
|
|
public async virtual Task<PagedResultDto<OrganizationUnitDto>> GetListAsync(OrganizationUnitGetByPagedDto input) |
|
|
|
public virtual Task<PagedResultDto<OrganizationUnitDto>> GetListAsync(OrganizationUnitGetByPagedDto input) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return await OrganizationUnitAppService.GetListAsync(input); |
|
|
|
return OrganizationUnitAppService.GetListAsync(input); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
@ -121,9 +121,9 @@ namespace Sanhe.Abp.Identity |
|
|
|
/// <returns></returns> |
|
|
|
/// <returns></returns> |
|
|
|
[HttpGet] |
|
|
|
[HttpGet] |
|
|
|
[Route("{id}/role-names")] |
|
|
|
[Route("{id}/role-names")] |
|
|
|
public async virtual Task<ListResultDto<string>> GetRoleNamesAsync(Guid id) |
|
|
|
public virtual Task<ListResultDto<string>> GetRoleNamesAsync(Guid id) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return await OrganizationUnitAppService.GetRoleNamesAsync(id); |
|
|
|
return OrganizationUnitAppService.GetRoleNamesAsync(id); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
@ -134,9 +134,9 @@ namespace Sanhe.Abp.Identity |
|
|
|
/// <returns></returns> |
|
|
|
/// <returns></returns> |
|
|
|
[HttpGet] |
|
|
|
[HttpGet] |
|
|
|
[Route("{id}/unadded-roles")] |
|
|
|
[Route("{id}/unadded-roles")] |
|
|
|
public async virtual Task<PagedResultDto<IdentityRoleDto>> GetUnaddedRolesAsync(Guid id, OrganizationUnitGetUnaddedRoleByPagedDto input) |
|
|
|
public virtual Task<PagedResultDto<IdentityRoleDto>> GetUnaddedRolesAsync(Guid id, OrganizationUnitGetUnaddedRoleByPagedDto input) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return await OrganizationUnitAppService.GetUnaddedRolesAsync(id, input); |
|
|
|
return OrganizationUnitAppService.GetUnaddedRolesAsync(id, input); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
@ -147,9 +147,9 @@ namespace Sanhe.Abp.Identity |
|
|
|
/// <returns></returns> |
|
|
|
/// <returns></returns> |
|
|
|
[HttpGet] |
|
|
|
[HttpGet] |
|
|
|
[Route("{id}/roles")] |
|
|
|
[Route("{id}/roles")] |
|
|
|
public async virtual Task<PagedResultDto<IdentityRoleDto>> GetRolesAsync(Guid id, PagedAndSortedResultRequestDto input) |
|
|
|
public virtual Task<PagedResultDto<IdentityRoleDto>> GetRolesAsync(Guid id, PagedAndSortedResultRequestDto input) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return await OrganizationUnitAppService.GetRolesAsync(id, input); |
|
|
|
return OrganizationUnitAppService.GetRolesAsync(id, input); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
@ -160,9 +160,9 @@ namespace Sanhe.Abp.Identity |
|
|
|
/// <returns></returns> |
|
|
|
/// <returns></returns> |
|
|
|
[HttpGet] |
|
|
|
[HttpGet] |
|
|
|
[Route("{id}/unadded-users")] |
|
|
|
[Route("{id}/unadded-users")] |
|
|
|
public async virtual Task<PagedResultDto<IdentityUserDto>> GetUnaddedUsersAsync(Guid id, OrganizationUnitGetUnaddedUserByPagedDto input) |
|
|
|
public virtual Task<PagedResultDto<IdentityUserDto>> GetUnaddedUsersAsync(Guid id, OrganizationUnitGetUnaddedUserByPagedDto input) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return await OrganizationUnitAppService.GetUnaddedUsersAsync(id, input); |
|
|
|
return OrganizationUnitAppService.GetUnaddedUsersAsync(id, input); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
@ -173,9 +173,9 @@ namespace Sanhe.Abp.Identity |
|
|
|
/// <returns></returns> |
|
|
|
/// <returns></returns> |
|
|
|
[HttpGet] |
|
|
|
[HttpGet] |
|
|
|
[Route("{id}/users")] |
|
|
|
[Route("{id}/users")] |
|
|
|
public async virtual Task<PagedResultDto<IdentityUserDto>> GetUsersAsync(Guid id, GetIdentityUsersInput input) |
|
|
|
public virtual Task<PagedResultDto<IdentityUserDto>> GetUsersAsync(Guid id, GetIdentityUsersInput input) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return await OrganizationUnitAppService.GetUsersAsync(id, input); |
|
|
|
return OrganizationUnitAppService.GetUsersAsync(id, input); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
@ -186,9 +186,9 @@ namespace Sanhe.Abp.Identity |
|
|
|
/// <returns></returns> |
|
|
|
/// <returns></returns> |
|
|
|
[HttpPost] |
|
|
|
[HttpPost] |
|
|
|
[Route("{id}/users")] |
|
|
|
[Route("{id}/users")] |
|
|
|
public async virtual Task AddUsersAsync(Guid id, OrganizationUnitAddUserDto input) |
|
|
|
public virtual Task AddUsersAsync(Guid id, OrganizationUnitAddUserDto input) |
|
|
|
{ |
|
|
|
{ |
|
|
|
await OrganizationUnitAppService.AddUsersAsync(id, input); |
|
|
|
return OrganizationUnitAppService.AddUsersAsync(id, input); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
@ -199,9 +199,9 @@ namespace Sanhe.Abp.Identity |
|
|
|
/// <returns></returns> |
|
|
|
/// <returns></returns> |
|
|
|
[HttpPost] |
|
|
|
[HttpPost] |
|
|
|
[Route("{id}/roles")] |
|
|
|
[Route("{id}/roles")] |
|
|
|
public async virtual Task AddRolesAsync(Guid id, OrganizationUnitAddRoleDto input) |
|
|
|
public virtual Task AddRolesAsync(Guid id, OrganizationUnitAddRoleDto input) |
|
|
|
{ |
|
|
|
{ |
|
|
|
await OrganizationUnitAppService.AddRolesAsync(id, input); |
|
|
|
return OrganizationUnitAppService.AddRolesAsync(id, input); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
@ -212,9 +212,9 @@ namespace Sanhe.Abp.Identity |
|
|
|
/// <returns></returns> |
|
|
|
/// <returns></returns> |
|
|
|
[HttpPut] |
|
|
|
[HttpPut] |
|
|
|
[Route("{id}/move")] |
|
|
|
[Route("{id}/move")] |
|
|
|
public async virtual Task MoveAsync(Guid id, OrganizationUnitMoveDto input) |
|
|
|
public virtual Task MoveAsync(Guid id, OrganizationUnitMoveDto input) |
|
|
|
{ |
|
|
|
{ |
|
|
|
await OrganizationUnitAppService.MoveAsync(id, input); |
|
|
|
return OrganizationUnitAppService.MoveAsync(id, input); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
@ -225,9 +225,9 @@ namespace Sanhe.Abp.Identity |
|
|
|
/// <returns></returns> |
|
|
|
/// <returns></returns> |
|
|
|
[HttpPut] |
|
|
|
[HttpPut] |
|
|
|
[Route("{id}")] |
|
|
|
[Route("{id}")] |
|
|
|
public async virtual Task<OrganizationUnitDto> UpdateAsync(Guid id, OrganizationUnitUpdateDto input) |
|
|
|
public virtual Task<OrganizationUnitDto> UpdateAsync(Guid id, OrganizationUnitUpdateDto input) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return await OrganizationUnitAppService.UpdateAsync(id, input); |
|
|
|
return OrganizationUnitAppService.UpdateAsync(id, input); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|