IMenuService.java 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. /*
  2. * Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
  3. *
  4. * Redistribution and use in source and binary forms, with or without
  5. * modification, are permitted provided that the following conditions are met:
  6. *
  7. * Redistributions of source code must retain the above copyright notice,
  8. * this list of conditions and the following disclaimer.
  9. * Redistributions in binary form must reproduce the above copyright
  10. * notice, this list of conditions and the following disclaimer in the
  11. * documentation and/or other materials provided with the distribution.
  12. * Neither the name of the dreamlu.net developer nor the names of its
  13. * contributors may be used to endorse or promote products derived from
  14. * this software without specific prior written permission.
  15. * Author: Chill 庄骞 (smallchill@163.com)
  16. */
  17. package org.springblade.modules.system.service;
  18. import com.baomidou.mybatisplus.core.metadata.IPage;
  19. import com.baomidou.mybatisplus.extension.service.IService;
  20. import org.springblade.modules.system.dto.MenuDTO;
  21. import org.springblade.modules.system.entity.Menu;
  22. import org.springblade.modules.system.vo.MenuVO;
  23. import java.util.List;
  24. /**
  25. * 服务类
  26. *
  27. * @author Chill
  28. * @since 2018-12-24
  29. */
  30. public interface IMenuService extends IService<Menu> {
  31. /**
  32. * 自定义分页
  33. *
  34. * @param page
  35. * @param menu
  36. * @return
  37. */
  38. IPage<MenuVO> selectMenuPage(IPage<MenuVO> page, MenuVO menu);
  39. /**
  40. * 菜单树形结构
  41. *
  42. * @param roleId
  43. * @return
  44. */
  45. List<MenuVO> routes(String roleId);
  46. /**
  47. * 按钮树形结构
  48. *
  49. * @param roleId
  50. * @return
  51. */
  52. List<MenuVO> buttons(String roleId);
  53. /**
  54. * 树形结构
  55. *
  56. * @return
  57. */
  58. List<MenuVO> tree();
  59. /**
  60. * 授权树形结构
  61. *
  62. * @return
  63. */
  64. List<MenuVO> grantTree();
  65. /**
  66. * 默认选中节点
  67. *
  68. * @param roleIds
  69. * @return
  70. */
  71. List<String> roleTreeKeys(String roleIds);
  72. /**
  73. * 获取配置的角色权限
  74. * @param roleIds
  75. * @return
  76. */
  77. List<MenuDTO> authRoutes(List<Integer> roleIds);
  78. }