Browse Source

fix 题库模块

he2802 4 năm trước cách đây
mục cha
commit
fdb4e3ba73

+ 0 - 3
zhongzheng-system/src/main/resources/mapper/modules/bank/QuestionMapper.xml

@@ -103,9 +103,6 @@
         FROM
         question q
         LEFT JOIN question_business qb ON q.question_id = qb.major_id and qb.type = 1
-        LEFT JOIN course_education_type cet ON qb.education_type_id = cet.id
-        LEFT JOIN course_business cb ON qb.business_id = cb.id
-        LEFT JOIN course_subject cs ON cs.id = qb.subject_id
         WHERE
         1 = 1
         <if test="status != null and status.size()!=0 ">

+ 35 - 0
zhongzheng-system/src/main/resources/mapper/modules/course/CourseChapterMapper.xml

@@ -122,4 +122,39 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             AND c.prefix_name like concat('%', #{prefixName}, '%')
         </if>
    </select>
+
+
+    <select id="selectList_COUNT" resultType="Long">
+        SELECT
+        count( DISTINCT c.chapter_id )
+        FROM
+        course_chapter  c
+        LEFT JOIN course_chapter_business ccb ON c.chapter_id = ccb.chapter_id
+        WHERE
+        1 = 1
+        <if test="status != null and status.size()!=0 ">
+            AND c.status in
+            <foreach collection="status" item="item" index="index" open="(" close=")" separator=",">
+                #{item}
+            </foreach>
+        </if>
+        <if test="publishStatus != null and publishStatus != ''">
+            AND c.publish_status = #{publishStatus}
+        </if>
+        <if test="educationTypeId != null and educationTypeId != ''">
+            AND ccb.education_type_id = #{educationTypeId}
+        </if>
+        <if test="subjectId != null and subjectId != ''">
+            AND ccb.subject_id = #{subjectId}
+        </if>
+        <if test="businessId != null and businessId != ''">
+            AND ccb.business_id = #{businessId}
+        </if>
+        <if test="name != null and name != ''">
+            AND c.name like concat('%', #{name}, '%')
+        </if>
+        <if test="prefixName != null and prefixName != ''">
+            AND c.prefix_name like concat('%', #{prefixName}, '%')
+        </if>
+    </select>
 </mapper>