Просмотр исходного кода

Merge remote-tracking branch 'origin/master' into cooperation_video_candidate_pool_improved_lld_0509

刘立冬 19 часов назад
Родитель
Сommit
d656ad6789

+ 6 - 0
api-module/src/main/java/com/tzld/piaoquan/api/controller/contentplatform/ContentPlatformPlanController.java

@@ -100,6 +100,12 @@ public class ContentPlatformPlanController {
         return CommonResponse.success(planService.qwPlanList(param));
     }
 
+    @ApiOperation(value = "企微计划列表导出")
+    @PostMapping("/qw/export")
+    public CommonResponse<String> qwPlanExport(@RequestBody QwPlanListParam param) {
+        return CommonResponse.success(planService.qwPlanExport(param));
+    }
+
     @ApiOperation(value = "企微计划 创建/更新")
     @PostMapping("/qw/save")
     public CommonResponse<List<QwPlanItemVO>> qwPlanSave(@RequestBody QwPlanSaveParam param) {

+ 54 - 0
api-module/src/main/java/com/tzld/piaoquan/api/job/contentplatform/ContentPlatformDemandVideoJob.java

@@ -46,6 +46,9 @@ public class ContentPlatformDemandVideoJob {
     @ApolloJsonValue("${sync.channel.names:[\"公众号合作-即转-稳定\",\"群/企微合作-稳定\",\"公众号合作-Daily-自选\"]}")
     private List<String> syncChannelNames;
 
+    /** 默认记录所属 channel_name 标记,用于与正常渠道数据隔离,便于幂等清理 */
+    private static final String DEFAULT_RECORD_CHANNEL = "default";
+
     @XxlJob("syncContentPlatformDemandVideoJob")
     public ReturnT<String> syncContentPlatformDemandVideoJob(String param) {
         String dt = DateUtil.getBeforeDayDateString("yyyyMMdd");
@@ -63,10 +66,53 @@ public class ContentPlatformDemandVideoJob {
             }
         }
 
+        try {
+            insertDefaultRecords(dt);
+        } catch (Exception e) {
+            log.error("syncContentPlatformDemandVideoJob insertDefaultRecords error, dt={}", dt, e);
+            return ReturnT.FAIL;
+        }
+
         log.info("syncContentPlatformDemandVideoJob finish, dt={}", dt);
         return ReturnT.SUCCESS;
     }
 
+    /**
+     * 写入三条默认记录:仅含匹配实验id及三个匹配相关字段,其它字段为空。
+     * 用 channel_name=DEFAULT_RECORD_CHANNEL 与正常渠道数据隔离,先按 (dt, channel_name) 删除后批量插入,保证幂等。
+     */
+    private void insertDefaultRecords(String dt) {
+        Long now = System.currentTimeMillis();
+        List<ContentPlatformDemandVideo> defaults = new ArrayList<>();
+        defaults.add(buildDefaultRecord(dt, now,
+                "vector_search", "向量搜索", "相似度>=0.8", "视频综合得分(相似性|rov)倒序"));
+        defaults.add(buildDefaultRecord(dt, now,
+                "manager_search", "后台搜索", "关键词匹配", "--"));
+        defaults.add(buildDefaultRecord(dt, now,
+                "hot", "票圈热门", "--", "视频综合加权得分(rov*时间)倒序"));
+
+        demandVideoMapperExt.deleteByDtAndChannelName(dt, DEFAULT_RECORD_CHANNEL);
+        demandVideoMapperExt.batchInsert(defaults);
+        log.info("insertDefaultRecords success, dt={}, count={}", dt, defaults.size());
+    }
+
+    private ContentPlatformDemandVideo buildDefaultRecord(String dt, Long now,
+                                                          String matchExperimentId,
+                                                          String matchMethod,
+                                                          String matchVideoFilter,
+                                                          String matchSort) {
+        ContentPlatformDemandVideo record = new ContentPlatformDemandVideo();
+        record.setDt(dt);
+        record.setChannelName(DEFAULT_RECORD_CHANNEL);
+        record.setMatchExperimentId(matchExperimentId);
+        record.setMatchMethod(matchMethod);
+        record.setMatchVideoFilter(matchVideoFilter);
+        record.setMatchSort(matchSort);
+        record.setStatus(1);
+        record.setCreateTimestamp(now);
+        return record;
+    }
+
     private static final int PAGE_SIZE = 10000;
 
     private void syncByChannel(String dt, String syncChannelName) throws Exception {
@@ -140,6 +186,10 @@ public class ContentPlatformDemandVideoJob {
                 Double totalRov = demandItem.getDouble("totalRov");
                 String onlineAction = demandItem.getString("onlineAction");
                 String channelLevel3 = demandItem.getString("channelLevel3");
+                String matchMethod = demandItem.getString("matchMethod");
+                String matchVideoFilter = demandItem.getString("matchVideoFilter");
+                String matchSort = demandItem.getString("matchSort");
+                Double sceneSumRov = demandItem.getDouble("sceneSumRov");
 
                 JSONArray matchedVideos = demandItem.getJSONArray("matchedVideos");
                 if (matchedVideos == null || matchedVideos.isEmpty()) {
@@ -177,6 +227,10 @@ public class ContentPlatformDemandVideoJob {
                     demandVideo.setTotalRov(totalRov);
                     demandVideo.setOnlineAction(onlineAction != null ? onlineAction : "");
                     demandVideo.setChannelLevel3(channelLevel3 != null ? channelLevel3 : "");
+                    demandVideo.setMatchMethod(matchMethod != null ? matchMethod : "");
+                    demandVideo.setMatchVideoFilter(matchVideoFilter != null ? matchVideoFilter : "");
+                    demandVideo.setMatchSort(matchSort != null ? matchSort : "");
+                    demandVideo.setSceneSumRov(sceneSumRov);
                     demandVideo.setVideoId(videoItem.getLong("videoId"));
                     demandVideo.setConfigCode(videoItem.getString("configCode") != null ? videoItem.getString("configCode") : "");
                     demandVideo.setScore(videoItem.getDouble("score"));

+ 6 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/param/contentplatform/QwPlanListParam.java

@@ -19,4 +19,10 @@ public class QwPlanListParam extends PageParam {
     @ApiModelProperty(value = "标题")
     private String title;
 
+    @ApiModelProperty(value = "起始日期,格式 yyyy-MM-dd")
+    private String startDate;
+
+    @ApiModelProperty(value = "截止日期,格式 yyyy-MM-dd")
+    private String endDate;
+
 }

+ 65 - 21
api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformDemandVideo.java

@@ -9,10 +9,10 @@ public class ContentPlatformDemandVideo {
 
     private String channelName;
 
-    private String channelLevel3;
-
     private String crowdSegment;
 
+    private String channelLevel3;
+
     private String demandId;
 
     private String crowdPackage;
@@ -49,8 +49,6 @@ public class ContentPlatformDemandVideo {
 
     private String categoryName;
 
-    private String category;
-
     private Integer crowdCount;
 
     private Integer videoCount;
@@ -63,6 +61,12 @@ public class ContentPlatformDemandVideo {
 
     private String matchExperimentId;
 
+    private String matchMethod;
+
+    private String matchVideoFilter;
+
+    private String matchSort;
+
     private Long videoId;
 
     private String configCode;
@@ -83,12 +87,16 @@ public class ContentPlatformDemandVideo {
 
     private String experimentId;
 
+    private Double sceneSumRov;
+
     private Integer status;
 
     private Long createTimestamp;
 
     private Long updateTimestamp;
 
+    private String category;
+
     public Long getId() {
         return id;
     }
@@ -121,14 +129,6 @@ public class ContentPlatformDemandVideo {
         this.channelName = channelName;
     }
 
-    public String getChannelLevel3() {
-        return channelLevel3;
-    }
-
-    public void setChannelLevel3(String channelLevel3) {
-        this.channelLevel3 = channelLevel3;
-    }
-
     public String getCrowdSegment() {
         return crowdSegment;
     }
@@ -137,6 +137,14 @@ public class ContentPlatformDemandVideo {
         this.crowdSegment = crowdSegment;
     }
 
+    public String getChannelLevel3() {
+        return channelLevel3;
+    }
+
+    public void setChannelLevel3(String channelLevel3) {
+        this.channelLevel3 = channelLevel3;
+    }
+
     public String getDemandId() {
         return demandId;
     }
@@ -281,14 +289,6 @@ public class ContentPlatformDemandVideo {
         this.categoryName = categoryName;
     }
 
-    public String getCategory() {
-        return category;
-    }
-
-    public void setCategory(String category) {
-        this.category = category;
-    }
-
     public Integer getCrowdCount() {
         return crowdCount;
     }
@@ -337,6 +337,30 @@ public class ContentPlatformDemandVideo {
         this.matchExperimentId = matchExperimentId;
     }
 
+    public String getMatchMethod() {
+        return matchMethod;
+    }
+
+    public void setMatchMethod(String matchMethod) {
+        this.matchMethod = matchMethod;
+    }
+
+    public String getMatchVideoFilter() {
+        return matchVideoFilter;
+    }
+
+    public void setMatchVideoFilter(String matchVideoFilter) {
+        this.matchVideoFilter = matchVideoFilter;
+    }
+
+    public String getMatchSort() {
+        return matchSort;
+    }
+
+    public void setMatchSort(String matchSort) {
+        this.matchSort = matchSort;
+    }
+
     public Long getVideoId() {
         return videoId;
     }
@@ -417,6 +441,14 @@ public class ContentPlatformDemandVideo {
         this.experimentId = experimentId;
     }
 
+    public Double getSceneSumRov() {
+        return sceneSumRov;
+    }
+
+    public void setSceneSumRov(Double sceneSumRov) {
+        this.sceneSumRov = sceneSumRov;
+    }
+
     public Integer getStatus() {
         return status;
     }
@@ -441,6 +473,14 @@ public class ContentPlatformDemandVideo {
         this.updateTimestamp = updateTimestamp;
     }
 
+    public String getCategory() {
+        return category;
+    }
+
+    public void setCategory(String category) {
+        this.category = category;
+    }
+
     @Override
     public String toString() {
         StringBuilder sb = new StringBuilder();
@@ -471,13 +511,15 @@ public class ContentPlatformDemandVideo {
         sb.append(", standardElement=").append(standardElement);
         sb.append(", elementDimension=").append(elementDimension);
         sb.append(", categoryName=").append(categoryName);
-        sb.append(", category=").append(category);
         sb.append(", crowdCount=").append(crowdCount);
         sb.append(", videoCount=").append(videoCount);
         sb.append(", visitUv=").append(visitUv);
         sb.append(", uvRatio=").append(uvRatio);
         sb.append(", totalRov=").append(totalRov);
         sb.append(", matchExperimentId=").append(matchExperimentId);
+        sb.append(", matchMethod=").append(matchMethod);
+        sb.append(", matchVideoFilter=").append(matchVideoFilter);
+        sb.append(", matchSort=").append(matchSort);
         sb.append(", videoId=").append(videoId);
         sb.append(", configCode=").append(configCode);
         sb.append(", score=").append(score);
@@ -488,9 +530,11 @@ public class ContentPlatformDemandVideo {
         sb.append(", cover=").append(cover);
         sb.append(", video=").append(video);
         sb.append(", experimentId=").append(experimentId);
+        sb.append(", sceneSumRov=").append(sceneSumRov);
         sb.append(", status=").append(status);
         sb.append(", createTimestamp=").append(createTimestamp);
         sb.append(", updateTimestamp=").append(updateTimestamp);
+        sb.append(", category=").append(category);
         sb.append("]");
         return sb.toString();
     }

+ 340 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/po/contentplatform/ContentPlatformDemandVideoExample.java

@@ -2155,6 +2155,216 @@ public class ContentPlatformDemandVideoExample {
             return (Criteria) this;
         }
 
+        public Criteria andMatchMethodIsNull() {
+            addCriterion("match_method is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMatchMethodIsNotNull() {
+            addCriterion("match_method is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMatchMethodEqualTo(String value) {
+            addCriterion("match_method =", value, "matchMethod");
+            return (Criteria) this;
+        }
+
+        public Criteria andMatchMethodNotEqualTo(String value) {
+            addCriterion("match_method <>", value, "matchMethod");
+            return (Criteria) this;
+        }
+
+        public Criteria andMatchMethodGreaterThan(String value) {
+            addCriterion("match_method >", value, "matchMethod");
+            return (Criteria) this;
+        }
+
+        public Criteria andMatchMethodGreaterThanOrEqualTo(String value) {
+            addCriterion("match_method >=", value, "matchMethod");
+            return (Criteria) this;
+        }
+
+        public Criteria andMatchMethodLessThan(String value) {
+            addCriterion("match_method <", value, "matchMethod");
+            return (Criteria) this;
+        }
+
+        public Criteria andMatchMethodLessThanOrEqualTo(String value) {
+            addCriterion("match_method <=", value, "matchMethod");
+            return (Criteria) this;
+        }
+
+        public Criteria andMatchMethodLike(String value) {
+            addCriterion("match_method like", value, "matchMethod");
+            return (Criteria) this;
+        }
+
+        public Criteria andMatchMethodNotLike(String value) {
+            addCriterion("match_method not like", value, "matchMethod");
+            return (Criteria) this;
+        }
+
+        public Criteria andMatchMethodIn(List<String> values) {
+            addCriterion("match_method in", values, "matchMethod");
+            return (Criteria) this;
+        }
+
+        public Criteria andMatchMethodNotIn(List<String> values) {
+            addCriterion("match_method not in", values, "matchMethod");
+            return (Criteria) this;
+        }
+
+        public Criteria andMatchMethodBetween(String value1, String value2) {
+            addCriterion("match_method between", value1, value2, "matchMethod");
+            return (Criteria) this;
+        }
+
+        public Criteria andMatchMethodNotBetween(String value1, String value2) {
+            addCriterion("match_method not between", value1, value2, "matchMethod");
+            return (Criteria) this;
+        }
+
+        public Criteria andMatchVideoFilterIsNull() {
+            addCriterion("match_video_filter is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMatchVideoFilterIsNotNull() {
+            addCriterion("match_video_filter is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMatchVideoFilterEqualTo(String value) {
+            addCriterion("match_video_filter =", value, "matchVideoFilter");
+            return (Criteria) this;
+        }
+
+        public Criteria andMatchVideoFilterNotEqualTo(String value) {
+            addCriterion("match_video_filter <>", value, "matchVideoFilter");
+            return (Criteria) this;
+        }
+
+        public Criteria andMatchVideoFilterGreaterThan(String value) {
+            addCriterion("match_video_filter >", value, "matchVideoFilter");
+            return (Criteria) this;
+        }
+
+        public Criteria andMatchVideoFilterGreaterThanOrEqualTo(String value) {
+            addCriterion("match_video_filter >=", value, "matchVideoFilter");
+            return (Criteria) this;
+        }
+
+        public Criteria andMatchVideoFilterLessThan(String value) {
+            addCriterion("match_video_filter <", value, "matchVideoFilter");
+            return (Criteria) this;
+        }
+
+        public Criteria andMatchVideoFilterLessThanOrEqualTo(String value) {
+            addCriterion("match_video_filter <=", value, "matchVideoFilter");
+            return (Criteria) this;
+        }
+
+        public Criteria andMatchVideoFilterLike(String value) {
+            addCriterion("match_video_filter like", value, "matchVideoFilter");
+            return (Criteria) this;
+        }
+
+        public Criteria andMatchVideoFilterNotLike(String value) {
+            addCriterion("match_video_filter not like", value, "matchVideoFilter");
+            return (Criteria) this;
+        }
+
+        public Criteria andMatchVideoFilterIn(List<String> values) {
+            addCriterion("match_video_filter in", values, "matchVideoFilter");
+            return (Criteria) this;
+        }
+
+        public Criteria andMatchVideoFilterNotIn(List<String> values) {
+            addCriterion("match_video_filter not in", values, "matchVideoFilter");
+            return (Criteria) this;
+        }
+
+        public Criteria andMatchVideoFilterBetween(String value1, String value2) {
+            addCriterion("match_video_filter between", value1, value2, "matchVideoFilter");
+            return (Criteria) this;
+        }
+
+        public Criteria andMatchVideoFilterNotBetween(String value1, String value2) {
+            addCriterion("match_video_filter not between", value1, value2, "matchVideoFilter");
+            return (Criteria) this;
+        }
+
+        public Criteria andMatchSortIsNull() {
+            addCriterion("match_sort is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMatchSortIsNotNull() {
+            addCriterion("match_sort is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andMatchSortEqualTo(String value) {
+            addCriterion("match_sort =", value, "matchSort");
+            return (Criteria) this;
+        }
+
+        public Criteria andMatchSortNotEqualTo(String value) {
+            addCriterion("match_sort <>", value, "matchSort");
+            return (Criteria) this;
+        }
+
+        public Criteria andMatchSortGreaterThan(String value) {
+            addCriterion("match_sort >", value, "matchSort");
+            return (Criteria) this;
+        }
+
+        public Criteria andMatchSortGreaterThanOrEqualTo(String value) {
+            addCriterion("match_sort >=", value, "matchSort");
+            return (Criteria) this;
+        }
+
+        public Criteria andMatchSortLessThan(String value) {
+            addCriterion("match_sort <", value, "matchSort");
+            return (Criteria) this;
+        }
+
+        public Criteria andMatchSortLessThanOrEqualTo(String value) {
+            addCriterion("match_sort <=", value, "matchSort");
+            return (Criteria) this;
+        }
+
+        public Criteria andMatchSortLike(String value) {
+            addCriterion("match_sort like", value, "matchSort");
+            return (Criteria) this;
+        }
+
+        public Criteria andMatchSortNotLike(String value) {
+            addCriterion("match_sort not like", value, "matchSort");
+            return (Criteria) this;
+        }
+
+        public Criteria andMatchSortIn(List<String> values) {
+            addCriterion("match_sort in", values, "matchSort");
+            return (Criteria) this;
+        }
+
+        public Criteria andMatchSortNotIn(List<String> values) {
+            addCriterion("match_sort not in", values, "matchSort");
+            return (Criteria) this;
+        }
+
+        public Criteria andMatchSortBetween(String value1, String value2) {
+            addCriterion("match_sort between", value1, value2, "matchSort");
+            return (Criteria) this;
+        }
+
+        public Criteria andMatchSortNotBetween(String value1, String value2) {
+            addCriterion("match_sort not between", value1, value2, "matchSort");
+            return (Criteria) this;
+        }
+
         public Criteria andVideoIdIsNull() {
             addCriterion("video_id is null");
             return (Criteria) this;
@@ -2815,6 +3025,66 @@ public class ContentPlatformDemandVideoExample {
             return (Criteria) this;
         }
 
+        public Criteria andSceneSumRovIsNull() {
+            addCriterion("scene_sum_rov is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSceneSumRovIsNotNull() {
+            addCriterion("scene_sum_rov is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSceneSumRovEqualTo(Double value) {
+            addCriterion("scene_sum_rov =", value, "sceneSumRov");
+            return (Criteria) this;
+        }
+
+        public Criteria andSceneSumRovNotEqualTo(Double value) {
+            addCriterion("scene_sum_rov <>", value, "sceneSumRov");
+            return (Criteria) this;
+        }
+
+        public Criteria andSceneSumRovGreaterThan(Double value) {
+            addCriterion("scene_sum_rov >", value, "sceneSumRov");
+            return (Criteria) this;
+        }
+
+        public Criteria andSceneSumRovGreaterThanOrEqualTo(Double value) {
+            addCriterion("scene_sum_rov >=", value, "sceneSumRov");
+            return (Criteria) this;
+        }
+
+        public Criteria andSceneSumRovLessThan(Double value) {
+            addCriterion("scene_sum_rov <", value, "sceneSumRov");
+            return (Criteria) this;
+        }
+
+        public Criteria andSceneSumRovLessThanOrEqualTo(Double value) {
+            addCriterion("scene_sum_rov <=", value, "sceneSumRov");
+            return (Criteria) this;
+        }
+
+        public Criteria andSceneSumRovIn(List<Double> values) {
+            addCriterion("scene_sum_rov in", values, "sceneSumRov");
+            return (Criteria) this;
+        }
+
+        public Criteria andSceneSumRovNotIn(List<Double> values) {
+            addCriterion("scene_sum_rov not in", values, "sceneSumRov");
+            return (Criteria) this;
+        }
+
+        public Criteria andSceneSumRovBetween(Double value1, Double value2) {
+            addCriterion("scene_sum_rov between", value1, value2, "sceneSumRov");
+            return (Criteria) this;
+        }
+
+        public Criteria andSceneSumRovNotBetween(Double value1, Double value2) {
+            addCriterion("scene_sum_rov not between", value1, value2, "sceneSumRov");
+            return (Criteria) this;
+        }
+
         public Criteria andStatusIsNull() {
             addCriterion("`status` is null");
             return (Criteria) this;
@@ -2994,6 +3264,76 @@ public class ContentPlatformDemandVideoExample {
             addCriterion("update_timestamp not between", value1, value2, "updateTimestamp");
             return (Criteria) this;
         }
+
+        public Criteria andCategoryIsNull() {
+            addCriterion("category is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryIsNotNull() {
+            addCriterion("category is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryEqualTo(String value) {
+            addCriterion("category =", value, "category");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryNotEqualTo(String value) {
+            addCriterion("category <>", value, "category");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryGreaterThan(String value) {
+            addCriterion("category >", value, "category");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryGreaterThanOrEqualTo(String value) {
+            addCriterion("category >=", value, "category");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryLessThan(String value) {
+            addCriterion("category <", value, "category");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryLessThanOrEqualTo(String value) {
+            addCriterion("category <=", value, "category");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryLike(String value) {
+            addCriterion("category like", value, "category");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryNotLike(String value) {
+            addCriterion("category not like", value, "category");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryIn(List<String> values) {
+            addCriterion("category in", values, "category");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryNotIn(List<String> values) {
+            addCriterion("category not in", values, "category");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryBetween(String value1, String value2) {
+            addCriterion("category between", value1, value2, "category");
+            return (Criteria) this;
+        }
+
+        public Criteria andCategoryNotBetween(String value1, String value2) {
+            addCriterion("category not between", value1, value2, "category");
+            return (Criteria) this;
+        }
     }
 
     public static class Criteria extends GeneratedCriteria {

+ 39 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/vo/contentplatform/QwPlanItemExportVO.java

@@ -0,0 +1,39 @@
+package com.tzld.piaoquan.api.model.vo.contentplatform;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.annotation.write.style.ColumnWidth;
+import com.alibaba.excel.annotation.write.style.ContentRowHeight;
+import com.alibaba.excel.annotation.write.style.HeadRowHeight;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Data
+@NoArgsConstructor
+@AllArgsConstructor
+@ColumnWidth(25)
+@HeadRowHeight(40)
+@ContentRowHeight(25)
+public class QwPlanItemExportVO {
+
+    @ExcelProperty("类型(0-自动回复 1-每日推送)")
+    private String type;
+
+    @ExcelProperty("场景(0-群发 1-单发)")
+    private String scene;
+
+    @ExcelProperty("子渠道")
+    private String subChannel;
+
+    @ExcelProperty("视频标题")
+    private String title;
+
+    @ExcelProperty("视频封面")
+    private String cover;
+
+    @ExcelProperty("推送链接")
+    private String pageUrl;
+
+    @ExcelProperty("创建时间")
+    private String createTime;
+}

+ 3 - 0
api-module/src/main/java/com/tzld/piaoquan/api/model/vo/contentplatform/VideoContentItemVO.java

@@ -116,4 +116,7 @@ public class VideoContentItemVO {
 
     @ApiModelProperty(value = "需求侧总ROV")
     private Double totalRov;
+
+    @ApiModelProperty(value = "场景汇总ROV")
+    private Double sceneSumRov;
 }

+ 2 - 0
api-module/src/main/java/com/tzld/piaoquan/api/service/contentplatform/ContentPlatformPlanService.java

@@ -48,6 +48,8 @@ public interface ContentPlatformPlanService {
 
     Page<QwPlanItemVO> qwPlanList(QwPlanListParam param);
 
+    String qwPlanExport(QwPlanListParam param);
+
     List<QwPlanItemVO> qwPlanSave(QwPlanSaveParam param);
 
     String getSharePic(String pageUrl);

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

@@ -1,8 +1,11 @@
 package com.tzld.piaoquan.api.service.contentplatform.impl;
 
+import com.alibaba.excel.EasyExcel;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.google.common.collect.Lists;
+import com.stuuudy.commons.external.filestorage.enums.EnumFileType;
+import com.stuuudy.commons.external.filestorage.enums.EnumPublicBuckets;
 import com.tzld.piaoquan.api.common.enums.ExceptionEnum;
 import com.tzld.piaoquan.api.common.enums.contentplatform.*;
 import com.tzld.piaoquan.api.common.exception.CommonException;
@@ -19,6 +22,7 @@ import com.tzld.piaoquan.api.model.po.contentplatform.*;
 import com.tzld.piaoquan.api.model.vo.GhDetailVo;
 import com.tzld.piaoquan.api.model.vo.contentplatform.GzhPlanItemVO;
 import com.tzld.piaoquan.api.model.vo.contentplatform.GzhPlanVideoContentItemVO;
+import com.tzld.piaoquan.api.model.vo.contentplatform.QwPlanItemExportVO;
 import com.tzld.piaoquan.api.model.vo.contentplatform.QwPlanItemVO;
 import com.tzld.piaoquan.api.model.vo.contentplatform.VideoContentItemVO;
 import com.tzld.piaoquan.api.service.CgiReplyService;
@@ -27,6 +31,8 @@ import com.tzld.piaoquan.api.service.VideoMultiService;
 import com.tzld.piaoquan.api.service.contentplatform.ContentPlatformAccountService;
 import com.tzld.piaoquan.api.service.contentplatform.ContentPlatformCooperateAccountService;
 import com.tzld.piaoquan.api.service.contentplatform.ContentPlatformPlanService;
+import com.tzld.piaoquan.api.util.AliOssFileTool;
+import com.tzld.piaoquan.api.util.CdnUtil;
 import com.tzld.piaoquan.api.util.TitleNormalizer;
 import com.tzld.piaoquan.growth.common.common.enums.GhTypeEnum;
 import com.tzld.piaoquan.growth.common.common.enums.StrategyStatusEnum;
@@ -35,6 +41,7 @@ import com.tzld.piaoquan.growth.common.model.bo.VideoDetail;
 import com.tzld.piaoquan.growth.common.model.po.CgiReplyBucketData;
 import com.tzld.piaoquan.growth.common.model.po.GhDetail;
 import com.tzld.piaoquan.growth.common.service.MessageAttachmentService;
+import com.tzld.piaoquan.growth.common.utils.DateUtil;
 import com.tzld.piaoquan.growth.common.utils.MessageUtil;
 import com.tzld.piaoquan.growth.common.utils.RedisUtils;
 import com.tzld.piaoquan.growth.common.utils.page.Page;
@@ -48,6 +55,8 @@ import org.springframework.stereotype.Service;
 import org.springframework.util.StringUtils;
 
 import java.time.LocalDate;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
 import java.util.*;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
@@ -1444,6 +1453,87 @@ public class ContentPlatformPlanServiceImpl implements ContentPlatformPlanServic
         return result;
     }
 
+    /**
+     * 企微计划列表导出:
+     * 复用 /qw/list 的过滤条件(type/scene/subChannel/title)与起止日期过滤,
+     * 不传起止日期时默认只导出当天(1天)数据,最多导出 2000 条。
+     */
+    @Override
+    public String qwPlanExport(QwPlanListParam param) {
+        // 未传日期时,默认仅导出当天数据
+        if (!StringUtils.hasText(param.getStartDate()) && !StringUtils.hasText(param.getEndDate())) {
+            String today = DateUtil.getThatDayDateString();
+            param.setStartDate(today);
+            param.setEndDate(today);
+        } else if (!StringUtils.hasText(param.getStartDate())) {
+            param.setStartDate(param.getEndDate());
+        } else if (!StringUtils.hasText(param.getEndDate())) {
+            param.setEndDate(param.getStartDate());
+        }
+        // 强制分页参数:最多导出 2000 条
+        param.setPageNum(1);
+        param.setPageSize(2000);
+
+        ContentPlatformAccount loginAccount = LoginUserContext.getUser();
+        List<ContentPlatformQwPlan> planList = planMapperExt.getQwPlanList(param,
+                loginAccount.getId(), 0, param.getPageSize());
+        List<QwPlanItemVO> list = buildQwPlanItemVOList(planList);
+        return generateQwPlanExcelFile(list);
+    }
+
+    private String generateQwPlanExcelFile(List<QwPlanItemVO> dataList) {
+        List<QwPlanItemExportVO> list = new ArrayList<>();
+        if (CollectionUtils.isNotEmpty(dataList)) {
+            for (QwPlanItemVO data : dataList) {
+                QwPlanItemExportVO vo = new QwPlanItemExportVO();
+                vo.setType(convertQwPlanTypeText(data.getType()));
+                vo.setScene(convertQwPlanSceneText(data.getScene()));
+                vo.setSubChannel(data.getSubChannel());
+                vo.setTitle(data.getTitle());
+                vo.setCover(data.getShareCover());
+                vo.setPageUrl(data.getPageUrl());
+                if (Objects.nonNull(data.getCreateTimestamp())) {
+                    vo.setCreateTime(DateUtil.getDateString(data.getCreateTimestamp(), "yyyy-MM-dd HH:mm:ss"));
+                }
+                list.add(vo);
+            }
+        } else {
+            list.add(new QwPlanItemExportVO());
+        }
+        ByteArrayOutputStream out = new ByteArrayOutputStream();
+        EasyExcel.write(out, QwPlanItemExportVO.class).sheet("企微计划").doWrite(list);
+        ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(out.toByteArray());
+        String fileName = "企微计划_" + System.currentTimeMillis() + ".xls";
+        AliOssFileTool.saveInPublicReturnHost(byteArrayInputStream, EnumPublicBuckets.PUBBUCKET, fileName, EnumFileType.TEMP_PICTURE);
+        return CdnUtil.DOWNLOAD_CDN_URL_HOST_PICTURE + fileName;
+    }
+
+    private String convertQwPlanTypeText(Integer type) {
+        if (Objects.isNull(type)) {
+            return "";
+        }
+        if (type == 0) {
+            return "自动回复";
+        }
+        if (type == 1) {
+            return "每日推送";
+        }
+        return String.valueOf(type);
+    }
+
+    private String convertQwPlanSceneText(Integer scene) {
+        if (Objects.isNull(scene)) {
+            return "";
+        }
+        if (scene == 0) {
+            return "群发";
+        }
+        if (scene == 1) {
+            return "单发";
+        }
+        return String.valueOf(scene);
+    }
+
     private List<QwPlanItemVO> buildQwPlanItemVOList(List<ContentPlatformQwPlan> planList) {
         if (CollectionUtils.isEmpty(planList)) {
             return null;
@@ -1830,6 +1920,7 @@ public class ContentPlatformPlanServiceImpl implements ContentPlatformPlanServic
             item.setVisitUv(video.getVisitUv());
             item.setUvRatio(video.getUvRatio());
             item.setTotalRov(video.getTotalRov());
+            item.setSceneSumRov(video.getSceneSumRov());
             result.add(item);
         }
         return result;

+ 91 - 12
api-module/src/main/resources/mapper/contentplatform/ContentPlatformDemandVideoMapper.xml

@@ -26,13 +26,15 @@
     <result column="standard_element" jdbcType="VARCHAR" property="standardElement" />
     <result column="element_dimension" jdbcType="VARCHAR" property="elementDimension" />
     <result column="category_name" jdbcType="VARCHAR" property="categoryName" />
-    <result column="category" jdbcType="VARCHAR" property="category" />
     <result column="crowd_count" jdbcType="INTEGER" property="crowdCount" />
     <result column="video_count" jdbcType="INTEGER" property="videoCount" />
     <result column="visit_uv" jdbcType="BIGINT" property="visitUv" />
     <result column="uv_ratio" jdbcType="DOUBLE" property="uvRatio" />
     <result column="total_rov" jdbcType="DOUBLE" property="totalRov" />
     <result column="match_experiment_id" jdbcType="VARCHAR" property="matchExperimentId" />
+    <result column="match_method" jdbcType="VARCHAR" property="matchMethod" />
+    <result column="match_video_filter" jdbcType="VARCHAR" property="matchVideoFilter" />
+    <result column="match_sort" jdbcType="VARCHAR" property="matchSort" />
     <result column="video_id" jdbcType="BIGINT" property="videoId" />
     <result column="config_code" jdbcType="VARCHAR" property="configCode" />
     <result column="score" jdbcType="DOUBLE" property="score" />
@@ -43,9 +45,11 @@
     <result column="cover" jdbcType="VARCHAR" property="cover" />
     <result column="video" jdbcType="VARCHAR" property="video" />
     <result column="experiment_id" jdbcType="VARCHAR" property="experimentId" />
+    <result column="scene_sum_rov" jdbcType="DOUBLE" property="sceneSumRov" />
     <result column="status" jdbcType="INTEGER" property="status" />
     <result column="create_timestamp" jdbcType="BIGINT" property="createTimestamp" />
     <result column="update_timestamp" jdbcType="BIGINT" property="updateTimestamp" />
+    <result column="category" jdbcType="VARCHAR" property="category" />
   </resultMap>
   <sql id="Example_Where_Clause">
     <where>
@@ -110,9 +114,10 @@
     conversion_target, partner, account, scene_value, demand_strategy, drive_dimension_time, 
     dimension, demand_filter_sort_strategy, demand_type, demand_content_id, demand_content_title, 
     demand_content_topic, point_type, standard_element, element_dimension, category_name, 
-    crowd_count, video_count, visit_uv, uv_ratio, total_rov, match_experiment_id, video_id, 
-    config_code, score, sim, rov, match_text, title, cover, video, experiment_id, `status`, 
-    create_timestamp, update_timestamp
+    crowd_count, video_count, visit_uv, uv_ratio, total_rov, match_experiment_id, match_method, 
+    match_video_filter, match_sort, video_id, config_code, score, sim, rov, match_text, 
+    title, cover, video, experiment_id, scene_sum_rov, `status`, create_timestamp, update_timestamp, 
+    category
   </sql>
   <select id="selectByExample" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformDemandVideoExample" resultMap="BaseResultMap">
     select
@@ -158,11 +163,13 @@
       point_type, standard_element, element_dimension, 
       category_name, crowd_count, video_count, 
       visit_uv, uv_ratio, total_rov, 
-      match_experiment_id, video_id, config_code, 
+      match_experiment_id, match_method, match_video_filter, 
+      match_sort, video_id, config_code, 
       score, sim, rov, match_text, 
       title, cover, video, 
-      experiment_id, `status`, create_timestamp, 
-      update_timestamp)
+      experiment_id, scene_sum_rov, `status`, 
+      create_timestamp, update_timestamp, category
+      )
     values (#{id,jdbcType=BIGINT}, #{dt,jdbcType=VARCHAR}, #{onlineAction,jdbcType=VARCHAR}, 
       #{channelName,jdbcType=VARCHAR}, #{crowdSegment,jdbcType=VARCHAR}, #{channelLevel3,jdbcType=VARCHAR}, 
       #{demandId,jdbcType=VARCHAR}, #{crowdPackage,jdbcType=VARCHAR}, #{conversionTarget,jdbcType=VARCHAR}, 
@@ -173,11 +180,13 @@
       #{pointType,jdbcType=VARCHAR}, #{standardElement,jdbcType=VARCHAR}, #{elementDimension,jdbcType=VARCHAR}, 
       #{categoryName,jdbcType=VARCHAR}, #{crowdCount,jdbcType=INTEGER}, #{videoCount,jdbcType=INTEGER}, 
       #{visitUv,jdbcType=BIGINT}, #{uvRatio,jdbcType=DOUBLE}, #{totalRov,jdbcType=DOUBLE}, 
-      #{matchExperimentId,jdbcType=VARCHAR}, #{videoId,jdbcType=BIGINT}, #{configCode,jdbcType=VARCHAR}, 
+      #{matchExperimentId,jdbcType=VARCHAR}, #{matchMethod,jdbcType=VARCHAR}, #{matchVideoFilter,jdbcType=VARCHAR}, 
+      #{matchSort,jdbcType=VARCHAR}, #{videoId,jdbcType=BIGINT}, #{configCode,jdbcType=VARCHAR}, 
       #{score,jdbcType=DOUBLE}, #{sim,jdbcType=DOUBLE}, #{rov,jdbcType=DOUBLE}, #{matchText,jdbcType=VARCHAR}, 
       #{title,jdbcType=VARCHAR}, #{cover,jdbcType=VARCHAR}, #{video,jdbcType=VARCHAR}, 
-      #{experimentId,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{createTimestamp,jdbcType=BIGINT}, 
-      #{updateTimestamp,jdbcType=BIGINT})
+      #{experimentId,jdbcType=VARCHAR}, #{sceneSumRov,jdbcType=DOUBLE}, #{status,jdbcType=INTEGER}, 
+      #{createTimestamp,jdbcType=BIGINT}, #{updateTimestamp,jdbcType=BIGINT}, #{category,jdbcType=VARCHAR}
+      )
   </insert>
   <insert id="insertSelective" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformDemandVideo">
     insert into content_platform_demand_video
@@ -272,6 +281,15 @@
       <if test="matchExperimentId != null">
         match_experiment_id,
       </if>
+      <if test="matchMethod != null">
+        match_method,
+      </if>
+      <if test="matchVideoFilter != null">
+        match_video_filter,
+      </if>
+      <if test="matchSort != null">
+        match_sort,
+      </if>
       <if test="videoId != null">
         video_id,
       </if>
@@ -302,6 +320,9 @@
       <if test="experimentId != null">
         experiment_id,
       </if>
+      <if test="sceneSumRov != null">
+        scene_sum_rov,
+      </if>
       <if test="status != null">
         `status`,
       </if>
@@ -311,6 +332,9 @@
       <if test="updateTimestamp != null">
         update_timestamp,
       </if>
+      <if test="category != null">
+        category,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="id != null">
@@ -403,6 +427,15 @@
       <if test="matchExperimentId != null">
         #{matchExperimentId,jdbcType=VARCHAR},
       </if>
+      <if test="matchMethod != null">
+        #{matchMethod,jdbcType=VARCHAR},
+      </if>
+      <if test="matchVideoFilter != null">
+        #{matchVideoFilter,jdbcType=VARCHAR},
+      </if>
+      <if test="matchSort != null">
+        #{matchSort,jdbcType=VARCHAR},
+      </if>
       <if test="videoId != null">
         #{videoId,jdbcType=BIGINT},
       </if>
@@ -433,6 +466,9 @@
       <if test="experimentId != null">
         #{experimentId,jdbcType=VARCHAR},
       </if>
+      <if test="sceneSumRov != null">
+        #{sceneSumRov,jdbcType=DOUBLE},
+      </if>
       <if test="status != null">
         #{status,jdbcType=INTEGER},
       </if>
@@ -442,6 +478,9 @@
       <if test="updateTimestamp != null">
         #{updateTimestamp,jdbcType=BIGINT},
       </if>
+      <if test="category != null">
+        #{category,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <select id="countByExample" parameterType="com.tzld.piaoquan.api.model.po.contentplatform.ContentPlatformDemandVideoExample" resultType="java.lang.Long">
@@ -543,6 +582,15 @@
       <if test="record.matchExperimentId != null">
         match_experiment_id = #{record.matchExperimentId,jdbcType=VARCHAR},
       </if>
+      <if test="record.matchMethod != null">
+        match_method = #{record.matchMethod,jdbcType=VARCHAR},
+      </if>
+      <if test="record.matchVideoFilter != null">
+        match_video_filter = #{record.matchVideoFilter,jdbcType=VARCHAR},
+      </if>
+      <if test="record.matchSort != null">
+        match_sort = #{record.matchSort,jdbcType=VARCHAR},
+      </if>
       <if test="record.videoId != null">
         video_id = #{record.videoId,jdbcType=BIGINT},
       </if>
@@ -573,6 +621,9 @@
       <if test="record.experimentId != null">
         experiment_id = #{record.experimentId,jdbcType=VARCHAR},
       </if>
+      <if test="record.sceneSumRov != null">
+        scene_sum_rov = #{record.sceneSumRov,jdbcType=DOUBLE},
+      </if>
       <if test="record.status != null">
         `status` = #{record.status,jdbcType=INTEGER},
       </if>
@@ -582,6 +633,9 @@
       <if test="record.updateTimestamp != null">
         update_timestamp = #{record.updateTimestamp,jdbcType=BIGINT},
       </if>
+      <if test="record.category != null">
+        category = #{record.category,jdbcType=VARCHAR},
+      </if>
     </set>
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -619,6 +673,9 @@
       uv_ratio = #{record.uvRatio,jdbcType=DOUBLE},
       total_rov = #{record.totalRov,jdbcType=DOUBLE},
       match_experiment_id = #{record.matchExperimentId,jdbcType=VARCHAR},
+      match_method = #{record.matchMethod,jdbcType=VARCHAR},
+      match_video_filter = #{record.matchVideoFilter,jdbcType=VARCHAR},
+      match_sort = #{record.matchSort,jdbcType=VARCHAR},
       video_id = #{record.videoId,jdbcType=BIGINT},
       config_code = #{record.configCode,jdbcType=VARCHAR},
       score = #{record.score,jdbcType=DOUBLE},
@@ -629,9 +686,11 @@
       cover = #{record.cover,jdbcType=VARCHAR},
       video = #{record.video,jdbcType=VARCHAR},
       experiment_id = #{record.experimentId,jdbcType=VARCHAR},
+      scene_sum_rov = #{record.sceneSumRov,jdbcType=DOUBLE},
       `status` = #{record.status,jdbcType=INTEGER},
       create_timestamp = #{record.createTimestamp,jdbcType=BIGINT},
-      update_timestamp = #{record.updateTimestamp,jdbcType=BIGINT}
+      update_timestamp = #{record.updateTimestamp,jdbcType=BIGINT},
+      category = #{record.category,jdbcType=VARCHAR}
     <if test="_parameter != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -726,6 +785,15 @@
       <if test="matchExperimentId != null">
         match_experiment_id = #{matchExperimentId,jdbcType=VARCHAR},
       </if>
+      <if test="matchMethod != null">
+        match_method = #{matchMethod,jdbcType=VARCHAR},
+      </if>
+      <if test="matchVideoFilter != null">
+        match_video_filter = #{matchVideoFilter,jdbcType=VARCHAR},
+      </if>
+      <if test="matchSort != null">
+        match_sort = #{matchSort,jdbcType=VARCHAR},
+      </if>
       <if test="videoId != null">
         video_id = #{videoId,jdbcType=BIGINT},
       </if>
@@ -756,6 +824,9 @@
       <if test="experimentId != null">
         experiment_id = #{experimentId,jdbcType=VARCHAR},
       </if>
+      <if test="sceneSumRov != null">
+        scene_sum_rov = #{sceneSumRov,jdbcType=DOUBLE},
+      </if>
       <if test="status != null">
         `status` = #{status,jdbcType=INTEGER},
       </if>
@@ -765,6 +836,9 @@
       <if test="updateTimestamp != null">
         update_timestamp = #{updateTimestamp,jdbcType=BIGINT},
       </if>
+      <if test="category != null">
+        category = #{category,jdbcType=VARCHAR},
+      </if>
     </set>
     where id = #{id,jdbcType=BIGINT}
   </update>
@@ -799,6 +873,9 @@
       uv_ratio = #{uvRatio,jdbcType=DOUBLE},
       total_rov = #{totalRov,jdbcType=DOUBLE},
       match_experiment_id = #{matchExperimentId,jdbcType=VARCHAR},
+      match_method = #{matchMethod,jdbcType=VARCHAR},
+      match_video_filter = #{matchVideoFilter,jdbcType=VARCHAR},
+      match_sort = #{matchSort,jdbcType=VARCHAR},
       video_id = #{videoId,jdbcType=BIGINT},
       config_code = #{configCode,jdbcType=VARCHAR},
       score = #{score,jdbcType=DOUBLE},
@@ -809,9 +886,11 @@
       cover = #{cover,jdbcType=VARCHAR},
       video = #{video,jdbcType=VARCHAR},
       experiment_id = #{experimentId,jdbcType=VARCHAR},
+      scene_sum_rov = #{sceneSumRov,jdbcType=DOUBLE},
       `status` = #{status,jdbcType=INTEGER},
       create_timestamp = #{createTimestamp,jdbcType=BIGINT},
-      update_timestamp = #{updateTimestamp,jdbcType=BIGINT}
+      update_timestamp = #{updateTimestamp,jdbcType=BIGINT},
+      category = #{category,jdbcType=VARCHAR}
     where id = #{id,jdbcType=BIGINT}
   </update>
 </mapper>

+ 8 - 4
api-module/src/main/resources/mapper/contentplatform/ext/ContentPlatformDemandVideoMapperExt.xml

@@ -9,8 +9,9 @@
          demand_strategy, drive_dimension_time, demand_filter_sort_strategy, demand_type,
          demand_content_id, demand_content_title, demand_content_topic,
          crowd_count, video_count, visit_uv, uv_ratio, total_rov, online_action, match_experiment_id,
+         match_method, match_video_filter, match_sort,
          video_id, config_code, score, sim, rov,
-         match_text, title, cover, video, experiment_id, channel_level3, status, create_timestamp, update_timestamp)
+         match_text, title, cover, video, experiment_id, scene_sum_rov, channel_level3, status, create_timestamp, update_timestamp)
         VALUES
         <foreach collection="list" item="item" separator=",">
             (#{item.dt}, #{item.channelName}, #{item.crowdSegment}, #{item.dimension}, #{item.pointType}, #{item.standardElement}, #{item.elementDimension},
@@ -18,8 +19,9 @@
              #{item.demandStrategy}, #{item.driveDimensionTime}, #{item.demandFilterSortStrategy}, #{item.demandType},
              #{item.demandContentId}, #{item.demandContentTitle}, #{item.demandContentTopic},
              #{item.crowdCount}, #{item.videoCount}, #{item.visitUv}, #{item.uvRatio}, #{item.totalRov}, #{item.onlineAction}, #{item.matchExperimentId},
+             #{item.matchMethod}, #{item.matchVideoFilter}, #{item.matchSort},
              #{item.videoId}, #{item.configCode}, #{item.score}, #{item.sim}, #{item.rov},
-             #{item.matchText}, #{item.title}, #{item.cover}, #{item.video}, #{item.experimentId}, #{item.channelLevel3}, #{item.status}, #{item.createTimestamp}, #{item.updateTimestamp})
+             #{item.matchText}, #{item.title}, #{item.cover}, #{item.video}, #{item.experimentId}, #{item.sceneSumRov}, #{item.channelLevel3}, #{item.status}, #{item.createTimestamp}, #{item.updateTimestamp})
         </foreach>
     </insert>
 
@@ -37,8 +39,9 @@
                demand_strategy, drive_dimension_time, demand_filter_sort_strategy, demand_type,
                demand_content_id, demand_content_title, demand_content_topic,
                crowd_count, video_count, visit_uv, uv_ratio, total_rov, online_action, match_experiment_id,
+               match_method, match_video_filter, match_sort,
                video_id, config_code, score, sim, rov,
-               match_text, title, cover, video, experiment_id, channel_level3, status, create_timestamp, update_timestamp
+               match_text, title, cover, video, experiment_id, scene_sum_rov, channel_level3, status, create_timestamp, update_timestamp
         FROM content_platform_demand_video
         WHERE dt = #{dt} AND status = 1
         <if test="channelName != null and channelName != ''">
@@ -84,8 +87,9 @@
                demand_strategy, drive_dimension_time, demand_filter_sort_strategy, demand_type,
                demand_content_id, demand_content_title, demand_content_topic,
                crowd_count, video_count, visit_uv, uv_ratio, total_rov, online_action, match_experiment_id,
+               match_method, match_video_filter, match_sort,
                video_id, config_code, score, sim, rov,
-               match_text, title, cover, video, experiment_id, status, create_timestamp, update_timestamp
+               match_text, title, cover, video, experiment_id, scene_sum_rov, status, create_timestamp, update_timestamp
         FROM content_platform_demand_video
         WHERE dt = #{dt} AND status = 1
         <if test="channelName == null || channelName != '公众号合作-Daily-自选'">

+ 12 - 0
api-module/src/main/resources/mapper/contentplatform/ext/ContentPlatformPlanMapperExt.xml

@@ -204,6 +204,12 @@
             and id in (select plan_id from content_platform_qw_plan_video where title like concat('%', #{param.title},
             '%'))
         </if>
+        <if test="param.startDate != null and param.startDate != ''">
+            and create_timestamp &gt;= UNIX_TIMESTAMP(#{param.startDate}) * 1000
+        </if>
+        <if test="param.endDate != null and param.endDate != ''">
+            and create_timestamp &lt; UNIX_TIMESTAMP(DATE_ADD(#{param.endDate}, INTERVAL 1 DAY)) * 1000
+        </if>
     </select>
 
     <select id="getQwPlanList"
@@ -223,6 +229,12 @@
             and id in (select plan_id from content_platform_qw_plan_video where title like concat('%', #{param.title},
             '%'))
         </if>
+        <if test="param.startDate != null and param.startDate != ''">
+            and create_timestamp &gt;= UNIX_TIMESTAMP(#{param.startDate}) * 1000
+        </if>
+        <if test="param.endDate != null and param.endDate != ''">
+            and create_timestamp &lt; UNIX_TIMESTAMP(DATE_ADD(#{param.endDate}, INTERVAL 1 DAY)) * 1000
+        </if>
         order by create_timestamp desc
         limit #{offset}, #{pageSize}
     </select>