|
@@ -17,6 +17,7 @@ import com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformUploadVideo
|
|
|
import com.tzld.piaoquan.api.model.vo.contentplatform.UploadVideoItemVO;
|
|
|
import com.tzld.piaoquan.api.service.contentplatform.ContentPlatformSettingService;
|
|
|
import com.tzld.piaoquan.api.service.contentplatform.ContentPlatformUploadContentService;
|
|
|
+import com.tzld.piaoquan.api.util.CdnUtil;
|
|
|
import com.tzld.piaoquan.growth.common.utils.page.Page;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
@@ -46,6 +47,12 @@ public class ContentPlatformUploadContentServiceImpl implements ContentPlatformU
|
|
|
if (pqAccountRel == null) {
|
|
|
throw new CommonException(ExceptionEnum.PQ_ACCOUNT_NOT_BINDING);
|
|
|
}
|
|
|
+ if (!param.getCoverUrl().startsWith("http")) {
|
|
|
+ param.setCoverUrl(CdnUtil.VIDEO_CDN_URL_HOST + param.getCoverUrl());
|
|
|
+ }
|
|
|
+ if (!param.getVideoUrl().startsWith("http")) {
|
|
|
+ param.setVideoUrl(CdnUtil.VIDEO_CDN_URL_HOST + param.getVideoUrl());
|
|
|
+ }
|
|
|
// 调用视频发布 获取videoId
|
|
|
Long videoId = videoApiService.publishVideo(pqAccountRel.getPqUid(), param.getVideoUrl(), param.getCoverUrl(), param.getTitle());
|
|
|
if (videoId == null) {
|
|
@@ -71,6 +78,12 @@ public class ContentPlatformUploadContentServiceImpl implements ContentPlatformU
|
|
|
if (uploadVideo == null) {
|
|
|
return null;
|
|
|
}
|
|
|
+ if (!param.getCoverUrl().startsWith("http")) {
|
|
|
+ param.setCoverUrl(CdnUtil.VIDEO_CDN_URL_HOST + param.getCoverUrl());
|
|
|
+ }
|
|
|
+ if (!param.getVideoUrl().startsWith("http")) {
|
|
|
+ param.setVideoUrl(CdnUtil.VIDEO_CDN_URL_HOST + param.getVideoUrl());
|
|
|
+ }
|
|
|
// 调用修改视频接口
|
|
|
ContentPlatformPqAccountRel pqAccountRel = settingService.getPqAccountRel(user.getId());
|
|
|
videoApiService.updateVideo(pqAccountRel.getPqUid(), uploadVideo.getVideoId(), param.getCoverUrl(), param.getTitle());
|