平安校园
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.
 
 
 
 
 
 

76 lines
1.9 KiB

  1. //
  2. namespace SafeCampus.System;
  3. /// <summary>
  4. /// 菜单服务
  5. /// </summary>
  6. public interface IMenuService : ITransient
  7. {
  8. /// <summary>
  9. /// 添加菜单
  10. /// </summary>
  11. /// <param name="input">添加参数</param>
  12. /// <returns></returns>
  13. Task Add(MenuAddInput input);
  14. /// <summary>
  15. /// 详情
  16. /// </summary>
  17. /// <param name="input">id</param>
  18. /// <returns>详细信息</returns>
  19. Task<SysResource> Detail(BaseIdInput input);
  20. /// <summary>
  21. /// 构建菜单树形结构
  22. /// </summary>
  23. /// <param name="resourceList">菜单列表</param>
  24. /// <param name="parentId">父ID</param>
  25. /// <returns>菜单形结构</returns>
  26. List<SysResource> ConstructMenuTrees(List<SysResource> resourceList, long? parentId = 0);
  27. /// <summary>
  28. /// 获取菜单树
  29. /// </summary>
  30. /// <param name="input">菜单树查询参数</param>
  31. /// <param name="showDisabled">是否显示禁用的</param>
  32. /// <returns>菜单树列表</returns>
  33. Task<List<SysResource>> Tree(MenuTreeInput input, bool showDisabled = true);
  34. /// <summary>
  35. /// 编辑菜单
  36. /// </summary>
  37. /// <param name="input">菜单编辑参数</param>
  38. /// <returns></returns>
  39. Task Edit(MenuEditInput input);
  40. /// <summary>
  41. /// 删除菜单
  42. /// </summary>
  43. /// <param name="input">删除菜单参数</param>
  44. /// <returns></returns>
  45. Task Delete(BaseIdListInput input);
  46. /// <summary>
  47. /// 改变菜单模块
  48. /// </summary>
  49. /// <param name="input">改变菜单模块参数</param>
  50. /// <returns></returns>
  51. Task ChangeModule(MenuChangeModuleInput input);
  52. /// <summary>
  53. /// 快捷方式菜单树
  54. /// </summary>
  55. /// <param name="sysResources">资源列表</param>
  56. /// <returns></returns>
  57. Task<List<SysResource>> ShortcutTree(List<SysResource> sysResources = null);
  58. }