<?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="cn.iocoder.yudao.module.exam.mapper.ExamBatchMapper">

    <select id="queryListPage" resultType="cn.iocoder.yudao.module.exam.vo.ExamBatchVO">
        SELECT
            dseb.*
        FROM
            drive_school_exam_batch dseb
        WHERE dseb.deleted=0
        <if test="entity.coachId != null and entity.coachId != ''">
            and dseb.coach_id =#{entity.coachId}
        </if>
        <if test="entity.courseId != null and entity.courseId != ''">
            and dseb.course_id =#{entity.courseId}
        </if>
        <if test="entity.subject != null and entity.subject != ''">
            and dseb.subject =#{entity.subject}
        </if>
        <if test="entity.startTimeSearch!=null and entity.startTimeSearch!=''">
            AND dseb.start_time &gt;= #{entity.startTimeSearch}
        </if>
        <if test="entity.endTimeSearch!=null and entity.endTimeSearch!=''">
            AND dseb.start_time &lt;= #{entity.endTimeSearch}
        </if>
        ORDER BY dseb.create_time DESC
    </select>
</mapper>
