package com.qmth.jkserver.dao;

//import org.springframework.data.mongodb.repository.MongoRepository;
//import org.springframework.stereotype.Repository;
//import com.qmth.jkserver.model.ExamRoom;
//
//@Repository
//public interface ExamRoomDao extends MongoRepository<ExamRoom, String> {
//
//	public void deleteByExamCode(String examCode);
//
//}

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.qmth.jkserver.model.ExamRoom;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 考点考场表 Mapper 接口
 * </p>
 *
 * @author wangliang
 * @since 2023-03-01
 */
public interface ExamRoomDao extends BaseMapper<ExamRoom> {

    public void deleteByExamCode(@Param("examCode") String examCode);

    public List<Map> findPlaceCodeAndPlaceNameAndCount(@Param("examCode") String examCode);

    public List<Map> findRoomCodeAndRoomNameAndCount(@Param("examCode") String examCode);

    public IPage<ExamRoom> listPage(IPage<Map> iPage,
                                    @Param("examCode") String examCode,
                                    @Param("placeCode") String placeCode,
                                    @Param("roomCode") String roomCode,
                                    @Param("placeName") String placeName,
                                    @Param("kjAlready") Boolean kjAlready);

    public IPage<ExamRoom> listPageByKw(IPage<Map> iPage,
                                    @Param("examCode") String examCode,
                                    @Param("placeCode") String placeCode,
                                    @Param("placeName") String placeName,
                                    @Param("kwKcAlready") Boolean kwKcAlready,
                                    @Param("kwPaperAlready") Boolean kwPaperAlready,
                                    @Param("kwUncolilingAlready") Boolean kwUncolilingAlready);

    public long listPageCount(@Param("examCode") String examCode,
                                    @Param("placeCode") String placeCode,
                                    @Param("placeName") String placeName,
                                    @Param("kwKcAlready") Boolean kwKcAlready,
                                    @Param("kwPaperAlready") Boolean kwPaperAlready,
                                    @Param("kwUncolilingAlready") Boolean kwUncolilingAlready);
}