|
|
@@ -21,19 +21,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="planId" column="plan_id"/>
|
|
|
</resultMap>
|
|
|
|
|
|
- <resultMap type="com.zhongzheng.modules.course.domain.Course" id="CourseResult">
|
|
|
+ <resultMap type="com.zhongzheng.modules.user.vo.CoursePlanVo" id="CourseResult">
|
|
|
<result property="courseId" column="course_id"/>
|
|
|
<result property="categoryId" column="category_id"/>
|
|
|
- <result property="price" column="price"/>
|
|
|
- <result property="duration" column="duration"/>
|
|
|
- <result property="startTime" column="start_time"/>
|
|
|
- <result property="endTime" column="end_time"/>
|
|
|
- <result property="coverUrl" column="cover_url"/>
|
|
|
- <result property="introduction" column="introduction"/>
|
|
|
- <result property="createTime" column="create_time"/>
|
|
|
- <result property="updateTime" column="update_time"/>
|
|
|
- <result property="status" column="status"/>
|
|
|
- <result property="teacherIds" column="teacher_ids"/>
|
|
|
<result property="courseName" column="course_name"/>
|
|
|
<result property="chapterNum" column="chapter_num"/>
|
|
|
<result property="sectionNum" column="section_num"/>
|
|
|
@@ -41,7 +31,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
- <select id="selectByCourse" parameterType="com.zhongzheng.modules.course.bo.CourseQueryBo" resultMap="CourseResult">
|
|
|
+ <resultMap type="com.zhongzheng.modules.exam.vo.ExamArrangementTimeVo" id="ExamArrangementTimeResult">
|
|
|
+ <result property="arrangementId" column="arrangement_id"/>
|
|
|
+ <result property="startTime" column="start_time"/>
|
|
|
+ <result property="endTime" column="end_time"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <select id="selectByCourse" parameterType="com.zhongzheng.modules.user.bo.UserPlanQueryBo" resultMap="CourseResult">
|
|
|
SELECT rs.course_name,
|
|
|
rs.course_id,rs.status,sum(section_num) as section_num,count(chapter_id)
|
|
|
as chapter_num,mc.category_name,mc.category_id,sum(total_time) as duration from
|
|
|
@@ -50,18 +46,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
LEFT JOIN course_section cs
|
|
|
on cc.chapter_id = cs.chapter_id
|
|
|
WHERE 1=1
|
|
|
- <if test="course_id != null and course_id !='' ">
|
|
|
- AND c.course_id in
|
|
|
- <foreach collection="status" item="item" index="index" open="(" close=")" separator=",">
|
|
|
- #{item}
|
|
|
- </foreach>
|
|
|
+ <if test="courseId != null and courseId !='' ">
|
|
|
+ AND c.course_id in (#{courseId})
|
|
|
</if>
|
|
|
GROUP BY cs.chapter_id,c.course_id)rs LEFT JOIN major_category mc on rs.category_id = mc.category_id
|
|
|
GROUP BY course_id
|
|
|
limit 1
|
|
|
</select>
|
|
|
|
|
|
- <select id="selectByExam" parameterType="Long" resultMap="CourseResult">
|
|
|
+ <select id="selectByExam" parameterType="Long" resultMap="ExamArrangementTimeResult">
|
|
|
SELECT
|
|
|
e.*
|
|
|
FROM
|