This commit is contained in:
670788339
2025-04-18 10:40:50 +08:00
parent 3e70e71e5a
commit 00510562ca

View File

@@ -120,6 +120,7 @@ public class StudyCourseTask {
// 3. 遍历处理符合条件的key
while (cursor.hasNext()) {
String redisKey = new String(cursor.next());
log.info("-定时任务 saveStudyCourseItemLastTime ---redisKey = " + redisKey);
// 4. 获取剩余TTL
Long ttl = redisTemplate.getExpire(redisKey, TimeUnit.SECONDS);
@@ -137,6 +138,7 @@ public class StudyCourseTask {
String studyItemId = parts[7];
// 7. 获取存储的时间点(示例逻辑)
String redisValue = redisTemplate.opsForValue().get(redisKey);
log.info("-定时任务 saveStudyCourseItemLastTime ---redisValue = " + redisValue);
if (redisValue == null) continue;
String[] partValues = redisValue.split("&");
int studyVideoTtime = Integer.parseInt(partValues[0]);