fix: 同步数据后,及时清理远程Excel文件

This commit is contained in:
taojinlong
2025-03-05 16:30:32 +08:00
committed by taojinlong
parent 9ed2a24897
commit 9a17e1382b

View File

@@ -193,6 +193,9 @@ public class ExcelUtils {
}
}
}
if (StringUtils.isNotEmpty(fileNames.get("tranName"))) {
FileUtils.deleteFile(path + fileNames.get("tranName"));
}
} else {
try {
JsonNode rootNode = objectMapper.readTree(datasourceRequest.getDatasource().getConfiguration());
@@ -411,7 +414,9 @@ public class ExcelUtils {
excelFileData.setId(fileNames.get("tranName").split("\\.")[0]);
excelFileData.setPath(path + fileNames.get("tranName"));
excelFileData.setSheets(returnSheetDataList);
if (StringUtils.isNotEmpty(fileNames.get("tranName"))) {
FileUtils.deleteFile(path + fileNames.get("tranName"));
}
return excelFileData;
}