|
@@ -375,6 +375,8 @@ public class ContentPlatformPlanServiceImpl implements ContentPlatformPlanServic
|
|
|
item.setCover(vo.getCover());
|
|
item.setCover(vo.getCover());
|
|
|
setCustomCover(item, vo);
|
|
setCustomCover(item, vo);
|
|
|
item.setCustomCoverType(vo.getCustomCoverType());
|
|
item.setCustomCoverType(vo.getCustomCoverType());
|
|
|
|
|
+ // 上报多标题封面
|
|
|
|
|
+ item.setPageUrl(setMultiTitleCoverPagePath(item));
|
|
|
gzhPlanVideoMapper.updateByPrimaryKey(item);
|
|
gzhPlanVideoMapper.updateByPrimaryKey(item);
|
|
|
} else {
|
|
} else {
|
|
|
ContentPlatformGzhPlanVideo item = new ContentPlatformGzhPlanVideo();
|
|
ContentPlatformGzhPlanVideo item = new ContentPlatformGzhPlanVideo();
|
|
@@ -399,6 +401,8 @@ public class ContentPlatformPlanServiceImpl implements ContentPlatformPlanServic
|
|
|
SmallPageUrlDetail smallPageUrlDetail = json.getJSONObject("data").toJavaObject(SmallPageUrlDetail.class);
|
|
SmallPageUrlDetail smallPageUrlDetail = json.getJSONObject("data").toJavaObject(SmallPageUrlDetail.class);
|
|
|
item.setPageUrl(smallPageUrlDetail.getUrl());
|
|
item.setPageUrl(smallPageUrlDetail.getUrl());
|
|
|
}
|
|
}
|
|
|
|
|
+ // 上报多标题封面
|
|
|
|
|
+ item.setPageUrl(setMultiTitleCoverPagePath(item));
|
|
|
item.setCreateAccountId(loginAccount.getId());
|
|
item.setCreateAccountId(loginAccount.getId());
|
|
|
item.setCreateTimestamp(System.currentTimeMillis());
|
|
item.setCreateTimestamp(System.currentTimeMillis());
|
|
|
gzhPlanVideoMapper.insert(item);
|
|
gzhPlanVideoMapper.insert(item);
|
|
@@ -409,6 +413,42 @@ public class ContentPlatformPlanServiceImpl implements ContentPlatformPlanServic
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ private String setMultiTitleCoverPagePath(ContentPlatformGzhPlanVideo item) {
|
|
|
|
|
+ String pageUrl = item.getPageUrl();
|
|
|
|
|
+ if(StringUtils.hasText(pageUrl)){
|
|
|
|
|
+ String title = item.getTitle();
|
|
|
|
|
+ String cover = item.getCover();
|
|
|
|
|
+ try {
|
|
|
|
|
+ if (Objects.nonNull(item.getCustomTitleId()) && !pageUrl.contains("shareTitleId")) {
|
|
|
|
|
+ pageUrl += URLEncoder.encode("&shareTitleId=" + item.getCustomTitleId(), "UTF-8");
|
|
|
|
|
+ }
|
|
|
|
|
+ if (!pageUrl.contains("shareTitle")) {
|
|
|
|
|
+ if (StringUtils.hasText(item.getCustomTitle())) {
|
|
|
|
|
+ pageUrl += URLEncoder.encode("&shareTitle=" + item.getCustomTitle(), "UTF-8");
|
|
|
|
|
+ title = item.getCustomTitle();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ pageUrl += URLEncoder.encode("&shareTitle=" + item.getTitle(), "UTF-8");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ if (Objects.nonNull(item.getCustomCoverId()) && !pageUrl.contains("shareImageId")) {
|
|
|
|
|
+ pageUrl += URLEncoder.encode("&shareImageId=" + item.getCustomCoverId(), "UTF-8");
|
|
|
|
|
+ }
|
|
|
|
|
+ if (!pageUrl.contains("shareImageUrl")) {
|
|
|
|
|
+ if (StringUtils.hasText(item.getCustomCover())) {
|
|
|
|
|
+ pageUrl += URLEncoder.encode("&shareImageUrl=" + URLEncoder.encode(item.getCustomCover(), "UTF-8"), "UTF-8");
|
|
|
|
|
+ cover = item.getCustomCover();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ pageUrl += URLEncoder.encode("&shareImageUrl=" + URLEncoder.encode(item.getCover(), "UTF-8"), "UTF-8");
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
|
+ log.error("设置视频多标题封面失败,videoId={}", item.getVideoId(), e);
|
|
|
|
|
+ }
|
|
|
|
|
+ pageUrl = videoMultiService.setVideoMultiTitleCoverPagePath(item.getVideoId(), pageUrl, title, cover);
|
|
|
|
|
+ }
|
|
|
|
|
+ return pageUrl;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
private void setCustomTitle(ContentPlatformGzhPlanVideo item, GzhPlanVideoContentItemParam vo) {
|
|
private void setCustomTitle(ContentPlatformGzhPlanVideo item, GzhPlanVideoContentItemParam vo) {
|
|
|
if (StringUtils.hasText(vo.getCustomTitle())) {
|
|
if (StringUtils.hasText(vo.getCustomTitle())) {
|
|
|
List<ContentPlatformGzhPlanVideo> gzhPlanVideoList = gzhPlanVideoListByVideoTitle(vo.getVideoId());
|
|
List<ContentPlatformGzhPlanVideo> gzhPlanVideoList = gzhPlanVideoListByVideoTitle(vo.getVideoId());
|