TenantController.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. using BaseService.Controllers;
  2. using BaseService.Systems.TenantManagement;
  3. using BaseService.Systems.TenantManagement.Dto;
  4. using BaseService.Systems.UserRoleMenusManagement.Dto;
  5. using Microsoft.AspNetCore.Mvc;
  6. using System;
  7. using System.Threading.Tasks;
  8. using Volo.Abp.Application.Dtos;
  9. namespace BaseService.HttpApi.Systems
  10. {
  11. [Area("base")]
  12. [Route("api/base/tenant")]
  13. public class TenantController : BaseServiceController, ITenantAppService
  14. {
  15. private readonly ITenantAppService _tenantAppService;
  16. public TenantController(ITenantAppService tenantAppService)
  17. {
  18. _tenantAppService = tenantAppService;
  19. }
  20. [HttpGet]
  21. [Route("menu/{id}")]
  22. public Task<ListResultDto<MenusListDto>> GetTenantMenusById(Guid id)
  23. {
  24. return _tenantAppService.GetTenantMenusById(id);
  25. }
  26. [HttpGet]
  27. [Route("menu-list")]
  28. public Task<ListResultDto<MenusListDto>> GetTenantMenusList()
  29. {
  30. return _tenantAppService.GetTenantMenusList();
  31. }
  32. [HttpPost]
  33. [Route("menu")]
  34. public Task UpdateTenantMenu(UpdateTenantMenuDto input)
  35. {
  36. return _tenantAppService.UpdateTenantMenu(input);
  37. }
  38. }
  39. }