SysRoleAppService.cs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. using YBEE.EQM.Core;
  2. namespace YBEE.EQM.Application
  3. {
  4. /// <summary>
  5. /// 角色
  6. /// </summary>
  7. [ApiDescriptionSettings(Name = "sys-role")]
  8. [Route("sys/role")]
  9. [AppAuthorize]
  10. public class SysRoleAppService : IDynamicApiController
  11. {
  12. private readonly ISysRoleService _roleService;
  13. public SysRoleAppService(ISysRoleService roleService)
  14. {
  15. _roleService = roleService;
  16. }
  17. /// <summary>
  18. /// 添加角色
  19. /// </summary>
  20. /// <param name="input"></param>
  21. /// <returns></returns>
  22. public async Task Add(AddSysRoleInput input)
  23. {
  24. await _roleService.Add(input);
  25. }
  26. /// <summary>
  27. /// 删除角色
  28. /// </summary>
  29. /// <param name="input"></param>
  30. /// <returns></returns>
  31. [UnitOfWork]
  32. public async Task Del(DeleteSysRoleInput input)
  33. {
  34. await _roleService.Del(input);
  35. }
  36. /// <summary>
  37. /// 更新角色
  38. /// </summary>
  39. /// <param name="input"></param>
  40. /// <returns></returns>
  41. public async Task Update(UpdateSysRoleInput input)
  42. {
  43. await _roleService.Update(input);
  44. }
  45. /// <summary>
  46. /// 获取所有角色
  47. /// </summary>
  48. /// <returns></returns>
  49. [DisableOpLog]
  50. public async Task<List<SysRoleOutput>> GetAllList()
  51. {
  52. return await _roleService.GetAllList();
  53. }
  54. }
  55. }