Explorar el Código

实验ID扩展字段

wangyunpeng hace 1 día
padre
commit
e49c9b12bc
Se han modificado 16 ficheros con 168 adiciones y 131 borrados
  1. 9 5
      api-module/src/main/java/com/tzld/piaoquan/api/component/TouLiuHttpClient.java
  2. 1 0
      api-module/src/main/java/com/tzld/piaoquan/api/model/dto/PageUrlExtData.java
  3. 1 1
      api-module/src/main/java/com/tzld/piaoquan/api/model/param/contentplatform/GzhPlanVideoContentItemParam.java
  4. 1 1
      api-module/src/main/java/com/tzld/piaoquan/api/model/param/contentplatform/QwPlanSaveVideoParam.java
  5. 6 6
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformGzhPlanVideo.java
  6. 28 28
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformGzhPlanVideoExample.java
  7. 6 6
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformQwPlanVideo.java
  8. 28 28
      api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformQwPlanVideoExample.java
  9. 8 8
      api-module/src/main/java/com/tzld/piaoquan/api/service/contentplatform/impl/ContentPlatformPlanServiceImpl.java
  10. 3 3
      api-module/src/main/java/com/tzld/piaoquan/api/service/impl/GhDetailServiceImpl.java
  11. 21 1
      api-module/src/main/java/com/tzld/piaoquan/api/service/impl/VideoMultiServiceImpl.java
  12. 1 1
      api-module/src/main/java/com/tzld/piaoquan/api/service/strategy/impl/ThirdPartyPushMessageStrategyV1.java
  13. 14 14
      api-module/src/main/resources/mapper/contentplatform/ContentPlatformGzhPlanVideoMapper.xml
  14. 14 14
      api-module/src/main/resources/mapper/contentplatform/ContentPlatformQwPlanVideoMapper.xml
  15. 24 12
      common-module/src/main/java/com/tzld/piaoquan/growth/common/service/Impl/MessageAttachmentServiceImpl.java
  16. 3 3
      common-module/src/main/java/com/tzld/piaoquan/growth/common/service/MessageAttachmentService.java

+ 9 - 5
api-module/src/main/java/com/tzld/piaoquan/api/component/TouLiuHttpClient.java

