<?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="jnpf.cultivate.mapper.FtbCultivateCourseChapterMapper">
    <!--课程章节分页查询-->
    <select id="queryList" resultType="jnpf.model.cultivate.vo.course.web.FtbCultivateCourseChapterVO">
        SELECT F_Id       as id,
               F_Name     as name,
               F_Duration as duration,
               F_SortCode as sortCode
        FROM ftb_cultivate_course_chapter
        where F_EnabledMark = 0 and F_CourseId = #{courseId}
        order by F_SortCode
    </select>
    <!--查询课程总时长-->
    <select id="querySumDuration" resultType="java.lang.Long">
        SELECT SUM(F_Duration) FROM ftb_cultivate_course_chapter WHERE F_CourseId = #{id}  and F_EnabledMark=0
    </select>

</mapper>