|
@@ -104,19 +104,19 @@ public class DownloadTourVideoServiceImpl extends ServiceImpl<IDownloadTourVideo
|
|
|
destPath = ConstantFilePath.SCENE_V4_PATH + downloadTourVideo.getNum() + "tour/" + destFileName;
|
|
|
String srcPath = downloadTourVideo.getLocalPath();
|
|
|
CreateObjUtil.formatMp4(srcPath, destPath);
|
|
|
+ //上传到oss
|
|
|
+ String ossPath = String.format(UploadFilePath.DOWNLOADS_TOUR_VIDEO, downloadTourVideo.getNum()) + downloadTourVideo.getFileName();
|
|
|
+ uploadToOssUtil.upload(destPath, ossPath);
|
|
|
+ downloadTourVideo.setDownloadPath(ossPath);
|
|
|
+ downloadTourVideo.setState(1);
|
|
|
+ this.updateById(downloadTourVideo);
|
|
|
}catch (Exception e) {
|
|
|
log.error("导览视频转换失败,num:" + downloadTourVideo.getNum() + "源路径:" + downloadTourVideo.getLocalPath(), e);
|
|
|
downloadTourVideo.setReason(ExceptionUtil.stacktraceToString(e, 3000));
|
|
|
downloadTourVideo.setState(2);
|
|
|
+ this.updateById(downloadTourVideo);
|
|
|
}
|
|
|
|
|
|
- //上传到oss
|
|
|
- String ossPath = String.format(UploadFilePath.DOWNLOADS_TOUR_VIDEO, downloadTourVideo.getNum()) + downloadTourVideo.getFileName();
|
|
|
- uploadToOssUtil.upload(destPath, ossPath);
|
|
|
-
|
|
|
- downloadTourVideo.setDownloadPath(ossPath);
|
|
|
- downloadTourVideo.setState(1);
|
|
|
- this.updateById(downloadTourVideo);
|
|
|
}
|
|
|
|
|
|
@Override
|