|
@@ -25,17 +25,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="publishStatus" column="publish_status"/>
|
|
|
</resultMap>
|
|
|
|
|
|
+
|
|
|
<select id="getListById" parameterType="Long" resultMap="CourseChapterSectionResultVo">
|
|
|
SELECT
|
|
|
cs.*,
|
|
|
ccs.sort as c_sort,
|
|
|
ccs.id,
|
|
|
ccs.chapter_id
|
|
|
+ FROM
|
|
|
+ course_chapter_section ccs
|
|
|
+ LEFT JOIN course_section cs ON ccs.section_id = cs.section_id
|
|
|
+ cs.`status` !=- 1
|
|
|
+ AND ccs.chapter_id = =#{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="getListTotalTime" parameterType="Long" resultType="java.lang.Long">
|
|
|
+ SELECT
|
|
|
+ IFNULL(sum( cs.duration_time ),0) AS duration_time
|
|
|
FROM
|
|
|
course_chapter_section ccs
|
|
|
LEFT JOIN course_section cs ON ccs.section_id = cs.section_id
|
|
|
WHERE
|
|
|
- ccs.chapter_id =#{id}
|
|
|
+ cs.`status` !=- 1
|
|
|
+ AND ccs.chapter_id =#{id}
|
|
|
</select>
|
|
|
|
|
|
|