Administrator
2021-08-31 08363052cecb30230a2c8b3eba791ca8d1be00a5
src/main/java/org/springblade/modules/FTP/monitor.java
@@ -15,7 +15,7 @@
@Component
public class monitor {
//   @Scheduled(cron = "*/30 * * * * ?")
   @Scheduled(cron = "*/30 * * * * ?")
   public static boolean isFTPFileExist() {
      FTPClient ftp = new FTPClient();
@@ -63,6 +63,7 @@
         //ftp.changeWorkingDirectory(new String(dir.getBytes("GBK"), FTP.DEFAULT_CONTROL_ENCODING));
         // 检验文件是否存在
         ftp.changeWorkingDirectory(ftpPath);
         FTPFile[] files = ftp.listFiles();
         if (files.length==0){
            return false;
@@ -100,7 +101,7 @@
                  //删除本地文件
                  //MysqlCenlint.deletes(fileName);
                  MysqlCenlint.deletess(fileName);
                  FtpUtil.deleteFile(ftpHost_dev, ftpPort, ftpUserName, ftpPassword, "anbao/", fileName);
                  FtpUtil.deleteFile(ftpHost_dev, ftpPort, ftpUserName, ftpPassword, ftpPath, fileName);
                  is.close();
                  ftp.completePendingCommand();
               }