<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.qmth.jkserver.dao.JkRoomMonitorClientDataDao">

    <select id="findByExamCodeByPage" resultType="com.qmth.jkserver.dto.RoomMonitorClientData">
        select * from jk_room_monitor_client_data t
        <where>
            <if test="examCode != null and examCode != ''">
                and t.exam_code = #{examCode}
            </if>
            <if test="placeCode != null and placeCode != ''">
                and t.place_code = #{placeCode}
            </if>
            <if test="roomCode != null and roomCode != ''">
                and t.room_code = #{roomCode}
            </if>
            <if test="placeName != null and placeName != ''">
                and t.place_name like concat('%', #{placeName}, '%')
            </if>
            <if test="upload != null and upload != '' or upload == 0">
                and t.upload = #{upload}
            </if>
        </where>
        order by t.place_code,t.room_code,t.time desc
    </select>

</mapper>
