|
@@ -15,5 +15,34 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="chapterId" column="chapter_id"/>
|
|
|
</resultMap>
|
|
|
|
|
|
+ <resultMap type="com.zhongzheng.modules.inform.vo.InformCourseVo" id="InformCourseVo">
|
|
|
+ <result property="id" column="id"/>
|
|
|
+ <result property="informId" column="inform_id"/>
|
|
|
+ <result property="courseId" column="course_id"/>
|
|
|
+ <result property="sectionId" column="section_id"/>
|
|
|
+ <result property="moduleId" column="module_id"/>
|
|
|
+ <result property="chapterId" column="chapter_id"/>
|
|
|
+ <result property="goodsName" column="goods_name"/>
|
|
|
+ <result property="subjectName" column="subject_name"/>
|
|
|
+ <result property="chapterName" column="chapter_name"/>
|
|
|
+ <result property="moduleName" column="module_name"/>
|
|
|
+ <result property="sectionName" column="section_name"/>
|
|
|
+ </resultMap>
|
|
|
|
|
|
+ <select id="queryCourse" parameterType="long" resultMap="InformCourseVo">
|
|
|
+ SELECT
|
|
|
+ ie.*,
|
|
|
+ (SELECT g.goods_name FROM goods g where g.goods_id = ie.goods_id) as goods_name,
|
|
|
+ (SELECT cs.subject_name FROM course c LEFT JOIN course_subject cs on c.subject_id=cs.id where c.course_id = ie.course_id) as subject_name,
|
|
|
+ (SELECT qc.`name` FROM question_chapter qc where qc.chapter_exam_id = ie.chapter_id) as chapter_name,
|
|
|
+ (SELECT qm.module_name FROM question_module qm where qm.module_exam_id = ie.module_id) as module_name,
|
|
|
+ (SELECT e.exam_name FROM exam e where e.exam_id = ie.exam_id) as exam_name
|
|
|
+ FROM
|
|
|
+ inform_exam ie
|
|
|
+ WHERE
|
|
|
+ 1=1
|
|
|
+ <if test="informId != null and informId != ''">
|
|
|
+ ie.inform_id = #{informId}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
</mapper>
|