Merge remote-tracking branch 'yx/master-20250414-lyc' into test

This commit is contained in:
joshen
2025-04-18 10:41:25 +08:00

View File

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