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