package com.yida.data.school.facility.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.yida.data.common.core.entity.school.EduDormitory;
import com.yida.data.school.dto.index.PageDormDTO;
import com.yida.data.school.vo.index.DormInfoVO;

import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 宿舍楼 Mapper
 *
 * @author wjm
 * @date 2021-09-14 17:42:11
 */
public interface EduDormitoryMapper extends BaseMapper<EduDormitory> {

    /**
     * 根据宿管查询宿舍楼
     *
     * @param masterId
     * @return
     */
    List<EduDormitory> listDormByMaster(Long masterId);

    /**
     * 分页查询宿舍楼
     *
     * @param page
     * @param dto
     * @return
     */
    IPage<DormInfoVO> listDormPage(Page page, @Param("dto") PageDormDTO dto);
}
