智慧保安后台管理-外网-验收版本
tangzy
2021-12-06 cc057177b2fb17aee9a173a6adbabdc578fd74c7
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();
               }
@@ -150,7 +151,7 @@
      } catch (Exception e) {
         System.out.println("ftp连接失败");
         e.printStackTrace();
      } finally {