package com.skr.mdm.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.skr.mdm.bean.bo.RolePermissionBO;
import com.skr.mdm.entity.AuRolePermissionDO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 角色对应权限表(AuRolePermission)表数据库访问层
 *
 * @author nfq
 * @since 2020-09-08 14:33:21
 */
@Repository
public interface AuRolePermissionDao extends BaseMapper<AuRolePermissionDO> {

    /**
     * 批量插入
     * @param roleId
     * @param list
     */
    void insertBatch(@Param("roleId") Integer roleId, @Param("list") List<Integer> list);

    /**
     * 角色权限
     * @param roleId
     * @param functionScopeId
     * @return
     */
    List<RolePermissionBO> listPermissionByRoleId(@Param("roleId") Integer roleId, @Param("functionScopeId") Integer functionScopeId);

}