Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
lulz1 2024-03-13 08:51:13 +08:00
commit e059f67891
1 changed files with 3 additions and 3 deletions

View File

@ -74,7 +74,7 @@ public class LogService {
if (logNums <= 0L) {
break;//没有数据结束循环
}
//获取所有日志信息
//获取日志信息
Map<String, Object> systemLogMap = redisCache.getCacheHashValues("SystemLog", 100);
if (systemLogMap.isEmpty()) {
break; // 如果没有数据可取跳出循环
@ -85,10 +85,10 @@ public class LogService {
gson.fromJson((String) log, SystemLog.class)
).toList();
jdbcSystemLogRepository.saveAll(systemLogs);
// 删除已处理的日志数据
redisCache.delCacheMapValue("SystemLog", systemLogMap.keySet());
count++;
}
//删除redis的日志
redisCache.deleteObject("SystemLog");
log.info("日志保存成功");
}