|
|
@@ -3,13 +3,12 @@ package com.tzld.piaoquan.longarticle.service.local.impl;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.ctrip.framework.apollo.spring.annotation.ApolloJsonValue;
|
|
|
-import com.tzld.piaoquan.longarticle.common.enums.ContentStatusEnum;
|
|
|
import com.tzld.piaoquan.longarticle.common.enums.MatchResultStatusEnum;
|
|
|
-import com.tzld.piaoquan.longarticle.dao.mapper.longarticle.NewVideoCoverMapper;
|
|
|
import com.tzld.piaoquan.longarticle.model.bo.VideoDetail;
|
|
|
import com.tzld.piaoquan.longarticle.model.po.longarticle.*;
|
|
|
import com.tzld.piaoquan.longarticle.model.vo.MatchMiniprogramStatusParam;
|
|
|
import com.tzld.piaoquan.longarticle.service.local.CardService;
|
|
|
+import com.tzld.piaoquan.longarticle.service.local.VideoMultiService;
|
|
|
import com.tzld.piaoquan.longarticle.service.remote.AigcService;
|
|
|
import com.tzld.piaoquan.longarticle.service.remote.MatchService;
|
|
|
import com.tzld.piaoquan.longarticle.service.remote.VideoService;
|
|
|
@@ -45,6 +44,10 @@ public class CardServiceImpl implements CardService {
|
|
|
|
|
|
@ApolloJsonValue("${useShareImgPathList:[]}")
|
|
|
private List<String> useShareImgPathList;
|
|
|
+ @ApolloJsonValue("${useSmallPlayImgPathList:[]}")
|
|
|
+ private List<String> useSmallPlayImgPathList;
|
|
|
+ @ApolloJsonValue("${crawlerImgPathList:[]}")
|
|
|
+ private List<String> crawlerImgPathList;
|
|
|
|
|
|
@Autowired
|
|
|
AigcService aigcService;
|
|
|
@@ -55,23 +58,16 @@ public class CardServiceImpl implements CardService {
|
|
|
@Autowired
|
|
|
private MatchService matchService;
|
|
|
|
|
|
- private static final List<String> crawlerImgPathList = new ArrayList<String>() {{
|
|
|
- add("20250208065525959973866");
|
|
|
- add("20250208111811026884434");
|
|
|
- add("20250212125646224172850");
|
|
|
- add("20250213023808593788754");
|
|
|
- add("20250213091337867990118");
|
|
|
- add("20250214091843879629665");
|
|
|
- add("20250214122110960857913");
|
|
|
- add("20250217080347557694800");
|
|
|
- add("20250217120153840400833");
|
|
|
- add("20250304073234245880032");
|
|
|
- }};
|
|
|
-
|
|
|
- private static final List<String> useSmallPlayImgPathList = new ArrayList<String>();
|
|
|
+ @Autowired
|
|
|
+ private VideoMultiService videoMultiService;
|
|
|
|
|
|
|
|
|
- public JSONObject createGzhPath(String videoId, String sharedUid, String ghId, Integer miniProgramType, Integer index) throws UnsupportedEncodingException {
|
|
|
+ public JSONObject createGzhPath(String videoId,
|
|
|
+ String sharedUid,
|
|
|
+ String ghId,
|
|
|
+ Integer miniProgramType,
|
|
|
+ Integer index,
|
|
|
+ PublishMiniprogram publishMiniprogram) throws UnsupportedEncodingException {
|
|
|
String rootShareId = UUID.randomUUID().toString();
|
|
|
String rootSourceId;
|
|
|
switch (miniProgramType) {
|
|
|
@@ -111,6 +107,8 @@ public class CardServiceImpl implements CardService {
|
|
|
String url = String.format("pages/user-videos?id=%s&su=%s&fromGzh=1&rootShareId=%s&shareId=%s&rootSourceId=%s",
|
|
|
videoId, sharedUid, rootShareId, rootShareId, rootSourceId);
|
|
|
String productionPath = String.format("pages/category?jumpPage=%s", URLEncoder.encode(url, StandardCharsets.UTF_8.toString()));
|
|
|
+ productionPath = videoMultiService.setVideoMultiTitleCoverPagePath(Long.valueOf(videoId), productionPath,
|
|
|
+ publishMiniprogram.getVideoTitle(), publishMiniprogram.getVideoCover());
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
jsonObject.put("rootShareId", rootShareId);
|
|
|
jsonObject.put("rootSourceId", rootSourceId);
|
|
|
@@ -150,7 +148,6 @@ public class CardServiceImpl implements CardService {
|
|
|
|
|
|
String videoId = videoDetail.getVideoId();
|
|
|
String uid = videoDetail.getUid();
|
|
|
- JSONObject jsonObject = createGzhPath(videoId, uid, planAccount.getGhId(), planAccount.getMiniprogramUseType(), index);
|
|
|
|
|
|
PublishMiniprogram publishMiniprogram = new PublishMiniprogram();
|
|
|
publishMiniprogram.setContentId(publishContent.getId());
|
|
|
@@ -178,14 +175,16 @@ public class CardServiceImpl implements CardService {
|
|
|
publishMiniprogram.setVideoCover(videoDetail.getCoverImgPath());
|
|
|
}
|
|
|
publishMiniprogram.setVideoPath(videoDetail.getVideoPath());
|
|
|
- publishMiniprogram.setProductionPath(jsonObject.getString("productionPath"));
|
|
|
- publishMiniprogram.setRootSourceId(jsonObject.getString("rootSourceId"));
|
|
|
- publishMiniprogram.setRootShareId(jsonObject.getString("rootShareId"));
|
|
|
publishMiniprogram.setIndex(index);
|
|
|
publishMiniprogram.setTraceId(videoDetail.getTraceId());
|
|
|
publishMiniprogram.setCrawlerVideoId(videoDetail.getCrawlerVideoId());
|
|
|
publishMiniprogram.setVideoOssPath(videoDetail.getVideoOss());
|
|
|
publishMiniprogram.setUserId(videoDetail.getUid());
|
|
|
+
|
|
|
+ JSONObject jsonObject = createGzhPath(videoId, uid, planAccount.getGhId(), planAccount.getMiniprogramUseType(), index, publishMiniprogram);
|
|
|
+ publishMiniprogram.setProductionPath(jsonObject.getString("productionPath"));
|
|
|
+ publishMiniprogram.setRootSourceId(jsonObject.getString("rootSourceId"));
|
|
|
+ publishMiniprogram.setRootShareId(jsonObject.getString("rootShareId"));
|
|
|
return publishMiniprogram;
|
|
|
}
|
|
|
|