src/main/java/org/springblade/modules/FTP/Monitor.java
@@ -290,7 +290,7 @@ * 读取内外推送的文件,每30秒读取一次 * @return */ @Scheduled(cron = "*/30 * * * * ?") // @Scheduled(cron = "*/30 * * * * ?") public static boolean isFTPFileExist() { FTPClient ftp = new FTPClient(); try { @@ -394,6 +394,10 @@ FTPClient ftp = new FTPClient(); boolean flag = false; try { //设置超时时间 ftp.setDataTimeout(60000); //连接超时为60秒 ftp.setConnectTimeout(60000); //连接 ftp.connect(ftpHost, ftpPort); // 登陆 @@ -452,7 +456,7 @@ System.out.println("ftp连接失败"); e.printStackTrace(); } finally { if (ftp != null) { if (ftp.isConnected()) { try { ftp.disconnect(); } catch (IOException e) { src/main/java/org/springblade/modules/quartz/task/Task.java
@@ -95,6 +95,7 @@ FTPFile[] files = ftp.listFiles(); if (files.length==0){ ftp.logout(); return false; } else { @@ -102,6 +103,7 @@ String fileName = file.getName(); InputStream is = ftp.retrieveFileStream(new String(fileName.getBytes("GBK"), FTP.DEFAULT_CONTROL_ENCODING)); if (null == is) { ftp.logout(); return false; } else { String substring1 = fileName.substring(0, 4); @@ -138,6 +140,7 @@ //关闭流 is.close(); ftp.completePendingCommand(); ftp.logout(); } return true; } src/main/java/org/springblade/modules/system/service/impl/UserServiceImpl.java
@@ -1314,10 +1314,10 @@ user.setStatus(1); user.setIsDeleted(0); //分配保安角色 Role role = new Role(); role.setRoleAlias("保安"); Role oneRole = roleService.getOne(Condition.getQueryWrapper(role)); user.setRoleId(oneRole.getId().toString()); // Role role = new Role(); // role.setRoleAlias("保安"); // Role oneRole = roleService.getOne(Condition.getQueryWrapper(role)); user.setRoleId("1412226235153731586"); if (null!=user.getSecuritynumber() && !user.getSecuritynumber().equals("")){ user.setHold("1");