Pārlūkot izejas kodu

场景编辑中下载相关功能 url 去掉/oss/前缀

dsx 1 gadu atpakaļ
vecāks
revīzija
2fac4d9628

+ 2 - 2
src/main/java/com/fdkankan/scene/service/impl/SceneEditInfoServiceImpl.java

@@ -1335,7 +1335,7 @@ public class SceneEditInfoServiceImpl extends ServiceImpl<ISceneEditInfoMapper,
             if(!panoramaImageList.contains(fileName)){
                 throw new BusinessException(ErrorCode.FAILURE_CODE_5063);
             }
-            String url = ossUrlPrefix + ossResultPath + fileName;
+            String url = ossResultPath + fileName;
             String downloadName = fileName;
             map.put("asyn", CommonStatus.NO.code());
             map.put("fileUrl", url + "?t=" + System.currentTimeMillis());
@@ -1536,7 +1536,7 @@ 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();
         return DownloadVO.builder()
             .fileName(param.getFileName())
             .url(url)

+ 2 - 2
src/main/java/com/fdkankan/scene/service/impl/SceneProServiceImpl.java

@@ -1050,7 +1050,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
         //删除本地文件
         FileUtil.del(meshLocalPath);
         FileUtil.del(zipFilePath);
-        String url = ossUrlPrefix + "downloads/extras/" + zipName + "?t=" + Calendar.getInstance().getTimeInMillis();
+        String url = "downloads/extras/" + zipName + "?t=" + Calendar.getInstance().getTimeInMillis();
         return ResultData.ok(url);
     }
 
@@ -1108,7 +1108,7 @@ public class SceneProServiceImpl extends ServiceImpl<ISceneProMapper, ScenePro>
         ZipUtil.zip(meshPath, zipPath);
         //上传压缩包
         fYunFileService.uploadFile(bucket, zipPath, "downloads/extras/" + zipName);
-        String url = ossUrlPrefix + "downloads/extras/" + zipName + "?t=" + Calendar.getInstance().getTimeInMillis();
+        String url = "downloads/extras/" + zipName + "?t=" + Calendar.getInstance().getTimeInMillis();
         FileUtil.del(zipPath);
         return ResultData.ok(url);
     }