|
@@ -46,6 +46,8 @@ public class RemovePortraitServiceImpl implements IRemovePortraitService {
|
|
|
private FYunFileServiceInterface fileServiceInterface;
|
|
|
@Autowired
|
|
|
private ISceneEditInfoService sceneEditInfoService;
|
|
|
+ @Resource
|
|
|
+ private FYunFileServiceInterface fYunFileService;
|
|
|
|
|
|
@Override
|
|
|
public void removePortrait(JSONObject param) throws Exception {
|
|
@@ -108,12 +110,20 @@ public class RemovePortraitServiceImpl implements IRemovePortraitService {
|
|
|
FileUtil.writeUtf8String(dataJson.toJSONString(), target + File.separator+"data.json");
|
|
|
|
|
|
sceneEditInfoService.uploadPanoramaHandler(num,bucket,target,imgViewPath,new ArrayList<>(),targetImagesPath);
|
|
|
+ //上传16k图
|
|
|
+ String cacheImagePath = target + "caches/images/";
|
|
|
+ String ossCachesImagesPath = String.format(UploadFilePath.scene_result_data_path, num) + "caches/images/";
|
|
|
+ List<String> cacheImageList = FileUtil.listFileNames(cacheImagePath);
|
|
|
+ cacheImageList.stream().forEach(fileName->{
|
|
|
+ fYunFileService.uploadFile(cacheImagePath + fileName, ossCachesImagesPath + fileName);
|
|
|
+ });
|
|
|
+
|
|
|
scenePlus.setRemovePortrait(CommonOperStatus.SUCCESS.code());
|
|
|
}catch (Exception e){
|
|
|
log.error("抹除人像失败,num:{}", num, e);
|
|
|
scenePlus.setRemovePortrait(CommonOperStatus.FAILD.code());
|
|
|
}finally {
|
|
|
-// FileUtil.del(target);
|
|
|
+ FileUtil.del(target);
|
|
|
scenePlusService.updateById(scenePlus);
|
|
|
}
|
|
|
}
|