|
@@ -1176,7 +1176,10 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper,
|
|
|
throw new BusinessException(ErrorCode.FAILURE_CODE_5063);
|
|
|
}
|
|
|
fYunFileService.uploadFile(bucket, localFilePath, ossFilePath);
|
|
|
- url = ossUrlPrefix + ossFilePath;
|
|
|
+ url = ossFilePath;
|
|
|
+ if(!FYunTypeEnum.LOCAL.code().equals(this.fyunType)){
|
|
|
+ url = ossUrlPrefix + url;
|
|
|
+ }
|
|
|
downloadName = fileName;
|
|
|
}else{
|
|
|
if(!cn.hutool.core.io.FileUtil.exist(localImagesPath)
|
|
@@ -1193,7 +1196,10 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper,
|
|
|
log.info("打包耗时:" + (end1 - start));
|
|
|
//上传压缩包
|
|
|
fYunFileService.uploadFileByCommand(bucket, zipPath, String.format(cacheFormat, num) + downloadName);
|
|
|
- url = ossUrlPrefix + String.format(cacheFormat, num) + downloadName;
|
|
|
+ url = String.format(cacheFormat, num) + downloadName;
|
|
|
+ if(!FYunTypeEnum.LOCAL.code().equals(this.fyunType)){
|
|
|
+ url = ossUrlPrefix + url;
|
|
|
+ }
|
|
|
long end2 = Calendar.getInstance().getTimeInMillis();
|
|
|
log.info("上传耗时:" + (end2 - end1));
|
|
|
//删除本地压缩包
|
|
@@ -1341,7 +1347,10 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper,
|
|
|
@Override
|
|
|
public DownloadVO downloadBallScreenVideo(BallScreenVideoParamVO param) {
|
|
|
String videoPath = String.format(UploadFilePath.VIDEOS_VIEW_PATH, param.getNum()) + param.getFileName();
|
|
|
- String url = ossUrlPrefix + videoPath + "?t=" + System.currentTimeMillis();
|
|
|
+ String url = videoPath + "?t=" + System.currentTimeMillis();
|
|
|
+ if(!FYunTypeEnum.LOCAL.code().equals(this.fyunType)){
|
|
|
+ url = ossUrlPrefix + url;
|
|
|
+ }
|
|
|
return DownloadVO.builder()
|
|
|
.fileName(param.getFileName())
|
|
|
.url(url)
|
|
@@ -1589,9 +1598,13 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper,
|
|
|
|
|
|
SceneDataDownload sceneDataDownload = sceneDataDownloadService.findBySceneNum(num);
|
|
|
if(sceneDataDownload == null){
|
|
|
+ String downloadPath = "data_download/" + num + ".zip";
|
|
|
+ if(!FYunTypeEnum.LOCAL.code().equals(this.fyunType)){
|
|
|
+ downloadPath = ossUrlPrefix + downloadPath;
|
|
|
+ }
|
|
|
sceneDataDownload = new SceneDataDownload();
|
|
|
sceneDataDownload.setSceneNum(num);
|
|
|
- sceneDataDownload.setDownloadPath(ossUrlPrefix + "data_download/" + num + ".zip");
|
|
|
+ sceneDataDownload.setDownloadPath(downloadPath);
|
|
|
sceneDataDownload.setFileMd5(fileMD5);
|
|
|
sceneDataDownloadService.save(sceneDataDownload);
|
|
|
return ResultData.ok();
|