@@ -31,11 +31,15 @@ public class TouLiuHttpClient {
                                        String putTypeTwo,
                                        String putTypeThree,
                                        String putCarrierId,
-                                       String testId) {
+                                       String experimentId) {
         String url = baseUrl + "/ad/put/flow/add/tencent";
         UUID uuid = UUID.randomUUID();
-        String testIdParam = (testId != null && !testId.isEmpty()) ? "&testId=" + testId : "";
-        String testIdField = (testId != null && !testId.isEmpty()) ? "\"testId\":\"" + testId + "\"," : "";
+        String experimentIdParam = (experimentId != null && !experimentId.isEmpty()) ? "&experimentId=" + experimentId : "";
+        String growthExtDataParam = "";
+        if (experimentId != null && !experimentId.isEmpty()) {
+            growthExtDataParam = "&growthExtData={\"experimentId\":\"" + experimentId + "\"}";
+        }
+        String experimentIdField = (experimentId != null && !experimentId.isEmpty()) ? "\"experimentId\":\"" + experimentId + "\"," : "";
         String jsonBody = "{" +
                 "\"videoId\":\"" + videoId + "\"," +
                 "\"putScene\":\"" + putScene + "\"," +
@@ -45,10 +49,10 @@ public class TouLiuHttpClient {
                 "\"putTypeTwo\":\"" + putTypeTwo + "\"," +
                 "\"putTypeThree\":\"" + putTypeThree + "\"," +
                 "\"putCarrierId\":\"" + putCarrierId + "\"," +
-                testIdField +
+                experimentIdField +
                 "\"path\":\"" + "pages/category" + "\"," +
                 "\"requestParam\":{" +
-                "\"jumpPage\":\"" + "pages/user-videos?fromGzh=1&rootShareId=" + uuid + "&id=" + videoId + "&shareId=" + uuid + "&rootSourceId=[rootSourceId]" + testIdParam + "\"" +
+                "\"jumpPage\":\"" + "pages/user-videos?fromGzh=1&rootShareId=" + uuid + "&id=" + videoId + "&shareId=" + uuid + "&rootSourceId=[rootSourceId]" + experimentIdParam + growthExtDataParam + "\"" +
                 "}" +
                 "}";
         try {

+ 1 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/dto/PageUrlExtData.java

@@ -8,4 +8,5 @@ public class PageUrlExtData {
     private String growthTitleSource;
     private Long growthCoverId;
     private String growthCoverSource;
+    private String experimentId;
 }

+ 1 - 1
api-module/src/main/java/com/tzld/piaoquan/api/model/param/contentplatform/GzhPlanVideoContentItemParam.java

@@ -31,5 +31,5 @@ public class GzhPlanVideoContentItemParam {
     private Double score;
 
     @ApiModelProperty(value = "匹配实验id")
-    private String matchExperimentId;
+    private String experimentId;
 }

+ 1 - 1
api-module/src/main/java/com/tzld/piaoquan/api/model/param/contentplatform/QwPlanSaveVideoParam.java

@@ -22,6 +22,6 @@ public class QwPlanSaveVideoParam {
     private Integer scene;
 
     @ApiModelProperty(value = "匹配实验id")
-    private String matchExperimentId;
+    private String experimentId;
 
 }

+ 6 - 6
api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformGzhPlanVideo.java

@@ -27,7 +27,7 @@ public class ContentPlatformGzhPlanVideo {
 
     private String rootSourceId;
 
-    private String matchExperimentId;
+    private String experimentId;
 
     private Integer status;
 
@@ -139,12 +139,12 @@ public class ContentPlatformGzhPlanVideo {
         this.rootSourceId = rootSourceId;
     }
 
-    public String getMatchExperimentId() {
-        return matchExperimentId;
+    public String getExperimentId() {
+        return experimentId;
     }
 
-    public void setMatchExperimentId(String matchExperimentId) {
-        this.matchExperimentId = matchExperimentId;
+    public void setExperimentId(String experimentId) {
+        this.experimentId = experimentId;
     }
 
     public Integer getStatus() {
@@ -190,7 +190,7 @@ public class ContentPlatformGzhPlanVideo {
         sb.append(", video=").append(video);
         sb.append(", pageUrl=").append(pageUrl);
         sb.append(", rootSourceId=").append(rootSourceId);
-        sb.append(", matchExperimentId=").append(matchExperimentId);
+        sb.append(", experimentId=").append(experimentId);
         sb.append(", status=").append(status);
         sb.append(", createAccountId=").append(createAccountId);
         sb.append(", createTimestamp=").append(createTimestamp);

+ 28 - 28
api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformGzhPlanVideoExample.java

@@ -965,73 +965,73 @@ public class ContentPlatformGzhPlanVideoExample {
             return (Criteria) this;
         }
 
-        public Criteria andMatchExperimentIdIsNull() {
-            addCriterion("match_experiment_id is null");
+        public Criteria andExperimentIdIsNull() {
+            addCriterion("experiment_id is null");
             return (Criteria) this;
         }
 
-        public Criteria andMatchExperimentIdIsNotNull() {
-            addCriterion("match_experiment_id is not null");
+        public Criteria andExperimentIdIsNotNull() {
+            addCriterion("experiment_id is not null");
             return (Criteria) this;
         }
 
-        public Criteria andMatchExperimentIdEqualTo(String value) {
-            addCriterion("match_experiment_id =", value, "matchExperimentId");
+        public Criteria andExperimentIdEqualTo(String value) {
+            addCriterion("experiment_id =", value, "experimentId");
             return (Criteria) this;
         }
 
-        public Criteria andMatchExperimentIdNotEqualTo(String value) {
-            addCriterion("match_experiment_id <>", value, "matchExperimentId");
+        public Criteria andExperimentIdNotEqualTo(String value) {
+            addCriterion("experiment_id <>", value, "experimentId");
             return (Criteria) this;
         }
 
-        public Criteria andMatchExperimentIdGreaterThan(String value) {
-            addCriterion("match_experiment_id >", value, "matchExperimentId");
+        public Criteria andExperimentIdGreaterThan(String value) {
+            addCriterion("experiment_id >", value, "experimentId");
             return (Criteria) this;
         }
 
-        public Criteria andMatchExperimentIdGreaterThanOrEqualTo(String value) {
-            addCriterion("match_experiment_id >=", value, "matchExperimentId");
+        public Criteria andExperimentIdGreaterThanOrEqualTo(String value) {
+            addCriterion("experiment_id >=", value, "experimentId");
             return (Criteria) this;
         }
 
-        public Criteria andMatchExperimentIdLessThan(String value) {
-            addCriterion("match_experiment_id <", value, "matchExperimentId");
+        public Criteria andExperimentIdLessThan(String value) {
+            addCriterion("experiment_id <", value, "experimentId");
             return (Criteria) this;
         }
 
-        public Criteria andMatchExperimentIdLessThanOrEqualTo(String value) {
-            addCriterion("match_experiment_id <=", value, "matchExperimentId");
+        public Criteria andExperimentIdLessThanOrEqualTo(String value) {
+            addCriterion("experiment_id <=", value, "experimentId");
             return (Criteria) this;
         }
 
-        public Criteria andMatchExperimentIdLike(String value) {
-            addCriterion("match_experiment_id like", value, "matchExperimentId");
+        public Criteria andExperimentIdLike(String value) {
+            addCriterion("experiment_id like", value, "experimentId");
             return (Criteria) this;
         }
 
-        public Criteria andMatchExperimentIdNotLike(String value) {
-            addCriterion("match_experiment_id not like", value, "matchExperimentId");
+        public Criteria andExperimentIdNotLike(String value) {
+            addCriterion("experiment_id not like", value, "experimentId");
             return (Criteria) this;
         }
 
-        public Criteria andMatchExperimentIdIn(List<String> values) {
-            addCriterion("match_experiment_id in", values, "matchExperimentId");
+        public Criteria andExperimentIdIn(List<String> values) {
+            addCriterion("experiment_id in", values, "experimentId");
             return (Criteria) this;
         }
 
-        public Criteria andMatchExperimentIdNotIn(List<String> values) {
-            addCriterion("match_experiment_id not in", values, "matchExperimentId");
+        public Criteria andExperimentIdNotIn(List<String> values) {
+            addCriterion("experiment_id not in", values, "experimentId");
             return (Criteria) this;
         }
 
-        public Criteria andMatchExperimentIdBetween(String value1, String value2) {
-            addCriterion("match_experiment_id between", value1, value2, "matchExperimentId");
+        public Criteria andExperimentIdBetween(String value1, String value2) {
+            addCriterion("experiment_id between", value1, value2, "experimentId");
             return (Criteria) this;
         }
 
-        public Criteria andMatchExperimentIdNotBetween(String value1, String value2) {
-            addCriterion("match_experiment_id not between", value1, value2, "matchExperimentId");
+        public Criteria andExperimentIdNotBetween(String value1, String value2) {
+            addCriterion("experiment_id not between", value1, value2, "experimentId");
             return (Criteria) this;
         }
 

+ 6 - 6
api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformQwPlanVideo.java

@@ -13,7 +13,7 @@ public class ContentPlatformQwPlanVideo {
 
     private String video;
 
-    private String matchExperimentId;
+    private String experimentId;
 
     private Integer status;
 
@@ -69,12 +69,12 @@ public class ContentPlatformQwPlanVideo {
         this.video = video;
     }
 
-    public String getMatchExperimentId() {
-        return matchExperimentId;
+    public String getExperimentId() {
+        return experimentId;
     }
 
-    public void setMatchExperimentId(String matchExperimentId) {
-        this.matchExperimentId = matchExperimentId;
+    public void setExperimentId(String experimentId) {
+        this.experimentId = experimentId;
     }
 
     public Integer getStatus() {
@@ -113,7 +113,7 @@ public class ContentPlatformQwPlanVideo {
         sb.append(", title=").append(title);
         sb.append(", cover=").append(cover);
         sb.append(", video=").append(video);
-        sb.append(", matchExperimentId=").append(matchExperimentId);
+        sb.append(", experimentId=").append(experimentId);
         sb.append(", status=").append(status);
         sb.append(", createAccountId=").append(createAccountId);
         sb.append(", createTimestamp=").append(createTimestamp);

+ 28 - 28
api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformQwPlanVideoExample.java

@@ -505,73 +505,73 @@ public class ContentPlatformQwPlanVideoExample {
             return (Criteria) this;
         }
 
-        public Criteria andMatchExperimentIdIsNull() {
-            addCriterion("match_experiment_id is null");
+        public Criteria andExperimentIdIsNull() {
+            addCriterion("experiment_id is null");
             return (Criteria) this;
         }
 
-        public Criteria andMatchExperimentIdIsNotNull() {
-            addCriterion("match_experiment_id is not null");
+        public Criteria andExperimentIdIsNotNull() {
+            addCriterion("experiment_id is not null");
             return (Criteria) this;
         }
 
-        public Criteria andMatchExperimentIdEqualTo(String value) {
-            addCriterion("match_experiment_id =", value, "matchExperimentId");
+        public Criteria andExperimentIdEqualTo(String value) {
+            addCriterion("experiment_id =", value, "experimentId");
             return (Criteria) this;
         }
 
-        public Criteria andMatchExperimentIdNotEqualTo(String value) {
-            addCriterion("match_experiment_id <>", value, "matchExperimentId");
+        public Criteria andExperimentIdNotEqualTo(String value) {
+            addCriterion("experiment_id <>", value, "experimentId");
             return (Criteria) this;
         }
 
-        public Criteria andMatchExperimentIdGreaterThan(String value) {
-            addCriterion("match_experiment_id >", value, "matchExperimentId");
+        public Criteria andExperimentIdGreaterThan(String value) {
+            addCriterion("experiment_id >", value, "experimentId");
             return (Criteria) this;
         }
 
-        public Criteria andMatchExperimentIdGreaterThanOrEqualTo(String value) {
-            addCriterion("match_experiment_id >=", value, "matchExperimentId");
+        public Criteria andExperimentIdGreaterThanOrEqualTo(String value) {
+            addCriterion("experiment_id >=", value, "experimentId");
             return (Criteria) this;
         }
 
-        public Criteria andMatchExperimentIdLessThan(String value) {
-            addCriterion("match_experiment_id <", value, "matchExperimentId");
+        public Criteria andExperimentIdLessThan(String value) {
+            addCriterion("experiment_id <", value, "experimentId");
             return (Criteria) this;
         }
 
-        public Criteria andMatchExperimentIdLessThanOrEqualTo(String value) {
-            addCriterion("match_experiment_id <=", value, "matchExperimentId");
+        public Criteria andExperimentIdLessThanOrEqualTo(String value) {
+            addCriterion("experiment_id <=", value, "experimentId");
             return (Criteria) this;
         }
 
-        public Criteria andMatchExperimentIdLike(String value) {
-            addCriterion("match_experiment_id like", value, "matchExperimentId");
+        public Criteria andExperimentIdLike(String value) {
+            addCriterion("experiment_id like", value, "experimentId");
             return (Criteria) this;
         }
 
-        public Criteria andMatchExperimentIdNotLike(String value) {
-            addCriterion("match_experiment_id not like", value, "matchExperimentId");
+        public Criteria andExperimentIdNotLike(String value) {
+            addCriterion("experiment_id not like", value, "experimentId");
             return (Criteria) this;
         }
 
-        public Criteria andMatchExperimentIdIn(List<String> values) {
-            addCriterion("match_experiment_id in", values, "matchExperimentId");
+        public Criteria andExperimentIdIn(List<String> values) {
+            addCriterion("experiment_id in", values, "experimentId");
             return (Criteria) this;
         }
 
-        public Criteria andMatchExperimentIdNotIn(List<String> values) {
-            addCriterion("match_experiment_id not in", values, "matchExperimentId");
+        public Criteria andExperimentIdNotIn(List<String> values) {
+            addCriterion("experiment_id not in", values, "experimentId");
             return (Criteria) this;
         }
 
-        public Criteria andMatchExperimentIdBetween(String value1, String value2) {
-            addCriterion("match_experiment_id between", value1, value2, "matchExperimentId");
+        public Criteria andExperimentIdBetween(String value1, String value2) {
+            addCriterion("experiment_id between", value1, value2, "experimentId");
             return (Criteria) this;
         }
 
-        public Criteria andMatchExperimentIdNotBetween(String value1, String value2) {
-            addCriterion("match_experiment_id not between", value1, value2, "matchExperimentId");
+        public Criteria andExperimentIdNotBetween(String value1, String value2) {
+            addCriterion("experiment_id not between", value1, value2, "experimentId");
             return (Criteria) this;
         }
 

+ 8 - 8
api-module/src/main/java/com/tzld/piaoquan/api/service/contentplatform/impl/ContentPlatformPlanServiceImpl.java

@@ -338,8 +338,8 @@ public class ContentPlatformPlanServiceImpl implements ContentPlatformPlanServic
             updateCgiReplyBucketData(account.getGhId());
             // 更新gh_detail
             Map<Long, String> videoIdTestIdMap = param.getVideoList().stream()
-                    .filter(o -> StringUtils.hasText(o.getMatchExperimentId()))
-                    .collect(Collectors.toMap(GzhPlanVideoContentItemParam::getVideoId, GzhPlanVideoContentItemParam::getMatchExperimentId));
+                    .filter(o -> StringUtils.hasText(o.getExperimentId()))
+                    .collect(Collectors.toMap(GzhPlanVideoContentItemParam::getVideoId, GzhPlanVideoContentItemParam::getExperimentId));
             updateGhDetail(account, param.getSelectVideoType(), videoIds, videoIdTestIdMap);
         }
         // 调用aigc重新拉取视频
@@ -386,7 +386,7 @@ public class ContentPlatformPlanServiceImpl implements ContentPlatformPlanServic
                 item.setCustomCoverType(vo.getCustomCoverType());
                 // 上报多标题封面
                 item.setPageUrl(setMultiTitleCoverPagePath(item));
-                item.setMatchExperimentId(vo.getMatchExperimentId());
+                item.setExperimentId(vo.getExperimentId());
                 if (StringUtils.hasText(item.getPageUrl())) {
                     String rootSourceId = MessageUtil.getRootSourceId(item.getPageUrl());
                     if (StringUtils.hasText(rootSourceId)) {
@@ -406,20 +406,20 @@ public class ContentPlatformPlanServiceImpl implements ContentPlatformPlanServic
                 item.setVideo(vo.getVideo());
                 if (param.getType() == ContentPlatformGzhPlanTypeEnum.FWH_PUSH.getVal()) {
                     String response = touLiuHttpClient.sendAdFlowAddRequest(GET_SMALL_PAGE_URL, String.valueOf(vo.getVideoId()), "fwhdyy",
-                            loginAccount.getChannel(), "自动", "公众号", "文章插小程序", "文字和小程序", account.getGhId(), vo.getMatchExperimentId());
+                            loginAccount.getChannel(), "自动", "公众号", "文章插小程序", "文字和小程序", account.getGhId(), vo.getExperimentId());
                     JSONObject json = JSONObject.parseObject(response);
                     SmallPageUrlDetail smallPageUrlDetail = json.getJSONObject("data").toJavaObject(SmallPageUrlDetail.class);
                     item.setPageUrl(smallPageUrlDetail.getUrl());
                 } else if (param.getType() == ContentPlatformGzhPlanTypeEnum.GZH_PUSH.getVal()) {
                     String response = touLiuHttpClient.sendAdFlowAddRequest(GET_SMALL_PAGE_URL, String.valueOf(vo.getVideoId()), "longArticles_outer",
-                            loginAccount.getChannel(), "自动", "公众号", "文章插小程序", "小程序", account.getGhId(), vo.getMatchExperimentId());
+                            loginAccount.getChannel(), "自动", "公众号", "文章插小程序", "小程序", account.getGhId(), vo.getExperimentId());
                     JSONObject json = JSONObject.parseObject(response);
                     SmallPageUrlDetail smallPageUrlDetail = json.getJSONObject("data").toJavaObject(SmallPageUrlDetail.class);
                     item.setPageUrl(smallPageUrlDetail.getUrl());
                 }
                 // 上报多标题封面
                 item.setPageUrl(setMultiTitleCoverPagePath(item));
-                item.setMatchExperimentId(vo.getMatchExperimentId());
+                item.setExperimentId(vo.getExperimentId());
                 if (StringUtils.hasText(item.getPageUrl())) {
                     String rootSourceId = MessageUtil.getRootSourceId(item.getPageUrl());
                     if (StringUtils.hasText(rootSourceId)) {
@@ -1037,7 +1037,7 @@ public class ContentPlatformPlanServiceImpl implements ContentPlatformPlanServic
             String carrierId = StringUtils.hasText(param.getSubChannel()) ? param.getSubChannel() : "wxbdd2a2e93d9a6e25";
             String pageUrl = messageAttachmentService.getPage(loginUser.getChannel(), carrierId,
                     "dyyqw", "企微", QwPlanTypeEnum.from(param.getType()).getDescription(),
-                    "位置1", videoParam.getVideoId(), videoParam.getMatchExperimentId());
+                    "位置1", videoParam.getVideoId(), videoParam.getExperimentId());
             //pageUrl = videoMultiService.setVideoMultiTitleCoverPagePath(videoParam.getVideoId(), pageUrl,
             //        videoParam.getTitle(), videoParam.getCover());
             String rootSourceId = MessageUtil.getRootSourceId(pageUrl);
@@ -1061,7 +1061,7 @@ public class ContentPlatformPlanServiceImpl implements ContentPlatformPlanServic
         item.setTitle(videoParam.getTitle());
         item.setCover(videoParam.getCover());
         item.setVideo(videoParam.getVideo());
-        item.setMatchExperimentId(videoParam.getMatchExperimentId());
+        item.setExperimentId(videoParam.getExperimentId());
         item.setCreateAccountId(loginAccountId);
         item.setCreateTimestamp(System.currentTimeMillis());
         qwPlanVideoMapper.insertSelective(item);

+ 3 - 3
api-module/src/main/java/com/tzld/piaoquan/api/service/impl/GhDetailServiceImpl.java

@@ -268,7 +268,7 @@ public class GhDetailServiceImpl implements GhDetailService {
         }
     }
 
-    private String getVideoPageUrl(Long videoId, String channel, String ghId, Integer sort, Integer accountType, String testId) {
+    private String getVideoPageUrl(Long videoId, String channel, String ghId, Integer sort, Integer accountType, String experimentId) {
         // 查询库里是否存在,如果存在即复用
         try {
             CgiReplyBucketDataExample cgiReplyBucketDataExample = new CgiReplyBucketDataExample();
@@ -292,10 +292,10 @@ public class GhDetailServiceImpl implements GhDetailService {
                     }
                 }
                 response = touLiuHttpClient.sendAdFlowAddRequest(GET_SMALL_PAGE_URL, String.valueOf(videoId), putScene,
-                        channel, "自动", "公众号", "自动回复小程序", "位置" + sort, ghId, testId);
+                        channel, "自动", "公众号", "自动回复小程序", "位置" + sort, ghId, experimentId);
             } else {
                 response = touLiuHttpClient.sendAdFlowAddRequest(GET_SMALL_PAGE_URL, String.valueOf(videoId), "dyyjs",
-                        channel, "自动", "公众号", "自动回复小程序", "位置" + sort, ghId, testId);
+                        channel, "自动", "公众号", "自动回复小程序", "位置" + sort, ghId, experimentId);
             }
             JSONObject jsonObject = JSON.parseObject(response);
             if (jsonObject != null && jsonObject.containsKey("data")) {

+ 21 - 1
api-module/src/main/java/com/tzld/piaoquan/api/service/impl/VideoMultiServiceImpl.java

@@ -36,8 +36,28 @@ public class VideoMultiServiceImpl implements VideoMultiService {
 
     @Override
     public String setVideoMultiTitleCoverPagePath(Long videoId, String pageUrl, String title, String coverUrl) {
+        // 解析已有的growthExtData,判断是否已包含对应字段
         if (pageUrl.contains("growthExtData")) {
-            return pageUrl;
+            try {
+                String decoded = java.net.URLDecoder.decode(pageUrl, "UTF-8");
+                int idx = decoded.indexOf("growthExtData=");
+                if (idx >= 0) {
+                    String jsonStr = decoded.substring(idx + "growthExtData=".length());
+                    // 截取到下一个&或结尾,避免后续参数干扰JSON解析
+                    int ampIdx = jsonStr.indexOf("&");
+                    if (ampIdx >= 0) {
+                        jsonStr = jsonStr.substring(0, ampIdx);
+                    }
+                    JSONObject existingData = JSONObject.parseObject(jsonStr);
+                    if (existingData != null
+                            && existingData.containsKey("growthTitleId")
+                            && existingData.containsKey("growthCoverId")) {
+                        return pageUrl;
+                    }
+                }
+            } catch (Exception e) {
+                log.error("VideoMultiService parse existing growthExtData error", e);
+            }
         }
         List<VideoGrowthMultiTitle> multiTitleList = getMultiTitleByVideoId(videoId);
         List<VideoGrowthMultiCover> multiCoverList = getMultiCoverByVideoId(videoId);

+ 1 - 1
api-module/src/main/java/com/tzld/piaoquan/api/service/strategy/impl/ThirdPartyPushMessageStrategyV1.java

@@ -434,7 +434,7 @@ public class ThirdPartyPushMessageStrategyV1 implements ReplyStrategyService {
                                 }
                                 cgiReplyBucketData.setCoverUrl(cover + coverSuffix);
                             }
-                            videoTestIdMap.put(gzhPlanVideo.getVideoId(), gzhPlanVideo.getMatchExperimentId());
+                            videoTestIdMap.put(gzhPlanVideo.getVideoId(), gzhPlanVideo.getExperimentId());
                         } else {
                             if (videoDetail != null && StringUtils.isNotEmpty(videoDetail.getCover())) {
                                 cgiReplyBucketData.setCoverUrl(videoDetail.getCover());

+ 14 - 14
api-module/src/main/resources/mapper/contentplatform/ContentPlatformGzhPlanVideoMapper.xml

@@ -15,7 +15,7 @@
     <result column="video" jdbcType="VARCHAR" property="video" />
     <result column="page_url" jdbcType="VARCHAR" property="pageUrl" />
     <result column="root_source_id" jdbcType="VARCHAR" property="rootSourceId" />
-    <result column="match_experiment_id" jdbcType="VARCHAR" property="matchExperimentId" />
+    <result column="experiment_id" jdbcType="VARCHAR" property="experimentId" />
     <result column="status" jdbcType="INTEGER" property="status" />
     <result column="create_account_id" jdbcType="BIGINT" property="createAccountId" />
     <result column="create_timestamp" jdbcType="BIGINT" property="createTimestamp" />
@@ -80,7 +80,7 @@
   </sql>
   <sql id="Base_Column_List">
     id, plan_id, video_id, title, custom_title_id, custom_title, cover, custom_cover_id, 
-    custom_cover, custom_cover_type, video, page_url, root_source_id, match_experiment_id, 
+    custom_cover, custom_cover_type, video, page_url, root_source_id, experiment_id, 
     `status`, create_account_id, create_timestamp
   </sql>
   <select id="selectByExample" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformGzhPlanVideoExample" resultMap="BaseResultMap">
@@ -121,13 +121,13 @@
       title, custom_title_id, custom_title, 
       cover, custom_cover_id, custom_cover, 
       custom_cover_type, video, page_url, 
-      root_source_id, match_experiment_id, `status`, 
+      root_source_id, experiment_id, `status`, 
       create_account_id, create_timestamp)
     values (#{id,jdbcType=BIGINT}, #{planId,jdbcType=BIGINT}, #{videoId,jdbcType=BIGINT}, 
       #{title,jdbcType=VARCHAR}, #{customTitleId,jdbcType=BIGINT}, #{customTitle,jdbcType=VARCHAR}, 
       #{cover,jdbcType=VARCHAR}, #{customCoverId,jdbcType=BIGINT}, #{customCover,jdbcType=VARCHAR}, 
       #{customCoverType,jdbcType=INTEGER}, #{video,jdbcType=VARCHAR}, #{pageUrl,jdbcType=VARCHAR}, 
-      #{rootSourceId,jdbcType=VARCHAR}, #{matchExperimentId,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, 
+      #{rootSourceId,jdbcType=VARCHAR}, #{experimentId,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, 
       #{createAccountId,jdbcType=BIGINT}, #{createTimestamp,jdbcType=BIGINT})
   </insert>
   <insert id="insertSelective" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformGzhPlanVideo">
@@ -172,8 +172,8 @@
       <if test="rootSourceId != null">
         root_source_id,
       </if>
-      <if test="matchExperimentId != null">
-        match_experiment_id,
+      <if test="experimentId != null">
+        experiment_id,
       </if>
       <if test="status != null">
         `status`,
@@ -225,8 +225,8 @@
       <if test="rootSourceId != null">
         #{rootSourceId,jdbcType=VARCHAR},
       </if>
-      <if test="matchExperimentId != null">
-        #{matchExperimentId,jdbcType=VARCHAR},
+      <if test="experimentId != null">
+        #{experimentId,jdbcType=VARCHAR},
       </if>
       <if test="status != null">
         #{status,jdbcType=INTEGER},
@@ -287,8 +287,8 @@
       <if test="record.rootSourceId != null">
         root_source_id = #{record.rootSourceId,jdbcType=VARCHAR},
       </if>
-      <if test="record.matchExperimentId != null">
-        match_experiment_id = #{record.matchExperimentId,jdbcType=VARCHAR},
+      <if test="record.experimentId != null">
+        experiment_id = #{record.experimentId,jdbcType=VARCHAR},
       </if>
       <if test="record.status != null">
         `status` = #{record.status,jdbcType=INTEGER},
@@ -319,7 +319,7 @@
       video = #{record.video,jdbcType=VARCHAR},
       page_url = #{record.pageUrl,jdbcType=VARCHAR},
       root_source_id = #{record.rootSourceId,jdbcType=VARCHAR},
-      match_experiment_id = #{record.matchExperimentId,jdbcType=VARCHAR},
+      experiment_id = #{record.experimentId,jdbcType=VARCHAR},
       `status` = #{record.status,jdbcType=INTEGER},
       create_account_id = #{record.createAccountId,jdbcType=BIGINT},
       create_timestamp = #{record.createTimestamp,jdbcType=BIGINT}
@@ -366,8 +366,8 @@
       <if test="rootSourceId != null">
         root_source_id = #{rootSourceId,jdbcType=VARCHAR},
       </if>
-      <if test="matchExperimentId != null">
-        match_experiment_id = #{matchExperimentId,jdbcType=VARCHAR},
+      <if test="experimentId != null">
+        experiment_id = #{experimentId,jdbcType=VARCHAR},
       </if>
       <if test="status != null">
         `status` = #{status,jdbcType=INTEGER},
@@ -395,7 +395,7 @@
       video = #{video,jdbcType=VARCHAR},
       page_url = #{pageUrl,jdbcType=VARCHAR},
       root_source_id = #{rootSourceId,jdbcType=VARCHAR},
-      match_experiment_id = #{matchExperimentId,jdbcType=VARCHAR},
+      experiment_id = #{experimentId,jdbcType=VARCHAR},
       `status` = #{status,jdbcType=INTEGER},
       create_account_id = #{createAccountId,jdbcType=BIGINT},
       create_timestamp = #{createTimestamp,jdbcType=BIGINT}

+ 14 - 14
api-module/src/main/resources/mapper/contentplatform/ContentPlatformQwPlanVideoMapper.xml

@@ -8,7 +8,7 @@
     <result column="title" jdbcType="VARCHAR" property="title" />
     <result column="cover" jdbcType="VARCHAR" property="cover" />
     <result column="video" jdbcType="VARCHAR" property="video" />
-    <result column="match_experiment_id" jdbcType="VARCHAR" property="matchExperimentId" />
+    <result column="experiment_id" jdbcType="VARCHAR" property="experimentId" />
     <result column="status" jdbcType="INTEGER" property="status" />
     <result column="create_account_id" jdbcType="BIGINT" property="createAccountId" />
     <result column="create_timestamp" jdbcType="BIGINT" property="createTimestamp" />
@@ -72,7 +72,7 @@
     </where>
   </sql>
   <sql id="Base_Column_List">
-    id, plan_id, video_id, title, cover, video, match_experiment_id, `status`, create_account_id, 
+    id, plan_id, video_id, title, cover, video, experiment_id, `status`, create_account_id, 
     create_timestamp
   </sql>
   <select id="selectByExample" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformQwPlanVideoExample" resultMap="BaseResultMap">
@@ -111,11 +111,11 @@
   <insert id="insert" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformQwPlanVideo">
     insert into content_platform_qw_plan_video (id, plan_id, video_id, 
       title, cover, video, 
-      match_experiment_id, `status`, create_account_id, 
+      experiment_id, `status`, create_account_id, 
       create_timestamp)
     values (#{id,jdbcType=BIGINT}, #{planId,jdbcType=BIGINT}, #{videoId,jdbcType=BIGINT}, 
       #{title,jdbcType=VARCHAR}, #{cover,jdbcType=VARCHAR}, #{video,jdbcType=VARCHAR}, 
-      #{matchExperimentId,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{createAccountId,jdbcType=BIGINT}, 
+      #{experimentId,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{createAccountId,jdbcType=BIGINT}, 
       #{createTimestamp,jdbcType=BIGINT})
   </insert>
   <insert id="insertSelective" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformQwPlanVideo">
@@ -139,8 +139,8 @@
       <if test="video != null">
         video,
       </if>
-      <if test="matchExperimentId != null">
-        match_experiment_id,
+      <if test="experimentId != null">
+        experiment_id,
       </if>
       <if test="status != null">
         `status`,
@@ -171,8 +171,8 @@
       <if test="video != null">
         #{video,jdbcType=VARCHAR},
       </if>
-      <if test="matchExperimentId != null">
-        #{matchExperimentId,jdbcType=VARCHAR},
+      <if test="experimentId != null">
+        #{experimentId,jdbcType=VARCHAR},
       </if>
       <if test="status != null">
         #{status,jdbcType=INTEGER},
@@ -212,8 +212,8 @@
       <if test="record.video != null">
         video = #{record.video,jdbcType=VARCHAR},
       </if>
-      <if test="record.matchExperimentId != null">
-        match_experiment_id = #{record.matchExperimentId,jdbcType=VARCHAR},
+      <if test="record.experimentId != null">
+        experiment_id = #{record.experimentId,jdbcType=VARCHAR},
       </if>
       <if test="record.status != null">
         `status` = #{record.status,jdbcType=INTEGER},
@@ -237,7 +237,7 @@
       title = #{record.title,jdbcType=VARCHAR},
       cover = #{record.cover,jdbcType=VARCHAR},
       video = #{record.video,jdbcType=VARCHAR},
-      match_experiment_id = #{record.matchExperimentId,jdbcType=VARCHAR},
+      experiment_id = #{record.experimentId,jdbcType=VARCHAR},
       `status` = #{record.status,jdbcType=INTEGER},
       create_account_id = #{record.createAccountId,jdbcType=BIGINT},
       create_timestamp = #{record.createTimestamp,jdbcType=BIGINT}
@@ -263,8 +263,8 @@
       <if test="video != null">
         video = #{video,jdbcType=VARCHAR},
       </if>
-      <if test="matchExperimentId != null">
-        match_experiment_id = #{matchExperimentId,jdbcType=VARCHAR},
+      <if test="experimentId != null">
+        experiment_id = #{experimentId,jdbcType=VARCHAR},
       </if>
       <if test="status != null">
         `status` = #{status,jdbcType=INTEGER},
@@ -285,7 +285,7 @@
       title = #{title,jdbcType=VARCHAR},
       cover = #{cover,jdbcType=VARCHAR},
       video = #{video,jdbcType=VARCHAR},
-      match_experiment_id = #{matchExperimentId,jdbcType=VARCHAR},
+      experiment_id = #{experimentId,jdbcType=VARCHAR},
       `status` = #{status,jdbcType=INTEGER},
       create_account_id = #{createAccountId,jdbcType=BIGINT},
       create_timestamp = #{createTimestamp,jdbcType=BIGINT}

+ 24 - 12
common-module/src/main/java/com/tzld/piaoquan/growth/common/service/Impl/MessageAttachmentServiceImpl.java

@@ -389,7 +389,7 @@ public class MessageAttachmentServiceImpl implements MessageAttachmentService {
     }
 
     @Override
-    public String getPage(String putScene, String channel, Staff staff, Long videoId, String typeOne, String typeTwo, String testId) {
+    public String getPage(String putScene, String channel, Staff staff, Long videoId, String typeOne, String typeTwo, String experimentId) {
         try {
             if (staff == null || staff.getCarrierId() == null) {
                 return "";
@@ -398,7 +398,7 @@ public class MessageAttachmentServiceImpl implements MessageAttachmentService {
             if (StringUtils.isNotEmpty(page)) {
                 return page;
             }
-            return insertPage(putScene, channel, staff.getCarrierId(), videoId, staff.getRemark(), typeOne, typeTwo, testId);
+            return insertPage(putScene, channel, staff.getCarrierId(), videoId, staff.getRemark(), typeOne, typeTwo, experimentId);
         } catch (IOException e) {
             log.error("MessageAttachmentService getPage error", e);
         }
@@ -406,19 +406,19 @@ public class MessageAttachmentServiceImpl implements MessageAttachmentService {
     }
 
     @Override
-    public String getPageNoCache(String putScene, String channel, Staff staff, Long videoId, String typeOne, String typeTwo, String testId) {
+    public String getPageNoCache(String putScene, String channel, Staff staff, Long videoId, String typeOne, String typeTwo, String experimentId) {
         try {
             if (staff == null || staff.getCarrierId() == null) {
                 return "";
             }
-            return insertPage(putScene, channel, staff.getCarrierId(), videoId, staff.getRemark(), typeOne, typeTwo, testId);
+            return insertPage(putScene, channel, staff.getCarrierId(), videoId, staff.getRemark(), typeOne, typeTwo, experimentId);
         } catch (IOException e) {
             log.error("MessageAttachmentService getPageNoCache error", e);
         }
         return null;
     }
 
-    private String insertPage(String putScene, String channel, String carrierId, Long videoId, String remark, String typeOne, String typeTwo, String testId) throws IOException {
+    private String insertPage(String putScene, String channel, String carrierId, Long videoId, String remark, String typeOne, String typeTwo, String experimentId) throws IOException {
         AdPutFlowParam param = new AdPutFlowParam();
         param.setChannel(channel);
         param.setPath("pages/category.html");
@@ -430,13 +430,19 @@ public class MessageAttachmentServiceImpl implements MessageAttachmentService {
         param.setPutTypeThree("位置X");
         param.setRemark(remark);
         param.setVideoId(videoId);
-        param.setTestId(testId);
+        param.setTestId(experimentId);
         Map<String, String> requestParam = new HashMap<>();
-        String testIdParam = (testId != null && !testId.isEmpty()) ? "&testId=" + testId : "";
+        String experimentIdParam = (experimentId != null && !experimentId.isEmpty()) ? "&experimentId=" + experimentId : "";
+        String growthExtDataParam = "";
+        if (experimentId != null && !experimentId.isEmpty()) {
+            JSONObject growthExtData = new JSONObject();
+            growthExtData.put("experimentId", experimentId);
+            growthExtDataParam = "&growthExtData=" + growthExtData.toJSONString();
+        }
         String jumpPage = "pages/user-videos?fromGzh=1&rootShareId=${uuid}&id=${videoId}&shareId=${uuid}&rootSourceId=[rootSourceId]"
                 .replace("${videoId}", "" + videoId)
                 .replace("${uuid}", "" + UUID.randomUUID())
-                + testIdParam;
+                + experimentIdParam + growthExtDataParam;
         requestParam.put("jumpPage", jumpPage);
         param.setRequestParam(requestParam);
         String res = httpPoolClient.post(POST_ADD_TENCENT, JSONObject.toJSONString(param));
@@ -498,7 +504,7 @@ public class MessageAttachmentServiceImpl implements MessageAttachmentService {
 
     @Override
     public String getPage(String channel, String carrierId, String scene, String putTypeOne,
-                          String putTypeTwo, String putTypeThree, Long videoId, String testId) {
+                          String putTypeTwo, String putTypeThree, Long videoId, String experimentId) {
         AdPutFlowParam param = new AdPutFlowParam();
         param.setChannel(channel);
         param.setPath("pages/category");
@@ -509,13 +515,19 @@ public class MessageAttachmentServiceImpl implements MessageAttachmentService {
         param.setPutTypeTwo(putTypeTwo);
         param.setPutTypeThree(putTypeThree);
         param.setVideoId(videoId);
-        param.setTestId(testId);
+        param.setTestId(experimentId);
         Map<String, String> requestParam = new HashMap<>();
-        String testIdParam = (testId != null && !testId.isEmpty()) ? "&testId=" + testId : "";
+        String experimentIdParam = (experimentId != null && !experimentId.isEmpty()) ? "&experimentId=" + experimentId : "";
+        String growthExtDataParam = "";
+        if (experimentId != null && !experimentId.isEmpty()) {
+            JSONObject growthExtData = new JSONObject();
+            growthExtData.put("experimentId", experimentId);
+            growthExtDataParam = "&growthExtData=" + growthExtData.toJSONString();
+        }
         String jumpPage = "pages/user-videos?fromGzh=1&rootShareId=${uuid}&id=${videoId}&shareId=${uuid}&rootSourceId=[rootSourceId]"
                 .replace("${videoId}", "" + videoId)
                 .replace("${uuid}", "" + UUID.randomUUID())
-                + testIdParam;
+                + experimentIdParam + growthExtDataParam;
         requestParam.put("jumpPage", jumpPage);
         param.setRequestParam(requestParam);
         try {

+ 3 - 3
common-module/src/main/java/com/tzld/piaoquan/growth/common/service/MessageAttachmentService.java

@@ -25,11 +25,11 @@ public interface MessageAttachmentService {
 
     String getPicMediaId(String cover, Long corpId, Long miniprogramVideoId);
 
-    String getPage(String putScene, String channel, Staff staff, Long videoId, String typeOne, String typeTwo, String testId);
+    String getPage(String putScene, String channel, Staff staff, Long videoId, String typeOne, String typeTwo, String experimentId);
 
-    String getPageNoCache(String putScene, String channel, Staff staff, Long videoId, String typeOne, String typeTwo, String testId);
+    String getPageNoCache(String putScene, String channel, Staff staff, Long videoId, String typeOne, String typeTwo, String experimentId);
 
-    String getPage(String channel, String carrierId, String scene, String putTypeOne, String putTypeTwo, String putTypeThree, Long videoId, String testId);
+    String getPage(String channel, String carrierId, String scene, String putTypeOne, String putTypeTwo, String putTypeThree, Long videoId, String experimentId);
 
     CommonResponse<Long> createAttachment(Integer type, MultipartFile file, String url, String picUrl, String page, String title, String desc, String appId, Integer extType);
 }