parent
fce533abe7
commit
f88f958eee
@ -1,30 +0,0 @@
|
||||
package com.dsideal.base.clearRubbish;
|
||||
|
||||
import com.dsideal.base.Util.CommonUtil;
|
||||
import com.jfinal.kit.LogKit;
|
||||
import com.jfinal.kit.PathKit;
|
||||
import com.jfinal.kit.PropKit;
|
||||
import com.jfinal.plugin.activerecord.Db;
|
||||
|
||||
public class clearRubbishAction implements Runnable {
|
||||
public void run() {
|
||||
//1、清理excel的垃圾
|
||||
String basePath = PathKit.getRootClassPath() + PropKit.get("ExcelImportTemplatePathSuffix").replace("\\", "/");
|
||||
String tempPath = basePath + "excelTemp/";
|
||||
CommonUtil.clearFile(tempPath);
|
||||
|
||||
basePath = PathKit.getRootClassPath() + PropKit.get("excelExportTemplatePathSuffix").replace("\\", "/");
|
||||
tempPath = basePath + "excelTemp/";
|
||||
CommonUtil.clearFile(tempPath);
|
||||
LogKit.info("成功清除excel垃圾日志。");
|
||||
|
||||
//2、清理EXCEL导入数据表
|
||||
String sql = "truncate table t_import_teacher_by_excel";
|
||||
Db.update(sql);
|
||||
|
||||
sql = "truncate table t_import_student_by_excel";
|
||||
Db.update(sql);
|
||||
|
||||
//3、以后扩展其它垃圾
|
||||
}
|
||||
}
|
Loading…
Reference in new issue