Browse Source

导览视频转换下载功能

dengsixing 2 years ago
parent
commit
34c8bc9cd6

+ 2 - 2
4dkankan-center-scene/src/main/java/com/fdkankan/scene/service/impl/DownloadTourVideoServiceImpl.java

@@ -97,11 +97,11 @@ public class DownloadTourVideoServiceImpl extends ServiceImpl<IDownloadTourVideo
         String destPath = null;
         String destPath = null;
         try {
         try {
             String destFileName = UUID.randomUUID().toString() + ".mp4";
             String destFileName = UUID.randomUUID().toString() + ".mp4";
-            File destFile = new File(destFileName);
+            destPath = ConstantFilePath.SCENE_V4_PATH + downloadTourVideo.getNum() + "tour/" + destFileName;
+            File destFile = new File(destPath);
             if(!destFile.getParentFile().exists()){
             if(!destFile.getParentFile().exists()){
                 destFile.getParentFile().mkdir();
                 destFile.getParentFile().mkdir();
             }
             }
-            destPath = ConstantFilePath.SCENE_V4_PATH + downloadTourVideo.getNum() + "tour/" + destFileName;
             String srcPath = downloadTourVideo.getLocalPath();
             String srcPath = downloadTourVideo.getLocalPath();
             CreateObjUtil.formatMp4(srcPath, destPath);
             CreateObjUtil.formatMp4(srcPath, destPath);
             //上传到oss
             //上传到oss