<?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.FtbCultivatePositionCourceChapterLearningMapper">
  <!--课程大纲-->
  <select id="listChapterByCourseId" resultType="jnpf.model.cultivate.vo.course.app.ChapterInformationVO">
    SELECT a.F_Name as chapterName,b.F_chapterId as chapterId,a.F_SortCode as sortCode,b.F_state as state,b.F_ChapterTime as chapterTime
    FROM ftb_cultivate_course_chapter a LEFT JOIN ftb_cultivate_position_cource_chapter_learning b ON a.F_Id=b.F_chapterId
    WHERE b.F_UserId = #{userId} AND b.F_CourceId = #{courseId} AND b.F_EnabledMark = 0 AND a.F_EnabledMark = 0
    ORDER BY F_SortCode ASC
   </select>
  <!--课程列表-->
  <select id="getCourseInformationList" resultType="jnpf.model.cultivate.vo.position.FtbCultivateCourseListVO">
    SELECT a.F_CourceId as courseId,b.F_Name as courseName,b.F_Label as label
    FROM ftb_cultivate_position_cource_learning a JOIN ftb_cultivate_course b ON a.F_CourceId=b.F_Id
    WHERE a.F_UserId = #{userId} and a.F_EnabledMark=0 AND b.F_EnabledMark=0
  </select>

</mapper>