mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-06 17:36:47 +08:00
日志
This commit is contained in:
@@ -333,7 +333,7 @@ public class StudyServiceImpl implements IStudyService{
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss");
|
||||
String value = lastStudyTime + "&" + now.format(formatter); // 使用ISO8601时间格式
|
||||
|
||||
log.info("-study-video-time-----value = " + value);
|
||||
// 20250303 优化 多次更新改一次更新
|
||||
// 更新Redis中的最后活跃时间(带30秒过期)
|
||||
redisTemplate.opsForValue().set(
|
||||
@@ -341,12 +341,14 @@ public class StudyServiceImpl implements IStudyService{
|
||||
value,
|
||||
Duration.ofSeconds(2592000)
|
||||
);
|
||||
log.info("-study-video-time-redis保存---value = " + value);
|
||||
// Duration.ofDays(30) 也就是 2592000秒
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void updateStudyCourseItemLastTime(String studyContentId, int lastStudyTime,LocalDateTime timestamp) {
|
||||
log.info("-study-video-time-定时---studyContentId = " + studyContentId + ",lastStudyTime = " + lastStudyTime + ", timestamp = " + timestamp);
|
||||
// 更新最后的学习时间点
|
||||
LocalDateTime now=LocalDateTime.now();
|
||||
UpdateBuilder update=UpdateBuilder.from(StudyCourseItem.class);
|
||||
@@ -356,6 +358,7 @@ public class StudyServiceImpl implements IStudyService{
|
||||
update.addUpdateField("lastStudyTime", lastStudyTime);
|
||||
update.addUpdateField("lastTime", timestamp==null ? now : timestamp);
|
||||
scItemDao.update(update.builder());
|
||||
log.info("-study-video-time-mysql保存---studyContentId = " + studyContentId);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user