Bladeren bron

我的消息

change 3 jaren geleden
bovenliggende
commit
22078539ca

+ 3 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/inform/domain/InformCourse.java

@@ -42,6 +42,9 @@ private static final long serialVersionUID=1L;
     private Long moduleId;
     /** 章ID */
     private Long chapterId;
+
+    /** 章ID */
+    private Long goods_id;
     /** 题目位置 */
     private Long topicNum;
     /** $column.columnComment */

+ 4 - 7
zhongzheng-system/src/main/resources/mapper/modules/inform/InformCourseMapper.xml

@@ -31,14 +31,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <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
+        ic.*,
+        (SELECT g.goods_name FROM goods g where g.goods_id = ic.goods_id) as goods_name
+
         FROM
-        inform_exam ie
+        inform_course ic
         WHERE
         1=1
         <if test="informId != null and informId != ''">