package com.codvision.auth.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.codvision.auth.entity.SysMenu;
import com.codvision.auth.entity.dto.SysMenuQueryDTO;
import com.codvision.auth.entity.vo.SysMenuVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 系统菜单 Mapper 接口
 * </p>
 *
 * @author lingee
 * @since 2023-11-09
 */
public interface SysMenuMapper extends BaseMapper<SysMenu> {

    /**
     * 查询角色对应的菜单权限
     *
     * @param roleId 角色id
     * @return 菜单权限
     */
    List<SysMenuVO> getMenuList(@Param("roleId") Integer roleId);

    /**
     * 获取用户菜单权限
     * @param queryDTO
     * @return
     */
    List<SysMenuVO> getUserMenuList(@Param("queryDTO") SysMenuQueryDTO queryDTO);
}
