Pārlūkot izejas kodu

1、自动补签到定时任务调整

Joburgess 5 gadi atpakaļ
vecāks
revīzija
0ebbe6249a

+ 2 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleServiceImpl.java

@@ -2044,4 +2044,6 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 		}
 		return courseSchedules;
 	}
+
+
 }

+ 2 - 2
mec-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml

@@ -568,7 +568,7 @@
             (cs.del_flag_ != 1 OR cs.del_flag_ IS NULL)
             AND cs.class_date_ = DATE_FORMAT(#{classDate},'%Y%m%d')
             AND csts.user_id_ = #{teacherId} AND cg.del_flag_ = 0
-            AND CONCAT( cs.class_date_, ' ', cs.start_class_time_ )&lt;NOW()
+            AND CONCAT( cs.class_date_, ' ', cs.end_class_time_ )&lt;NOW()
         ORDER BY start_class_time_
     </select>
 
@@ -1655,7 +1655,7 @@
         LEFT JOIN course_schedule cs ON cssp.course_schedule_id_ = cs.id_
         LEFT JOIN class_group cg ON cg.id_=cs.class_group_id_
         LEFT JOIN student_attendance sa ON sa.course_schedule_id_ = cssp.course_schedule_id_ AND cssp.user_id_ = sa.user_id_
-        WHERE CONCAT(cs.class_date_,' ',cs.end_class_time_) &lt;= now() AND sa.id_ IS NULL
+        WHERE CONCAT(cs.class_date_,' ',cs.end_class_time_) &lt;= DATE_ADD(NOW(),INTERVAL -1 HOUR) AND sa.id_ IS NULL
     </select>
     <select id="getNextCourseSchedule" resultMap="CourseSchedule">
         SELECT