package com.kiisoo.ic.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.kiisoo.ic.system.bean.LoginPermissionBean;
import com.kiisoo.ic.system.entity.PrivilageRolePermissionDO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 角色权限关系  Mapper 接口
 * @author jinchaofan
 * @since 2020-02-19
 */
@Repository
public interface PrivilageRolePermissionDOMapper extends BaseMapper<PrivilageRolePermissionDO> {


    /**
     * 查询用户登录权限
     * @param userId 用户id
     * @param level 等级
     * @return 用户登录权限
     */
    List<LoginPermissionBean> selectLoginPermission(@Param("userId") Long userId, @Param("level") int level);

}
