基础服务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.
 
 

92 lines
2.9 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.Drawing.Drawing2D;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. namespace BPA.SAAS.Manage.Application.System
  10. {
  11. [ApiDescriptionSettings("SYS", Tag = "菜单信息")]
  12. public class MenuServices: IDynamicApiController
  13. {
  14. IMenuService _menuService;
  15. public MenuServices(IMenuService menuService)
  16. {
  17. _menuService = menuService;
  18. }
  19. [HttpPost("/api/menu/getmenutreepage")]
  20. public async Task<List<MenuTreeDtoOutput>> GetMenuTreePage(MenuTreeSearchDtoInput input)
  21. {
  22. return await _menuService.GetMenuTreePage(input);
  23. }
  24. /// <summary>
  25. /// 添加菜单
  26. /// </summary>
  27. /// <param name="input"></param>
  28. /// <returns></returns>
  29. [HttpPost("/api/menu/add")]
  30. public async Task<bool> Add(MenuDtoInput input)
  31. {
  32. return await _menuService.Add(input);
  33. }
  34. /// <summary>
  35. /// 编辑菜单
  36. /// </summary>
  37. /// <param name="input"></param>
  38. /// <returns></returns>
  39. [HttpPost("/api/menu/update")]
  40. public async Task<bool> Update(MenuDtoInput input)
  41. {
  42. return await _menuService.Update(input);
  43. }
  44. /// <summary>
  45. /// 删除菜单
  46. /// </summary>
  47. /// <param name="input"></param>
  48. /// <returns></returns>
  49. [HttpPost("/api/menu/delete")]
  50. public async Task<bool> Delete(List<string> input)
  51. {
  52. return await _menuService.Delete(input);
  53. }
  54. /// <summary>
  55. /// 查询菜单树
  56. /// </summary>
  57. /// <param name="getType"></param>
  58. /// <returns></returns>
  59. [HttpGet("/api/menu/menutrees")]
  60. public async Task<List<MenuTreeOutput>> MenuTree(string GetType)
  61. {
  62. return await _menuService.MenuTree(GetType);
  63. }
  64. [HttpGet("/api/menu/menutreesall")]
  65. public async Task<List<MenuTreeOutput>> MenuTree()
  66. {
  67. return await _menuService.MenuTree();
  68. }
  69. [HttpGet("/api/menu/menuparmytrees")]
  70. public async Task<List<MenuTreeOutput>> MenuParmyTree(string GetType, string type)
  71. {
  72. return await _menuService.MenuParmyTree(GetType, type);
  73. }
  74. [HttpGet("/api/menu/menutree")]
  75. public async Task<List<MenuRouteDtoOutput>> DymicMenuTree(int type)
  76. {
  77. return await _menuService.DymicMenuTree(type);
  78. }
  79. [HttpGet("/api/menu/enable")]
  80. public async Task<bool> Enable(string Id)
  81. {
  82. return await _menuService.Enable(Id);
  83. }
  84. [HttpGet("/api/menu/disable")]
  85. public async Task<bool> Disable(string Id)
  86. {
  87. return await _menuService.Disable(Id);
  88. }
  89. }
  90. }