package com.chushang.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.chushang.system.entity.dto.ListRoleDTO;
import com.chushang.system.entity.po.SysRole;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 * <p>
 * 角色用于控制菜单 及 用户的显示 Mapper 接口
 * </p>
 *
 * @author author
 * @since 2022-08-18
 */
public interface SysRoleMapper extends BaseMapper<SysRole> {

    List<SysRole> selectRoleList(SysRole sysRole);

    List<SysRole> listRole(@Param("listRole") ListRoleDTO listRole,
                           Page<SysRole> page);

    SysRole selectRoleById(Long roleId);

    Set<SysRole> selectRoleByUsername(String username);
}
