<?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.ruoyi.course.mapper.ScClaTimeAttendMapper">

   <select id="selectTeacherSumGetHour" resultType="java.math.BigDecimal">
        select
            ifnull(sum(b.teacher_get_hour),0)
            from sc_cla_time_attend b
        where  b.teacher_id=#{teacherId}
          and b.charge_type <![CDATA[ <> ]]> 'date'
        and exists(
            select 1
            from sc_cla_time c
            where b.course_time_id=c.course_time_id
              and c.real_cla_date between #{beginDate} and #{endDate} )

    </select>
</mapper>
