feat(可回溯): 可回溯

调整临时文件生成
This commit is contained in:
BrandWang
2023-03-29 15:40:26 +08:00
parent e7ac0ef103
commit b328605924
4 changed files with 72 additions and 4 deletions
@@ -101,19 +101,19 @@ public class OrderController {
return Mono.just(ResObj.ok());
}
void createVideo(String dir, String jsonData) throws IOException {
void createVideo(String orderId, String jsonData) throws IOException {
// 创建临时目录
Path tempDir = null;
try {
tempDir = Files.createTempDirectory(dir);
tempDir = Files.createTempDirectory("ts");
} catch (IOException e) {
e.printStackTrace();
}
System.out.println("Created temporary directory: " + tempDir);
try {
File tempFile = File.createTempFile("traces", ".json", tempDir.toFile());
File tempFile = new File(tempDir.toFile(), "traces.json");
FileWriter fw = new FileWriter(tempFile);
BufferedWriter bw = new BufferedWriter(fw);
bw.write(jsonData);