Browse Source

fix 列表总数

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

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

@@ -230,6 +230,12 @@
         <if test="prefixName != null and prefixName != ''">
             AND q.prefix_name like concat('%', #{prefixName}, '%')
         </if>
+        <if test="key != null and key != ''">
+            AND (q.content like concat('%', #{key}, '%') or q.prefix_name like concat('%', #{key}, '%') or q.code = #{key})
+        </if>
+        <if test="pageSizeSelf != null and pageSizeSelf != ''">
+            LIMIT #{currIndex} , #{pageSizeSelf}
+        </if>
 
     </select>
 

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

@@ -173,6 +173,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="educationTypeId != null and educationTypeId != ''">
             AND ccb.education_type_id = #{educationTypeId}
         </if>
+        <if test="key != null and key != ''">
+            AND (c.name like concat('%', #{key}, '%') or c.prefix_name like concat('%', #{key}, '%') or c.code = #{key})
+        </if>
         <if test="subjectId != null and subjectId != ''">
             AND ccb.subject_id = #{subjectId}
         </if>

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

@@ -168,5 +168,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="prefixName != null and prefixName != ''">
             AND c.prefix_name like concat('%', #{prefixName}, '%')
         </if>
+        <if test="key != null and key != ''">
+            AND (c.module_name like concat('%', #{key}, '%') or c.prefix_name like concat('%', #{key}, '%') or c.code = #{key})
+        </if>
     </select>
 </mapper>

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

@@ -182,6 +182,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="prefixName != null and prefixName != ''">
             AND c.prefix_name like concat('%', #{prefixName}, '%')
         </if>
+        <if test="key != null and key != ''">
+            AND (c.name like concat('%', #{key}, '%') or c.prefix_name like concat('%', #{key}, '%') or c.code = #{key})
+        </if>
         <if test="status != null and status.size()!=0 ">
             AND c.status in
             <foreach collection="status" item="item" index="index" open="(" close=")" separator=",">