feat:查询仿真策划版本

This commit is contained in:
2026-01-28 20:22:58 +08:00
parent 0126d1c548
commit 913eab0051
6 changed files with 33 additions and 2 deletions

View File

@@ -1247,6 +1247,10 @@ public class MinioFileIDataFileServiceImpl implements IDataFileService {
// 新的路径名
String newDirMinioObjectKey = getFileMinioObjectKey(targetParentMetadataInfo.getObjectKey() + sourceMetadataInfo.getOriginalName());
// 把以前归档的过同名文件删除 保留最新的
Optional<FileMetadataInfo> existingFileOptional = getFileMetadataInfoByObjectKey(newDirMinioObjectKey, ThreadLocalContext.getTenantId());
existingFileOptional.ifPresent(existingFile -> fileMetadataInfoService.removeById(existingFile));
try {
minioService.copyFile(oldDirMinioObjectKey, newDirMinioObjectKey,sourceMetadataInfo.getBucketName());
// 创建目录元数据并保存到数据库