Browse Source

fix 自动清理日志定时器

master
周俊杰 7 months ago
parent
commit
42296ed5e7
  1. 4
      hd/nladmin-system/src/main/java/org/nl/modules/quartz/task/AutoCleanLog.java

4
hd/nladmin-system/src/main/java/org/nl/modules/quartz/task/AutoCleanLog.java

@ -23,10 +23,12 @@ public class AutoCleanLog {
//sys_log
//delete from sys_log where DATE(create_time) <= DATE(DATE_SUB(NOW(),INTERVAL 30 day)) limit 10;
WQLObject logTab = WQLObject.getWQLObject("sys_log");
WQLObject logTab1 = WQLObject.getWQLObject("acs_log");
int days = Integer.parseInt(acsConfigService.findConfigFromCache().get(AcsConfig.AutoCleanDays));
logTab.delete("DATE(create_time) <= DATE(DATE_SUB(NOW(),INTERVAL " + days + " day)) limit 50");
logTab1.delete("DATE(create_time) <= DATE(DATE_SUB(NOW(),INTERVAL " + days + " day)) limit 50");
log.info("自动清理日志执行成功...!");
}
}
}

Loading…
Cancel
Save