Przeglądaj źródła

缓冲表过滤非今日数据

yjwang 1 miesiąc temu
rodzic
commit
1aa6b25f87

+ 1 - 1
fs-service/src/main/java/com/fs/course/mapper/FsCourseWatchLogMapper.java

@@ -560,6 +560,6 @@ public interface FsCourseWatchLogMapper extends BaseMapper<FsCourseWatchLog> {
     // 统计当天各公司的观看人数和完播人数, 存到redis中,定时任务每 ? 分钟执行一次
     List<WatchCourseStatisticsResultDTO> watchCourseStatisticsGroupByCompany(@Param("params") Map<String, Object> params);
 
-    @Select("select * from fs_course_watch_log where user_id = #{userId} and video_id = #{videoId} and period_id = #{periodId}")
+    @Select("select * from fs_course_watch_log where user_id = #{userId} and video_id = #{videoId} and period_id = #{periodId} AND DATE(create_time) = DATE(NOW())")
     FsCourseWatchLog getWatchCourseVideoInfo(@Param("userId") Long userId, @Param("videoId") Long videoId, @Param("periodId") Long periodId);
 }