SysMenuDao.java 1.3 KB
package io.hmit.modules.sys.dao;

import io.hmit.common.dao.BaseDao;
import io.hmit.modules.sys.entity.SysMenuEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 菜单管理
 *
 * @author zsh 408538940@qq.com
 */
@Mapper
public interface SysMenuDao extends BaseDao<SysMenuEntity> {

    SysMenuEntity getById(@Param("id") Long id, @Param("language") String language);

    /**
     * 查询所有菜单列表
     *
     * @param type     菜单类型
     * @param language 语言
     */
    List<SysMenuEntity> getMenuList(@Param("type") Integer type, @Param("language") String language);

    /**
     * 查询用户菜单列表
     *
     * @param userId   用户ID
     * @param type     菜单类型
     * @param language 语言
     */
    List<SysMenuEntity> getUserMenuList(@Param("userId") Long userId, @Param("type") Integer type, @Param("language") String language);

    /**
     * 查询用户权限列表
     *
     * @param userId 用户ID
     */
    List<String> getUserPermissionsList(Long userId);

    /**
     * 查询所有权限列表
     */
    List<String> getPermissionsList();

    /**
     * 根据父菜单,查询子菜单
     *
     * @param pid 父菜单ID
     */
    List<SysMenuEntity> getListPid(Long pid);

}