|
@@ -1257,7 +1257,7 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper,
|
|
|
}
|
|
|
sceneAsynOperLogService.save(sceneAsynOperLog);
|
|
|
try {
|
|
|
- this.uploadPanoramaHandler(num,bucket,target,imgViewPath, finalUploadFileList,targetImagesPath);
|
|
|
+ this.uploadPanoramaHandler(num,bucket,target,imgViewPath, finalUploadFileList,targetImagesPath, null);
|
|
|
sceneAsynOperLog.setState(CommonOperStatus.SUCCESS.code());
|
|
|
} catch (Exception e) {
|
|
|
log.error("上传全景图报错,num:" + num, e);
|
|
@@ -1266,7 +1266,7 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper,
|
|
|
sceneAsynOperLogService.updateById(sceneAsynOperLog);
|
|
|
});
|
|
|
}else{
|
|
|
- this.uploadPanoramaHandler(num,bucket,target,imgViewPath,uploadFileList,targetImagesPath);
|
|
|
+ this.uploadPanoramaHandler(num,bucket,target,imgViewPath,uploadFileList,targetImagesPath, null);
|
|
|
if(CollUtil.isNotEmpty(notExistFileList)){
|
|
|
uploadPanoramaVO.setSuccessCnt(uploadFileList.size());
|
|
|
uploadPanoramaVO.setFailList(notExistFileList);
|
|
@@ -1276,7 +1276,7 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper,
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public void uploadPanoramaHandler(String num, String bucket, String target, String imgViewPath, List<String> uploadFileList, String targetImagesPath) throws Exception {
|
|
|
+ public void uploadPanoramaHandler(String num, String bucket, String target, String imgViewPath, List<String> uploadFileList, String targetImagesPath, String bizType) throws Exception {
|
|
|
CreateObjUtil.build3dModel(target , "1");
|
|
|
|
|
|
String uploadJsonPath= target + File.separator + "results" +File.separator+"upload.json";
|
|
@@ -1341,6 +1341,14 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper,
|
|
|
uploadFileList.stream().forEach(srcPath->{
|
|
|
map.put(srcPath, srcPath.replace(targetImagesPath, ossCachesImagesPath));
|
|
|
});
|
|
|
+ if(StrUtil.isNotEmpty(bizType) && bizType.equals("removePortrait")){
|
|
|
+ //上传16k图
|
|
|
+ String cacheImagePath = target + "/caches/images/";
|
|
|
+ List<String> cacheImageList = FileUtil.listFileNames(cacheImagePath);
|
|
|
+ cacheImageList.stream().forEach(v->{
|
|
|
+ fYunFileService.uploadFile(cacheImagePath + v, ossCachesImagesPath + v);
|
|
|
+ });
|
|
|
+ }
|
|
|
|
|
|
if(map.size()>0) {
|
|
|
fYunFileService.uploadMulFiles(bucket, map);
|
|
@@ -1352,6 +1360,8 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper,
|
|
|
this.upgradeVersionAndImgVersionById(sceneEditInfo.getId());
|
|
|
//更新scenejson缓存和oss文件版本号
|
|
|
this.upgradeSceneJsonVersion(num, sceneEditInfo.getVersion() + 1, sceneEditInfo.getImgVersion() + 1, bucket);
|
|
|
+
|
|
|
+ FileUtil.del(target);
|
|
|
}
|
|
|
|
|
|
|