|
|
@ -23,8 +23,10 @@ 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("自动清理日志执行成功...!"); |
|
|
|
|
|
|
|
} |
|
|
|