fix: 处理问题

This commit is contained in:
TS-QD1 2025-04-03 17:18:11 +08:00
parent 56f821d534
commit 3a48ec2916

View File

@ -43,6 +43,9 @@ public class RedisFilesShowCodeService implements IFilesShowCodeService {
long clearTimeoutShowCodeCount = 0;
for (String key : keySet) {
FilesShowCode showCode = (FilesShowCode) redisTemplate.opsForValue().get(key);
if (showCode == null) {
continue;
}
if (currentTimeMillis - showCode.getLatestUpdateTime() > SHOW_CODE_TIMEOUT_MILLIS) {
clearKeys.add(FILE_SHOW_CODE_KEY + showCode.getFileId());
}