智慧保安后台管理-验收版本
tangzy
2021-12-06 30df94c05573a426d030510d4dd58ae1d93bfb7a
src/main/java/org/springblade/modules/FTP/monitor.java
@@ -19,7 +19,7 @@
   //private static String fileName = "nsql.json";
   @Scheduled(cron = "*/30 * * * * ?")
   //@Scheduled(cron = "*/30 * * * * ?")
   public static boolean isFTPFileExist() {
      FTPClient ftp = new FTPClient();
@@ -53,7 +53,6 @@
         // 设置编码格式
         ftp.setControlEncoding("GBK");
         // 提取绝对地址的目录以及文件名
         //ftpPath = ftpPath.replace("ftp://" + ftpHost + ":" + ftpPort + "/", "");
@@ -67,6 +66,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;
@@ -112,7 +112,7 @@
                  }
                  else {
                     //把文件下载到本地
                     FtpUtil.downloadFtpFile(ftpHost_dev, ftpUserName, ftpPassword, ftpPort, ftpPath, localPath, fileName);
                     FtpUtil.downloadFtpFile(ftpHost_dev, ftpUserName, ftpPassword, ftpPort, ftpPath, MinioPath, fileName);
                     //MysqlCenlint.deletess(fileName);
                     FtpUtil.deleteFile(ftpHost_dev, ftpPort, ftpUserName, ftpPassword, "anbao/", fileName);
                     is.close();
@@ -166,7 +166,6 @@
      } catch (Exception e) {
         e.printStackTrace();
      } finally {