瀏覽代碼

fix 题库模块

he2802 4 年之前
父節點
當前提交
4ada428bda

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

@@ -117,4 +117,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.module_id )
+        FROM
+        course_module c
+        LEFT JOIN course_module_business cmb ON cmb.module_id = c.module_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 cmb.education_type_id = #{educationTypeId}
+        </if>
+        <if test="subjectId != null and subjectId != ''">
+            AND cmb.subject_id = #{subjectId}
+        </if>
+        <if test="businessId != null and businessId != ''">
+            AND cmb.business_id = #{businessId}
+        </if>
+        <if test="moduleName != null and moduleName != ''">
+            AND c.module_name like concat('%', #{moduleName}, '%')
+        </if>
+        <if test="prefixName != null and prefixName != ''">
+            AND c.prefix_name like concat('%', #{prefixName}, '%')
+        </if>
+    </select>
 </mapper>

+ 38 - 0
zhongzheng-system/src/main/resources/mapper/modules/course/CourseSectionMapper.xml

@@ -127,4 +127,42 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </if>
 
     </select>
+
+
+    <select id="selectSectionList_COUNT" resultType="Long">
+        SELECT
+        count( DISTINCT c.section_id )
+        FROM
+        course_section c
+        LEFT JOIN course_section_business csb ON c.section_id = csb.section_id
+        WHERE
+        1 = 1
+        <if test="name != null and name != ''">
+            AND c.name like concat('%', #{name}, '%')
+        </if>
+        <if test="publishStatus != null and publishStatus != ''">
+            AND c.publish_status = #{publishStatus}
+        </if>
+        <if test="educationTypeId != null and educationTypeId != ''">
+            AND csb.education_type_id = #{educationTypeId}
+        </if>
+        <if test="subjectId != null and subjectId != ''">
+            AND csb.subject_id = #{subjectId}
+        </if>
+        <if test="businessId != null and businessId != ''">
+            AND csb.business_id = #{businessId}
+        </if>
+        <if test="sectionType != null and sectionType != ''">
+            AND c.section_type = #{sectionType}
+        </if>
+        <if test="prefixName != null and prefixName != ''">
+            AND c.prefix_name like concat('%', #{prefixName}, '%')
+        </if>
+        <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>
+    </select>
 </mapper>