基础服务api
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

66 lines
2.0 KiB

  1. using BPA.SAAS.Manage.Application.System.Dtos;
  2. using BPA.SAAS.Manage.Application.System.Interface;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Text;
  7. using System.Threading.Tasks;
  8. namespace BPA.SAAS.Manage.Application.System
  9. {
  10. [ApiDescriptionSettings("SYS", Tag = "菜单信息")]
  11. public class MenuServices: IDynamicApiController
  12. {
  13. IMenuService _menuService;
  14. public MenuServices(IMenuService menuService)
  15. {
  16. _menuService = menuService;
  17. }
  18. [HttpPost("/api/menu/getmenutreepage")]
  19. public async Task<List<MenuTreeDtoOutput>> GetMenuTreePage(MenuTreeSearchDtoInput input)
  20. {
  21. return await _menuService.GetMenuTreePage(input);
  22. }
  23. /// <summary>
  24. /// 添加菜单
  25. /// </summary>
  26. /// <param name="input"></param>
  27. /// <returns></returns>
  28. [HttpPost("/api/menu/add")]
  29. public async Task<bool> Add(MenuDtoInput input)
  30. {
  31. return await _menuService.Add(input);
  32. }
  33. /// <summary>
  34. /// 编辑菜单
  35. /// </summary>
  36. /// <param name="input"></param>
  37. /// <returns></returns>
  38. [HttpPost("/api/menu/update")]
  39. public async Task<bool> Update(MenuDtoInput input)
  40. {
  41. return await _menuService.Update(input);
  42. }
  43. /// <summary>
  44. /// 删除菜单
  45. /// </summary>
  46. /// <param name="input"></param>
  47. /// <returns></returns>
  48. [HttpPost("/api/menu/delete")]
  49. public async Task<bool> Delete(List<string> input)
  50. {
  51. return await _menuService.Delete(input);
  52. }
  53. /// <summary>
  54. /// 查询菜单树
  55. /// </summary>
  56. /// <param name="GetType"></param>
  57. /// <returns></returns>
  58. [HttpGet("/api/menu/menutree")]
  59. public async Task<List<MenuTreeOutput>> MenuTree(string getType)
  60. {
  61. return await _menuService.MenuTree(getType);
  62. }
  63. }
  64. }