| | |
| | | |
| | | // 文件路径 |
| | | String locFilePath = localFilePath + TYPE + today + String.format("%06d", sequenceNumber) + ".xml"; |
| | | // FileWriter writer = new FileWriter(locFilePath); |
| | | // writer.writeLines(sqlList); |
| | | String listSql = String.join("\n", sqlList); |
| | | try { |
| | | FileUtils.fileWriterSql(locFilePath, listSql); |
| | |
| | | sqlExecutor.execute(sql); |
| | | } catch (Exception e) { |
| | | failedSqlList.add(sql); |
| | | // throw new JeecgBootException("执行sql失败!"); |
| | | } |
| | | } |
| | | if (!failedSqlList.isEmpty()) { |
| | |
| | | throw new JeecgBootException("数据写入文件失败!"); |
| | | } |
| | | } |
| | | // String sqlList = fileReader.readString(); |
| | | |
| | | if (Integer.parseInt(file.getName().substring(file.getName().length() - 10, file.getName().length() - 4)) == 1) { |
| | | // 删除历史文件 |