|
@@ -122,11 +122,8 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
}
|
|
|
ScenePlusExt scenePlusExt = scenePlusExtService.getScenePlusExtByPlusId(scenePlus.getId());
|
|
|
|
|
|
- String thumbUrl = String.format(UploadFilePath.USER_EDIT_PATH, param.getNum()) + param.getFileName();
|
|
|
+ String thumbUrl = this.ossUrlPrefix + String.format(UploadFilePath.USER_EDIT_PATH, param.getNum()) + param.getFileName();
|
|
|
//更新缩略图url
|
|
|
- if(!FYunTypeEnum.LOCAL.code().equals(fyunType)){
|
|
|
- thumbUrl = this.ossUrlPrefix + thumbUrl;
|
|
|
- }
|
|
|
scenePlusExt.setThumb(thumbUrl);
|
|
|
scenePlusExtService.updateById(scenePlusExt);
|
|
|
|
|
@@ -895,10 +892,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
ZipUtil.zip(newData, zipPath);
|
|
|
//上传压缩包
|
|
|
fYunFileService.uploadFile(bucket, zipPath, "downloads/extras/" + zipName);
|
|
|
- String url = "downloads/extras/" + zipName + "?t=" + Calendar.getInstance().getTimeInMillis();
|
|
|
- if(!FYunTypeEnum.LOCAL.code().equals(fyunType)){
|
|
|
- url = ossUrlPrefix + url;
|
|
|
- }
|
|
|
+ String url = ossUrlPrefix + "downloads/extras/" + zipName + "?t=" + Calendar.getInstance().getTimeInMillis();
|
|
|
return ResultData.ok(url);
|
|
|
}
|
|
|
|
|
@@ -943,11 +937,8 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
ZipUtil.zip(meshPath, zipPath);
|
|
|
//上传压缩包
|
|
|
fYunFileService.uploadFile(bucket, zipPath, "downloads/extras/" + zipName);
|
|
|
- String url = "downloads/extras/" + zipName + "?t=" + Calendar.getInstance().getTimeInMillis();
|
|
|
- if(!FYunTypeEnum.LOCAL.code().equals(fyunType)){
|
|
|
- url = ossUrlPrefix + url;
|
|
|
- }
|
|
|
-// FileUtil.del(zipPath);
|
|
|
+ String url = ossUrlPrefix + "downloads/extras/" + zipName + "?t=" + Calendar.getInstance().getTimeInMillis();
|
|
|
+ FileUtil.del(zipPath);
|
|
|
return ResultData.ok(url);
|
|
|
}
|
|
|
}
|
|
@@ -971,10 +962,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
ZipUtil.zip(editData, zipPath);
|
|
|
//上传压缩包
|
|
|
fYunFileService.uploadFile(bucket, zipPath, "downloads/extras/" + zipName);
|
|
|
- String url = "downloads/extras/" + zipName + "?t=" + Calendar.getInstance().getTimeInMillis();
|
|
|
- if(!FYunTypeEnum.LOCAL.code().equals(fyunType)){
|
|
|
- url = ossUrlPrefix + url;
|
|
|
- }
|
|
|
+ String url = ossUrlPrefix + "downloads/extras/" + zipName + "?t=" + Calendar.getInstance().getTimeInMillis();
|
|
|
return ResultData.ok(url);
|
|
|
}
|
|
|
|
|
@@ -998,10 +986,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
|
|
|
ZipUtil.zip(dataPath, zipPath);
|
|
|
//上传压缩包
|
|
|
fYunFileService.uploadFile(bucket, zipPath, "downloads/extras/" + zipName);
|
|
|
- String url = "downloads/extras/" + zipName + "?t=" + Calendar.getInstance().getTimeInMillis();
|
|
|
- if(!FYunTypeEnum.LOCAL.code().equals(fyunType)){
|
|
|
- url = ossUrlPrefix + url;
|
|
|
- }
|
|
|
+ String url = ossUrlPrefix + "downloads/extras/" + zipName + "?t=" + Calendar.getInstance().getTimeInMillis();
|
|
|
return ResultData.ok(url);
|
|
|
}
|
|
|
|