| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.ruoyi.common.constant.UserConstants; |
| | | import com.ruoyi.common.core.domain.entity.SysMenu; |
| | | import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus; |
| | | import com.ruoyi.common.core.mapper.BaseMapperPlus; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | |
| | | * |
| | | * @author Lion Li |
| | | */ |
| | | public interface SysMenuMapper extends BaseMapperPlus<SysMenu> { |
| | | public interface SysMenuMapper extends BaseMapperPlus<SysMenuMapper, SysMenu, SysMenu> { |
| | | |
| | | /** |
| | | * 根据用户所有权限 |
| | |
| | | * |
| | | * @return 菜单列表 |
| | | */ |
| | | List<SysMenu> selectMenuTreeAll(); |
| | | default List<SysMenu> selectMenuTreeAll() { |
| | | LambdaQueryWrapper<SysMenu> lqw = new LambdaQueryWrapper<SysMenu>() |
| | | .in(SysMenu::getMenuType, UserConstants.TYPE_DIR, UserConstants.TYPE_MENU) |
| | | .eq(SysMenu::getStatus, UserConstants.MENU_NORMAL) |
| | | .orderByAsc(SysMenu::getParentId) |
| | | .orderByAsc(SysMenu::getOrderNum); |
| | | return this.selectList(lqw); |
| | | } |
| | | |
| | | /** |
| | | * 根据用户ID查询菜单 |
| | |
| | | * @param menuCheckStrictly 菜单树选择项是否关联显示 |
| | | * @return 选中菜单列表 |
| | | */ |
| | | List<Integer> selectMenuListByRoleId(@Param("roleId") Long roleId, @Param("menuCheckStrictly") boolean menuCheckStrictly); |
| | | List<Long> selectMenuListByRoleId(@Param("roleId") Long roleId, @Param("menuCheckStrictly") boolean menuCheckStrictly); |
| | | |
| | | } |