he2802 преди 1 година
родител
ревизия
89a17c2c17
променени са 1 файла, в които са добавени 10 реда и са изтрити 4 реда
  1. 10 4
      zhongzheng-system/src/main/resources/mapper/modules/grade/ClassGradeMapper.xml

+ 10 - 4
zhongzheng-system/src/main/resources/mapper/modules/grade/ClassGradeMapper.xml

@@ -1368,8 +1368,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="atFull != null and atFull !='' ">
             AND (SELECT COUNT(a.id) FROM class_grade_user a where a.grade_id = g.grade_id and a.status =1) &lt; g.student_upper
         </if>
-        <if test="classStartTime != null and classStartTime != ''  and classEndTime != null and classEndTime != ''">
-            AND (#{classStartTime} BETWEEN g.class_start_time and g.class_end_time or #{classEndTime} BETWEEN g.class_start_time and g.class_end_time)
+        <if test="classStartTime != null and classStartTime != ''  ">
+            AND g.class_start_time >=#{classStartTime}
+        </if>
+        <if test="classEndTime != null and classEndTime != ''  ">
+            AND #{classEndTime} >= g.class_end_time
         </if>
         <if test="pastDue != null or pastDue != null ">
             AND ((unix_timestamp(now())+10*24*3600) &lt; g.class_end_time or g.class_start_time is null)
@@ -1458,8 +1461,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="atFull != null and atFull !='' ">
             AND (SELECT COUNT(a.id) FROM class_grade_user a where a.grade_id = g.grade_id and a.status =1) &lt; g.student_upper
         </if>
-        <if test="classStartTime != null and classStartTime != ''  and classEndTime != null and classEndTime != ''">
-            AND (#{classStartTime} BETWEEN g.class_start_time and g.class_end_time or #{classEndTime} BETWEEN g.class_start_time and g.class_end_time)
+        <if test="classStartTime != null and classStartTime != ''  ">
+            AND g.class_start_time >=#{classStartTime}
+        </if>
+        <if test="classEndTime != null and classEndTime != ''  ">
+            AND #{classEndTime} >= g.class_end_time
         </if>
         <if test="pastDue != null or pastDue != null ">
             AND ((unix_timestamp(now())+10*24*3600) &lt; g.class_end_time or g.class_start_time is null)