优化
This commit is contained in:
@@ -18,18 +18,10 @@ import java.util.Date;
|
||||
public class AutoDelLogTask {
|
||||
|
||||
public void run() {
|
||||
WQLObject sys_log = WQLObject.getWQLObject("sys_log");
|
||||
WQLObject sys_quartz_log = WQLObject.getWQLObject("sys_quartz_log");
|
||||
|
||||
|
||||
String delete_time = SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("LOG_DELETE_TIME").getValue();
|
||||
DateTime date = DateUtil.date();
|
||||
DateTime date2 = DateUtil.offsetDay(date, -Integer.parseInt(delete_time));
|
||||
|
||||
String date3 = DateUtil.formatDate(date2);
|
||||
|
||||
sys_log.delete("1=1 and create_time<='"+date3+"'");
|
||||
sys_quartz_log.delete("1=1 and create_time<='"+date3+"'");
|
||||
WQLObject logTab = WQLObject.getWQLObject("sys_log");
|
||||
String perNum = SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("LOG_DELETE_TIME").getValue();
|
||||
logTab.delete("DATE(create_time) <= DATE(DATE_SUB(NOW(),INTERVAL " + Integer.valueOf(perNum) + " day))");
|
||||
log.info("自动清理日志执行成功...!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -490,7 +490,8 @@ export default {
|
||||
this.changeShow = true
|
||||
},
|
||||
querytable() {
|
||||
this.crud.toQuery()
|
||||
//this.crud.toQuery()
|
||||
this.crud.refresh()
|
||||
this.handleCurrentChange()
|
||||
},
|
||||
downdtl() {
|
||||
|
||||
Reference in New Issue
Block a user