提交代码

This commit is contained in:
lilin 2025-05-24 13:01:48 +08:00
parent 2b30e30fda
commit 7c2f76acac

View File

@ -968,6 +968,9 @@ public class NodesServiceImpl extends ServiceImpl<NodesMapper, Nodes> implements
// 4. 构建解压目标路径 例如 D:\yun\temporary\111
Path destRoot = Paths.get(storageSourceConfig.getValue(), decompressionPath, zipName);
LOGGER.info("要解压文件路径:{}", zipFilePath);
LOGGER.info("解压以后文件路径:{}", destRoot);
//todo 如果项目不存在 直接拷贝到目标路径下 拷贝完成以后 然后新增一个项目结构 然后走一遍扫描
@ -980,13 +983,17 @@ public class NodesServiceImpl extends ServiceImpl<NodesMapper, Nodes> implements
unzipToTemp(zipFilePath, String.valueOf(destRoot));
// 执行上传并且插入数据库
this.documentUploadById(id, sourceFolderPath, targetFolderPath, storageSourceConfig.getValue());
//开始执行更新表数据 名称是去掉后缀以后的
uploadProject(zipName);
LOGGER.info("开始更新表数据:{}", zipName);
//获取文件路径
String path = storageSourceConfig.getValue() + decompressionPath; // 替换为实际路径
File target = new File(path);
File targetZip = new File(String.valueOf(zipFilePath));
File target = new File(String.valueOf(destRoot));
//删除临时文件ZIP
deleteDirectory(targetZip);
//删除临时文件
deleteDirectory(target);
} catch (IOException e) {
throw new RuntimeException(e);