|
|
@@ -27,6 +27,7 @@ import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
+import java.net.URLEncoder;
|
|
|
import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
@@ -163,8 +164,32 @@ public class ThirdPartyPushMessageStrategyV1 implements ReplyStrategyService {
|
|
|
cgiReplyBucketData.setIsDelete(1);
|
|
|
cgiReplyBucketDataMapper.updateByPrimaryKeySelective(cgiReplyBucketData);
|
|
|
}
|
|
|
+ List<ContentPlatformGzhPlanVideo> gzhPlanVideoList = contentPlatformPlanService.getGzhPlanVideoListByCooperateAccountId(bucketDataParam.getGhId());
|
|
|
+ Map<Long, ContentPlatformGzhPlanVideo> gzhPlanVideoMap = gzhPlanVideoList.stream()
|
|
|
+ .collect(Collectors.toMap(ContentPlatformGzhPlanVideo::getVideoId, x -> x, (a, b) -> b));
|
|
|
// 入库
|
|
|
for (CgiReplyBucketData cgiReplyBucketData : collect) {
|
|
|
+ ContentPlatformGzhPlanVideo gzhPlanVideo = gzhPlanVideoMap.get(cgiReplyBucketData.getMiniVideoId());
|
|
|
+ if (Objects.nonNull(gzhPlanVideo)) {
|
|
|
+ try {
|
|
|
+ String pageUrl = cgiReplyBucketData.getMiniPagePath();
|
|
|
+ if (org.springframework.util.StringUtils.hasText(gzhPlanVideo.getCustomTitle()) && !pageUrl.contains("shareTitle")) {
|
|
|
+ if (Objects.nonNull(gzhPlanVideo.getCustomTitleId())) {
|
|
|
+ pageUrl += URLEncoder.encode("&shareTitleId=" + gzhPlanVideo.getCustomTitleId(), "UTF-8");
|
|
|
+ }
|
|
|
+ pageUrl += URLEncoder.encode("&shareTitle=" + gzhPlanVideo.getCustomTitle(), "UTF-8");
|
|
|
+ }
|
|
|
+ if (org.springframework.util.StringUtils.hasText(gzhPlanVideo.getCustomCover()) && !pageUrl.contains("shareImageUrl")) {
|
|
|
+ if (Objects.nonNull(gzhPlanVideo.getCustomCoverId())) {
|
|
|
+ pageUrl += URLEncoder.encode("&shareImageId=" + gzhPlanVideo.getCustomCoverId(), "UTF-8");
|
|
|
+ }
|
|
|
+ pageUrl += URLEncoder.encode("&shareImageUrl=" + URLEncoder.encode(gzhPlanVideo.getCustomCover(), "UTF-8"), "UTF-8");
|
|
|
+ }
|
|
|
+ cgiReplyBucketData.setMiniPagePath(pageUrl);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("ThirdPartyPushMessageStrategyV1 insertSmallData setPageUrlCustomCoverTitle error,data:" + JSON.toJSONString(cgiReplyBucketData));
|
|
|
+ }
|
|
|
+ }
|
|
|
cgiReplyBucketDataMapper.insertSelective(cgiReplyBucketData);
|
|
|
String redisKey = "auto_reply_video_detail_" + cgiReplyBucketData.getRootSourceId();
|
|
|
VideoCharacteristicVO vo = new VideoCharacteristicVO();
|