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.EduDormitoryRoom;
import com.yida.data.school.dto.index.ListDormRoomDTO;
import com.yida.data.school.dto.index.PageDormRoomDTO;
import com.yida.data.school.vo.index.DormRoomInfoVO;
import java.util.List;
import org.apache.ibatis.annotations.Param;

/**
 * 宿舍楼-寝室房间 Mapper
 *
 * @author wjm
 * @date 2021-09-14 17:42:13
 */
public interface EduDormitoryRoomMapper extends BaseMapper<EduDormitoryRoom> {

    IPage<DormRoomInfoVO> listDormRoomPage(Page page, @Param("dto") PageDormRoomDTO dto);

    /**
     * 查询寝室列表
     *
     * @return
     */
    List<EduDormitoryRoom> listDormRoom(@Param("dto") ListDormRoomDTO dto);

    EduDormitoryRoom getDormRoom(@Param("id") Long id);

    /**
     * 查询存在的寝室
     */
    List<EduDormitoryRoom> listExistRoom(@Param("list") List<String> room, @Param("dormId") Long dormId);
}
