MenuMapper.java 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /**
  2. * Copyright (c) 2018-2028, Chill Zhuang 庄骞 (smallchill@163.com).
  3. * <p>
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. * <p>
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. * <p>
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. package org.springblade.modules.system.mapper;
  17. import com.baomidou.mybatisplus.core.mapper.BaseMapper;
  18. import com.baomidou.mybatisplus.core.metadata.IPage;
  19. import org.springblade.modules.system.dto.MenuDTO;
  20. import org.springblade.modules.system.entity.Menu;
  21. import org.springblade.modules.system.vo.MenuVO;
  22. import java.util.List;
  23. /**
  24. * Mapper 接口
  25. *
  26. * @author Chill
  27. * @since 2018-12-24
  28. */
  29. public interface MenuMapper extends BaseMapper<Menu> {
  30. /**
  31. * 自定义分页
  32. *
  33. * @param page
  34. * @param menu
  35. * @return
  36. */
  37. List<MenuVO> selectMenuPage(IPage page, MenuVO menu);
  38. /**
  39. * 树形结构
  40. *
  41. * @return
  42. */
  43. List<MenuVO> tree();
  44. /**
  45. * 授权树形结构
  46. *
  47. * @return
  48. */
  49. List<MenuVO> grantTree();
  50. /**
  51. * 所有菜单
  52. *
  53. * @return
  54. */
  55. List<Menu> allMenu();
  56. /**
  57. * 权限配置菜单
  58. *
  59. * @param roleId
  60. * @return
  61. */
  62. List<Menu> roleMenu(List<Integer> roleId);
  63. /**
  64. * 菜单树形结构
  65. *
  66. * @param roleId
  67. * @return
  68. */
  69. List<Menu> routes(List<Integer> roleId);
  70. /**
  71. * 按钮树形结构
  72. *
  73. * @param roleId
  74. * @return
  75. */
  76. List<Menu> buttons(List<Integer> roleId);
  77. /**
  78. * 获取配置的角色权限
  79. * @param roleIds
  80. * @return
  81. */
  82. List<MenuDTO> authRoutes(List<Integer> roleIds);
  83. }