he2802 1 年之前
父節點
當前提交
f164173855
共有 1 個文件被更改,包括 7 次插入1 次删除
  1. 7 1
      zhongzheng-system/src/main/resources/mapper/modules/grade/ClassGradeMapper.xml

+ 7 - 1
zhongzheng-system/src/main/resources/mapper/modules/grade/ClassGradeMapper.xml

@@ -647,7 +647,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             AND (SELECT COUNT(cgde.grade_id) FROM class_grade cgde where cgde.grade_id = cg.grade_id and (unix_timestamp(now()) < cgde.class_end_time or cgde.class_start_time is null)) =0
         </if>
         <if test="studyCountMore != null and studyCountMore == 2 ">
-            AND og.study_count > 0 AND cgu.change_grade = 0
+            AND og.study_count > 0 AND cgu.change_grade = 0 AND (cg.status = 0 or unix_timestamp(now()) > cg.class_end_time)
         </if>
         <if test="studyCountMore != null and studyCountMore == 1 ">
             AND og.study_count > 0 AND cgu.change_grade = 1
@@ -661,6 +661,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="officialStatus != null and officialStatus == 0 ">
             AND (cgu.official_status is NULL or cgu.official_status=0)
         </if>
+        <if test="periodPlush != null and periodPlush == 1 ">
+            AND cgu.period_plush = 1
+        </if>
+        <if test="periodPlush != null and periodPlush == 0 ">
+            AND (cgu.period_plush is NULL or cgu.period_plush=0)
+        </if>
         <if test="searchKey != null and searchKey != ''">
             AND (cg.class_name like concat('%', #{searchKey}, '%') or u.realname like concat('%', #{searchKey}, '%') or u.company_name like concat('%', #{searchKey}, '%'))
         </if>