<?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.yida.data.school.classCall.mapper.EduClassCallMapper">
  <select id="listClassCallPage"
    resultType="com.yida.data.common.core.entity.classCall.EduClassCall">
    SELECT *
    FROM edu_class_call
    WHERE school_id = #{dto.schoolId}
    <if test="dto.classId!=null">
      and class_id = #{dto.classId}
    </if>
    <if test="dto.staffId!=null">
      and teacher_id = #{dto.staffId}
    </if>
    <if test="dto.date!=null">
      and DATE_FORMAT(create_date,'%Y-%m-%d') = #{dto.date}
    </if>
    order by create_date desc
  </select>
</mapper>
