Browse Source

事件文件删除

develop
王兴琳 4 months ago
parent
commit
d354af2edf
  1. 3
      zc-business/src/main/java/com/zc/business/controller/FTPDeletion.java

3
zc-business/src/main/java/com/zc/business/controller/FTPDeletion.java

@ -62,14 +62,12 @@ public class FTPDeletion {
String filePath = parentDirPath + "/" + file.getName();
if (file.isDirectory()) {
System.out.println("地址"+filePath);
// 如果是目录,则递归调用
// 删除30天前的文件
Instant lastModifiedTime = file.getTimestamp().toInstant();
String[] split = filePath.split("交通事件");
if (split.length>1){
if (!lastModifiedTime.isBefore(thirtyDaysAgoStartOfDay)){
System.out.println("跳回天====="+filePath);
continue;
}
}
@ -93,7 +91,6 @@ public class FTPDeletion {
}
}else {
System.out.println("跳出循环-------------------------------------");
continue;
}

Loading…
Cancel
Save