package com.qmth.teachcloud.common.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qmth.teachcloud.common.entity.SysRole;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 角色表 Mapper 接口
 * </p>
 *
 * @author xf
 * @since 2021-03-23
 */
public interface SysRoleMapper extends BaseMapper<SysRole> {

    List<SysRole> listRolesByUserId(Long id);

    IPage<SysRole> listPage(Page<SysRole> page, @Param("schoolId") Long schoolId, @Param("name") String name, @Param("enable") Boolean enable);

    List<SysRole> listRolesBySchoolId(@Param("schoolId") Long schoolId);
}
