|
|
|
@ -14,7 +14,7 @@ import java.util.zip.ZipOutputStream;
|
|
|
|
|
|
|
|
|
|
public class ReadDataUtil {
|
|
|
|
|
|
|
|
|
|
public static void doAction() throws IOException {
|
|
|
|
|
public static String doAction() throws IOException {
|
|
|
|
|
// 创建临时目录
|
|
|
|
|
Path tempDir = Files.createTempDirectory("csv_export_");
|
|
|
|
|
List<String> csvFiles = new ArrayList<>();
|
|
|
|
@ -55,10 +55,12 @@ public class ReadDataUtil {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 上传到华为云OBS
|
|
|
|
|
ObsUtil.uploadToObs(zipPath,"HuangHai/YunXiao/"+ timestamp + ".zip");
|
|
|
|
|
String key="HuangHai/YunXiao/"+ timestamp + ".zip";
|
|
|
|
|
ObsUtil.uploadToObs(zipPath,key);
|
|
|
|
|
// 清理临时文件
|
|
|
|
|
csvFiles.forEach(csv -> FileUtil.del(csv));
|
|
|
|
|
FileUtil.del(zipPath);
|
|
|
|
|
FileUtil.del(tempDir.toString());
|
|
|
|
|
return "https://dsideal.obs.cn-north-1.myhuaweicloud.com/"+key;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|