Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
e059f67891
|
@ -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("日志保存成功");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue