package org.nl.system.service.role.dao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.nl.system.service.role.dao.SysRole;

import java.util.Collection;
import java.util.List;

/**
 * <p>
 * 角色表 Mapper 接口
 * </p>
 *
 * @author generator
 * @since 2022-12-15
 */
public interface SysRoleMapper extends BaseMapper<SysRole> {

    void saveRoleRelation(@Param("user") String UserId, @Param("roles") Collection<String> roles);
    void delRoleRelation(@Param("user") String UserId);

    void deleteRoleMenuBatchRoleIds(Collection<String> ids);

    List<String> selectMenuIdsByRoles(String roleId);

    /**
     * 插入角色/菜单表
     * @param roleId
     * @param menuIds
     */
    void insertRoleMenu(String roleId, Collection<String> menuIds);
}
