|
@@ -755,9 +755,9 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper,
|
|
|
//全景图计算根目录
|
|
|
String target = path + "_images";
|
|
|
//解压缩文件存放目录
|
|
|
- String targetImagesPath = target + "/extras/images";
|
|
|
+ String targetImagesPath = target + "/extras/images/";
|
|
|
//压缩文件保存目录
|
|
|
- String zipTargetFilePath = targetImagesPath + File.separator + file.getOriginalFilename();
|
|
|
+ String zipTargetFilePath = targetImagesPath + file.getOriginalFilename();
|
|
|
|
|
|
//压缩包保存到本地
|
|
|
// String cachePath = String.format(ConstantFilePath.SCENE_CACHE_IMAGES, num);
|
|
@@ -795,7 +795,6 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper,
|
|
|
|
|
|
//判断是否有可用的jpg文件
|
|
|
boolean existJpg = false;
|
|
|
- uploadFileList = FileUtil.getFileList(targetImagesPath);
|
|
|
if(CollUtil.isNotEmpty(uploadFileList)){
|
|
|
existJpg = uploadFileList.stream().anyMatch(str -> {
|
|
|
if(str.endsWith(".jpg")){
|
|
@@ -999,9 +998,11 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper,
|
|
|
List<String> keyList = uploadToOssUtil.listKeys(imgCachePath);
|
|
|
if (!StorageType.LOCAL.code().equals(this.type)) {// TODO: 2022/2/15 这里有可能有问题,可能还需要考虑本地部署的情况
|
|
|
keyList.parallelStream().forEach(key->{
|
|
|
- String file = key.substring(key.lastIndexOf("/") + 1);
|
|
|
- String imageUrl = ossUrlPrefix + imgCachePath + file + "?t=" + System.currentTimeMillis();
|
|
|
- FileUtils.downLoadFromUrl(imageUrl, file, localImagesPath);
|
|
|
+ if(key.endsWith(".jpg")){
|
|
|
+ String file = key.substring(key.lastIndexOf("/") + 1);
|
|
|
+ String imageUrl = ossUrlPrefix + imgCachePath + file + "?t=" + System.currentTimeMillis();
|
|
|
+ FileUtils.downLoadFromUrl(imageUrl, file, localImagesPath);
|
|
|
+ }
|
|
|
});
|
|
|
}
|
|
|
}
|