소스 검색

增加视频替换

xueyiming 1 개월 전
부모
커밋
7c027e19d0

+ 30 - 0
long-article-server/src/main/java/com/tzld/piaoquan/longarticle/dao/mapper/longarticle/PiaoquanSourceVideoPoolMapper.java

@@ -0,0 +1,30 @@
+package com.tzld.piaoquan.longarticle.dao.mapper.longarticle;
+
+import com.tzld.piaoquan.longarticle.model.po.longarticle.PiaoquanSourceVideoPool;
+import com.tzld.piaoquan.longarticle.model.po.longarticle.PiaoquanSourceVideoPoolExample;
+import java.util.List;
+import org.apache.ibatis.annotations.Param;
+
+public interface PiaoquanSourceVideoPoolMapper {
+    long countByExample(PiaoquanSourceVideoPoolExample example);
+
+    int deleteByExample(PiaoquanSourceVideoPoolExample example);
+
+    int deleteByPrimaryKey(Integer id);
+
+    int insert(PiaoquanSourceVideoPool record);
+
+    int insertSelective(PiaoquanSourceVideoPool record);
+
+    List<PiaoquanSourceVideoPool> selectByExample(PiaoquanSourceVideoPoolExample example);
+
+    PiaoquanSourceVideoPool selectByPrimaryKey(Integer id);
+
+    int updateByExampleSelective(@Param("record") PiaoquanSourceVideoPool record, @Param("example") PiaoquanSourceVideoPoolExample example);
+
+    int updateByExample(@Param("record") PiaoquanSourceVideoPool record, @Param("example") PiaoquanSourceVideoPoolExample example);
+
+    int updateByPrimaryKeySelective(PiaoquanSourceVideoPool record);
+
+    int updateByPrimaryKey(PiaoquanSourceVideoPool record);
+}

+ 103 - 0
long-article-server/src/main/java/com/tzld/piaoquan/longarticle/model/po/longarticle/PiaoquanSourceVideoPool.java

@@ -0,0 +1,103 @@
+package com.tzld.piaoquan.longarticle.model.po.longarticle;
+
+import java.util.Date;
+
+public class PiaoquanSourceVideoPool {
+    private Integer id;
+
+    private Integer videoId;
+
+    private String title;
+
+    private String category;
+
+    private String videoRecallStrategy;
+
+    private Date recallDate;
+
+    private Integer status;
+
+    private Long statusUpdateTimestamp;
+
+    public Integer getId() {
+        return id;
+    }
+
+    public void setId(Integer id) {
+        this.id = id;
+    }
+
+    public Integer getVideoId() {
+        return videoId;
+    }
+
+    public void setVideoId(Integer videoId) {
+        this.videoId = videoId;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+
+    public String getCategory() {
+        return category;
+    }
+
+    public void setCategory(String category) {
+        this.category = category;
+    }
+
+    public String getVideoRecallStrategy() {
+        return videoRecallStrategy;
+    }
+
+    public void setVideoRecallStrategy(String videoRecallStrategy) {
+        this.videoRecallStrategy = videoRecallStrategy;
+    }
+
+    public Date getRecallDate() {
+        return recallDate;
+    }
+
+    public void setRecallDate(Date recallDate) {
+        this.recallDate = recallDate;
+    }
+
+    public Integer getStatus() {
+        return status;
+    }
+
+    public void setStatus(Integer status) {
+        this.status = status;
+    }
+
+    public Long getStatusUpdateTimestamp() {
+        return statusUpdateTimestamp;
+    }
+
+    public void setStatusUpdateTimestamp(Long statusUpdateTimestamp) {
+        this.statusUpdateTimestamp = statusUpdateTimestamp;
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append(getClass().getSimpleName());
+        sb.append(" [");
+        sb.append("Hash = ").append(hashCode());
+        sb.append(", id=").append(id);
+        sb.append(", videoId=").append(videoId);
+        sb.append(", title=").append(title);
+        sb.append(", category=").append(category);
+        sb.append(", videoRecallStrategy=").append(videoRecallStrategy);
+        sb.append(", recallDate=").append(recallDate);
+        sb.append(", status=").append(status);
+        sb.append(", statusUpdateTimestamp=").append(statusUpdateTimestamp);
+        sb.append("]");
+        return sb.toString();
+    }
+}

+ 749 - 0
long-article-server/src/main/java/com/tzld/piaoquan/longarticle/model/po/longarticle/PiaoquanSourceVideoPoolExample.java

@@ -0,0 +1,749 @@
+package com.tzld.piaoquan.longarticle.model.po.longarticle;
+
+import com.tzld.piaoquan.longarticle.utils.page.Page;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.List;
+
+public class PiaoquanSourceVideoPoolExample {
+    protected String orderByClause;
+
+    protected boolean distinct;
+
+    protected List<Criteria> oredCriteria;
+
+    protected Page page;
+
+    public PiaoquanSourceVideoPoolExample() {
+        oredCriteria = new ArrayList<Criteria>();
+    }
+
+    public void setOrderByClause(String orderByClause) {
+        this.orderByClause = orderByClause;
+    }
+
+    public String getOrderByClause() {
+        return orderByClause;
+    }
+
+    public void setDistinct(boolean distinct) {
+        this.distinct = distinct;
+    }
+
+    public boolean isDistinct() {
+        return distinct;
+    }
+
+    public List<Criteria> getOredCriteria() {
+        return oredCriteria;
+    }
+
+    public void or(Criteria criteria) {
+        oredCriteria.add(criteria);
+    }
+
+    public Criteria or() {
+        Criteria criteria = createCriteriaInternal();
+        oredCriteria.add(criteria);
+        return criteria;
+    }
+
+    public Criteria createCriteria() {
+        Criteria criteria = createCriteriaInternal();
+        if (oredCriteria.size() == 0) {
+            oredCriteria.add(criteria);
+        }
+        return criteria;
+    }
+
+    protected Criteria createCriteriaInternal() {
+        Criteria criteria = new Criteria();
+        return criteria;
+    }
+
+    public void clear() {
+        oredCriteria.clear();
+        orderByClause = null;
+        distinct = false;
+    }
+
+    public void setPage(Page page) {
+        this.page=page;
+    }
+
+    public Page getPage() {
+        return page;
+    }
+
+    protected abstract static class GeneratedCriteria {
+        protected List<Criterion> criteria;
+
+        protected GeneratedCriteria() {
+            super();
+            criteria = new ArrayList<Criterion>();
+        }
+
+        public boolean isValid() {
+            return criteria.size() > 0;
+        }
+
+        public List<Criterion> getAllCriteria() {
+            return criteria;
+        }
+
+        public List<Criterion> getCriteria() {
+            return criteria;
+        }
+
+        protected void addCriterion(String condition) {
+            if (condition == null) {
+                throw new RuntimeException("Value for condition cannot be null");
+            }
+            criteria.add(new Criterion(condition));
+        }
+
+        protected void addCriterion(String condition, Object value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value));
+        }
+
+        protected void addCriterion(String condition, Object value1, Object value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            criteria.add(new Criterion(condition, value1, value2));
+        }
+
+        protected void addCriterionForJDBCDate(String condition, Date value, String property) {
+            if (value == null) {
+                throw new RuntimeException("Value for " + property + " cannot be null");
+            }
+            addCriterion(condition, new java.sql.Date(value.getTime()), property);
+        }
+
+        protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
+            if (values == null || values.size() == 0) {
+                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
+            }
+            List<java.sql.Date> dateList = new ArrayList<java.sql.Date>();
+            Iterator<Date> iter = values.iterator();
+            while (iter.hasNext()) {
+                dateList.add(new java.sql.Date(iter.next().getTime()));
+            }
+            addCriterion(condition, dateList, property);
+        }
+
+        protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
+            if (value1 == null || value2 == null) {
+                throw new RuntimeException("Between values for " + property + " cannot be null");
+            }
+            addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
+        }
+
+        public Criteria andIdIsNull() {
+            addCriterion("id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIsNotNull() {
+            addCriterion("id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdEqualTo(Integer value) {
+            addCriterion("id =", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotEqualTo(Integer value) {
+            addCriterion("id <>", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThan(Integer value) {
+            addCriterion("id >", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdGreaterThanOrEqualTo(Integer value) {
+            addCriterion("id >=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThan(Integer value) {
+            addCriterion("id <", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdLessThanOrEqualTo(Integer value) {
+            addCriterion("id <=", value, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdIn(List<Integer> values) {
+            addCriterion("id in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotIn(List<Integer> values) {
+            addCriterion("id not in", values, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdBetween(Integer value1, Integer value2) {
+            addCriterion("id between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andIdNotBetween(Integer value1, Integer value2) {
+            addCriterion("id not between", value1, value2, "id");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdIsNull() {
+            addCriterion("video_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdIsNotNull() {
+            addCriterion("video_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdEqualTo(Integer value) {
+            addCriterion("video_id =", value, "videoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdNotEqualTo(Integer value) {
+            addCriterion("video_id <>", value, "videoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdGreaterThan(Integer value) {
+            addCriterion("video_id >", value, "videoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdGreaterThanOrEqualTo(Integer value) {
+            addCriterion("video_id >=", value, "videoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdLessThan(Integer value) {
+            addCriterion("video_id <", value, "videoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdLessThanOrEqualTo(Integer value) {
+            addCriterion("video_id <=", value, "videoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdIn(List<Integer> values) {
+            addCriterion("video_id in", values, "videoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdNotIn(List<Integer> values) {
+            addCriterion("video_id not in", values, "videoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdBetween(Integer value1, Integer value2) {
+            addCriterion("video_id between", value1, value2, "videoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoIdNotBetween(Integer value1, Integer value2) {
+            addCriterion("video_id not between", value1, value2, "videoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleIsNull() {
+            addCriterion("title is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleIsNotNull() {
+            addCriterion("title is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleEqualTo(String value) {
+            addCriterion("title =", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleNotEqualTo(String value) {
+            addCriterion("title <>", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleGreaterThan(String value) {
+            addCriterion("title >", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleGreaterThanOrEqualTo(String value) {
+            addCriterion("title >=", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleLessThan(String value) {
+            addCriterion("title <", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleLessThanOrEqualTo(String value) {
+            addCriterion("title <=", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleLike(String value) {
+            addCriterion("title like", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleNotLike(String value) {
+            addCriterion("title not like", value, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleIn(List<String> values) {
+            addCriterion("title in", values, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleNotIn(List<String> values) {
+            addCriterion("title not in", values, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleBetween(String value1, String value2) {
+            addCriterion("title between", value1, value2, "title");
+            return (Criteria) this;
+        }
+
+        public Criteria andTitleNotBetween(String value1, String value2) {
+            addCriterion("title not between", value1, value2, "title");
+            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 Criteria andVideoRecallStrategyIsNull() {
+            addCriterion("video_recall_strategy is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoRecallStrategyIsNotNull() {
+            addCriterion("video_recall_strategy is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoRecallStrategyEqualTo(String value) {
+            addCriterion("video_recall_strategy =", value, "videoRecallStrategy");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoRecallStrategyNotEqualTo(String value) {
+            addCriterion("video_recall_strategy <>", value, "videoRecallStrategy");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoRecallStrategyGreaterThan(String value) {
+            addCriterion("video_recall_strategy >", value, "videoRecallStrategy");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoRecallStrategyGreaterThanOrEqualTo(String value) {
+            addCriterion("video_recall_strategy >=", value, "videoRecallStrategy");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoRecallStrategyLessThan(String value) {
+            addCriterion("video_recall_strategy <", value, "videoRecallStrategy");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoRecallStrategyLessThanOrEqualTo(String value) {
+            addCriterion("video_recall_strategy <=", value, "videoRecallStrategy");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoRecallStrategyLike(String value) {
+            addCriterion("video_recall_strategy like", value, "videoRecallStrategy");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoRecallStrategyNotLike(String value) {
+            addCriterion("video_recall_strategy not like", value, "videoRecallStrategy");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoRecallStrategyIn(List<String> values) {
+            addCriterion("video_recall_strategy in", values, "videoRecallStrategy");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoRecallStrategyNotIn(List<String> values) {
+            addCriterion("video_recall_strategy not in", values, "videoRecallStrategy");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoRecallStrategyBetween(String value1, String value2) {
+            addCriterion("video_recall_strategy between", value1, value2, "videoRecallStrategy");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoRecallStrategyNotBetween(String value1, String value2) {
+            addCriterion("video_recall_strategy not between", value1, value2, "videoRecallStrategy");
+            return (Criteria) this;
+        }
+
+        public Criteria andRecallDateIsNull() {
+            addCriterion("recall_date is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRecallDateIsNotNull() {
+            addCriterion("recall_date is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andRecallDateEqualTo(Date value) {
+            addCriterionForJDBCDate("recall_date =", value, "recallDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andRecallDateNotEqualTo(Date value) {
+            addCriterionForJDBCDate("recall_date <>", value, "recallDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andRecallDateGreaterThan(Date value) {
+            addCriterionForJDBCDate("recall_date >", value, "recallDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andRecallDateGreaterThanOrEqualTo(Date value) {
+            addCriterionForJDBCDate("recall_date >=", value, "recallDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andRecallDateLessThan(Date value) {
+            addCriterionForJDBCDate("recall_date <", value, "recallDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andRecallDateLessThanOrEqualTo(Date value) {
+            addCriterionForJDBCDate("recall_date <=", value, "recallDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andRecallDateIn(List<Date> values) {
+            addCriterionForJDBCDate("recall_date in", values, "recallDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andRecallDateNotIn(List<Date> values) {
+            addCriterionForJDBCDate("recall_date not in", values, "recallDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andRecallDateBetween(Date value1, Date value2) {
+            addCriterionForJDBCDate("recall_date between", value1, value2, "recallDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andRecallDateNotBetween(Date value1, Date value2) {
+            addCriterionForJDBCDate("recall_date not between", value1, value2, "recallDate");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIsNull() {
+            addCriterion("`status` is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIsNotNull() {
+            addCriterion("`status` is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusEqualTo(Integer value) {
+            addCriterion("`status` =", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotEqualTo(Integer value) {
+            addCriterion("`status` <>", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusGreaterThan(Integer value) {
+            addCriterion("`status` >", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
+            addCriterion("`status` >=", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusLessThan(Integer value) {
+            addCriterion("`status` <", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusLessThanOrEqualTo(Integer value) {
+            addCriterion("`status` <=", value, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusIn(List<Integer> values) {
+            addCriterion("`status` in", values, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotIn(List<Integer> values) {
+            addCriterion("`status` not in", values, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusBetween(Integer value1, Integer value2) {
+            addCriterion("`status` between", value1, value2, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusNotBetween(Integer value1, Integer value2) {
+            addCriterion("`status` not between", value1, value2, "status");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusUpdateTimestampIsNull() {
+            addCriterion("status_update_timestamp is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusUpdateTimestampIsNotNull() {
+            addCriterion("status_update_timestamp is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusUpdateTimestampEqualTo(Long value) {
+            addCriterion("status_update_timestamp =", value, "statusUpdateTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusUpdateTimestampNotEqualTo(Long value) {
+            addCriterion("status_update_timestamp <>", value, "statusUpdateTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusUpdateTimestampGreaterThan(Long value) {
+            addCriterion("status_update_timestamp >", value, "statusUpdateTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusUpdateTimestampGreaterThanOrEqualTo(Long value) {
+            addCriterion("status_update_timestamp >=", value, "statusUpdateTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusUpdateTimestampLessThan(Long value) {
+            addCriterion("status_update_timestamp <", value, "statusUpdateTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusUpdateTimestampLessThanOrEqualTo(Long value) {
+            addCriterion("status_update_timestamp <=", value, "statusUpdateTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusUpdateTimestampIn(List<Long> values) {
+            addCriterion("status_update_timestamp in", values, "statusUpdateTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusUpdateTimestampNotIn(List<Long> values) {
+            addCriterion("status_update_timestamp not in", values, "statusUpdateTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusUpdateTimestampBetween(Long value1, Long value2) {
+            addCriterion("status_update_timestamp between", value1, value2, "statusUpdateTimestamp");
+            return (Criteria) this;
+        }
+
+        public Criteria andStatusUpdateTimestampNotBetween(Long value1, Long value2) {
+            addCriterion("status_update_timestamp not between", value1, value2, "statusUpdateTimestamp");
+            return (Criteria) this;
+        }
+    }
+
+    public static class Criteria extends GeneratedCriteria {
+
+        protected Criteria() {
+            super();
+        }
+    }
+
+    public static class Criterion {
+        private String condition;
+
+        private Object value;
+
+        private Object secondValue;
+
+        private boolean noValue;
+
+        private boolean singleValue;
+
+        private boolean betweenValue;
+
+        private boolean listValue;
+
+        private String typeHandler;
+
+        public String getCondition() {
+            return condition;
+        }
+
+        public Object getValue() {
+            return value;
+        }
+
+        public Object getSecondValue() {
+            return secondValue;
+        }
+
+        public boolean isNoValue() {
+            return noValue;
+        }
+
+        public boolean isSingleValue() {
+            return singleValue;
+        }
+
+        public boolean isBetweenValue() {
+            return betweenValue;
+        }
+
+        public boolean isListValue() {
+            return listValue;
+        }
+
+        public String getTypeHandler() {
+            return typeHandler;
+        }
+
+        protected Criterion(String condition) {
+            super();
+            this.condition = condition;
+            this.typeHandler = null;
+            this.noValue = true;
+        }
+
+        protected Criterion(String condition, Object value, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.typeHandler = typeHandler;
+            if (value instanceof List<?>) {
+                this.listValue = true;
+            } else {
+                this.singleValue = true;
+            }
+        }
+
+        protected Criterion(String condition, Object value) {
+            this(condition, value, null);
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
+            super();
+            this.condition = condition;
+            this.value = value;
+            this.secondValue = secondValue;
+            this.typeHandler = typeHandler;
+            this.betweenValue = true;
+        }
+
+        protected Criterion(String condition, Object value, Object secondValue) {
+            this(condition, value, secondValue, null);
+        }
+    }
+}

+ 43 - 16
long-article-server/src/main/java/com/tzld/piaoquan/longarticle/service/local/impl/ContentServiceImpl.java

@@ -20,6 +20,8 @@ import com.tzld.piaoquan.longarticle.service.remote.VideoService;
 import com.tzld.piaoquan.longarticle.utils.DateUtil;
 import com.tzld.piaoquan.longarticle.utils.LarkRobotUtil;
 import com.tzld.piaoquan.longarticle.utils.ToolUtil;
+import com.tzld.piaoquan.longarticle.utils.VideoUtils;
+import com.tzld.piaoquan.longarticle.utils.other.NlpUtils;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.BeanUtils;
@@ -28,6 +30,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.util.CollectionUtils;
 
 import java.util.*;
+import java.util.stream.Collectors;
 
 @Slf4j
 @Service
@@ -37,6 +40,10 @@ public class ContentServiceImpl implements ContentService {
 
     private Set<String> ghIdSet = new HashSet<String>();
 
+    private Set<String> accountNameSet = new HashSet<String>() {{
+        add("票圈乐活");
+    }};
+
     private final String SINGLE_VIDEO_UID = "76862180";
 
     private final Integer VIDEO_NUM = 3;
@@ -74,6 +81,9 @@ public class ContentServiceImpl implements ContentService {
     @Autowired
     private AIVideoAbTestMapper aiVideoAbTestMapper;
 
+    @Autowired
+    private PiaoquanSourceVideoPoolMapper piaoquanSourceVideoPoolMapper;
+
     public void addMatchContent(MatchVideo matchVideo, String publishContentId) {
         PublishMatchContent publishMatchContent = new PublishMatchContent();
         publishMatchContent.setTraceId(matchVideo.getTraceId());
@@ -341,7 +351,10 @@ public class ContentServiceImpl implements ContentService {
             }
         }
         //发布小程序
+        int i = 0;
         for (CrawlerVideo crawlerVideo : contentMiniVideos) {
+            i++;
+            String videoPath = "";
             Integer crawlerVideoId = crawlerVideo.getId();
             String videoOssPath = crawlerVideo.getVideoOssPath();
             String platform = crawlerVideo.getPlatform();
@@ -353,22 +366,34 @@ public class ContentServiceImpl implements ContentService {
                 continue;
             }
             String title = kimiText.getKimiTitle();
-            int transformationType;
-            int publishType = 0;
-            String videoOriginType = "long_article";
-            Long videoOriginId = (long) crawlerVideoId;
-            VideoEndScreen videoEndScreen = existVideoEndScreen(videoOriginId, videoOriginType);
-            //查询到改写的视频  随机选择原视频或者改写后的视频
-            if (videoEndScreen != null) {
-                transformationType = TransformationEnum.EXIST.getType();
-                //存在片尾引导后  50%概率走有片尾引导的视频
-                publishType = ToolUtil.getRandom(2);
-                if (publishType == 1) {
-                    videoOssPath = videoEndScreen.getNewOssPath();
-                    title = videoEndScreen.getTitle();
+            //更换目标公众号的文章的第二条视频
+            if (accountNameSet.contains(matchVideo.getAccountName()) && i == 2) {
+                String articleTitle = kimiText.getArticleTitle();
+                PiaoquanSourceVideoPoolExample example = new PiaoquanSourceVideoPoolExample();
+                example.createCriteria().andStatusEqualTo(2);
+                List<PiaoquanSourceVideoPool> piaoquanSourceVideoPools = piaoquanSourceVideoPoolMapper.selectByExample(example);
+                if (!CollectionUtils.isEmpty(piaoquanSourceVideoPools)) {
+                    List<String> titles = piaoquanSourceVideoPools.stream().map(PiaoquanSourceVideoPool::getTitle).collect(Collectors.toList());
+                    List<Float> floats = NlpUtils.getTitleSimilarityWithNlp(articleTitle, titles);
+                    if (floats != null) {
+                        int maxIndex = 0;
+                        float maxValue = floats.get(0);
+                        for (int j = 1; j < floats.size(); j++) {
+                            if (floats.get(j) > maxValue) {
+                                maxValue = floats.get(j);
+                                maxIndex = j;
+                            }
+                        }
+                        PiaoquanSourceVideoPool piaoquanSourceVideoPool = piaoquanSourceVideoPools.get(maxIndex);
+                        JSONObject videoDetail = VideoUtils.getVideoDetail((long) piaoquanSourceVideoPool.getVideoId());
+                        if (videoDetail != null) {
+                            crawlerVideoId = piaoquanSourceVideoPool.getVideoId();
+                            videoOssPath = videoDetail.getString("ossVideoPath");
+                            videoPath = videoDetail.getString("videoPath");
+                            log.info("replace video new videoId={}", piaoquanSourceVideoPool.getVideoId());
+                        }
+                    }
                 }
-            } else {
-                transformationType = TransformationEnum.NOT_EXIST.getType();
             }
             if (StringUtils.isEmpty(userId)) {
                 userId = SINGLE_VIDEO_UID;
@@ -377,7 +402,9 @@ public class ContentServiceImpl implements ContentService {
             if (videoDetail == null) {
                 continue;
             }
-            logEvent(videoOriginType, videoOriginId, videoDetail.getVideoId(), transformationType, publishType);
+            if (StringUtils.isEmpty(videoDetail.getVideoPath())) {
+                videoDetail.setVideoPath(videoPath);
+            }
             videoDetail.setCrawlerVideoId(crawlerVideoId);
             videoDetail.setKimiTitle(title);
             videoDetail.setUid(userId);

+ 37 - 0
long-article-server/src/main/java/com/tzld/piaoquan/longarticle/utils/VideoUtils.java

@@ -0,0 +1,37 @@
+package com.tzld.piaoquan.longarticle.utils;
+
+import cn.hutool.http.HttpRequest;
+import cn.hutool.http.HttpResponse;
+import cn.hutool.json.JSONUtil;
+import com.alibaba.fastjson.JSONObject;
+import lombok.extern.slf4j.Slf4j;
+
+import java.util.HashMap;
+import java.util.Map;
+
+@Slf4j
+public class VideoUtils {
+
+    private static final String VIDEO_DETAIL_URL = "https://longvideoapi.piaoquantv.com/longvideoapi/openapi/video/batchSelectVideoInfo";
+
+
+    public static JSONObject getVideoDetail(Long videoId) {
+        JSONObject params = new JSONObject();
+        Map<String, Object> data = new HashMap<>();
+        data.put("videoIdList", new String[]{String.valueOf(videoId)});
+        HttpResponse response = HttpRequest.post(VIDEO_DETAIL_URL)
+                .header("Content-Type", "application/json")
+                .body(JSONUtil.toJsonStr(data)) // 将数据转换为 JSON 字符串
+                .execute();
+        JSONObject jsonObject = JSONObject.parseObject(response.body());
+        if (jsonObject.getJSONArray("data") != null) {
+            return jsonObject.getJSONArray("data").getJSONObject(0);
+        } else {
+            return null;
+        }
+    }
+
+    public static void main(String[] args) {
+        System.out.println(getVideoDetail(11466300L).getString("ossVideoPath"));
+    }
+}

+ 14 - 0
long-article-server/src/main/java/com/tzld/piaoquan/longarticle/utils/other/NlpUtils.java

@@ -3,6 +3,7 @@ package com.tzld.piaoquan.longarticle.utils.other;
 import cn.hutool.http.HttpRequest;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
+import com.tzld.piaoquan.longarticle.utils.LarkRobotUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.util.CollectionUtils;
 
@@ -26,6 +27,19 @@ public class NlpUtils {
         System.out.println(nlpTitleSimilarity(nlp_base_url_1, "这是我的女儿", titleList));
     }
 
+    public static List<Float> getTitleSimilarityWithNlp(String oriTitle, List<String> titleList) {
+        List<Float> baseScores;
+        baseScores = NlpUtils.baseNlpTitleSimilarity1(oriTitle, titleList);
+        if (!CollectionUtils.isEmpty(baseScores)) {
+            return baseScores;
+        }
+        baseScores = NlpUtils.baseNlpTitleSimilarity2(oriTitle, titleList);
+        if (!CollectionUtils.isEmpty(baseScores)) {
+            return baseScores;
+        }
+        return null;
+    }
+
     public static List<Float> baseNlpTitleSimilarity1(String oriTitle, List<String> titleList){
         return nlpTitleSimilarity(nlp_base_url_1, oriTitle, titleList);
     }

+ 261 - 0
long-article-server/src/main/resources/mapper/longarticle/PiaoquanSourceVideoPoolMapper.xml

@@ -0,0 +1,261 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.tzld.piaoquan.longarticle.dao.mapper.longarticle.PiaoquanSourceVideoPoolMapper">
+  <resultMap id="BaseResultMap" type="com.tzld.piaoquan.longarticle.model.po.longarticle.PiaoquanSourceVideoPool">
+    <id column="id" jdbcType="INTEGER" property="id" />
+    <result column="video_id" jdbcType="INTEGER" property="videoId" />
+    <result column="title" jdbcType="VARCHAR" property="title" />
+    <result column="category" jdbcType="VARCHAR" property="category" />
+    <result column="video_recall_strategy" jdbcType="VARCHAR" property="videoRecallStrategy" />
+    <result column="recall_date" jdbcType="DATE" property="recallDate" />
+    <result column="status" jdbcType="INTEGER" property="status" />
+    <result column="status_update_timestamp" jdbcType="BIGINT" property="statusUpdateTimestamp" />
+  </resultMap>
+  <sql id="Example_Where_Clause">
+    <where>
+      <foreach collection="oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Update_By_Example_Where_Clause">
+    <where>
+      <foreach collection="example.oredCriteria" item="criteria" separator="or">
+        <if test="criteria.valid">
+          <trim prefix="(" prefixOverrides="and" suffix=")">
+            <foreach collection="criteria.criteria" item="criterion">
+              <choose>
+                <when test="criterion.noValue">
+                  and ${criterion.condition}
+                </when>
+                <when test="criterion.singleValue">
+                  and ${criterion.condition} #{criterion.value}
+                </when>
+                <when test="criterion.betweenValue">
+                  and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
+                </when>
+                <when test="criterion.listValue">
+                  and ${criterion.condition}
+                  <foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
+                    #{listItem}
+                  </foreach>
+                </when>
+              </choose>
+            </foreach>
+          </trim>
+        </if>
+      </foreach>
+    </where>
+  </sql>
+  <sql id="Base_Column_List">
+    id, video_id, title, category, video_recall_strategy, recall_date, `status`, status_update_timestamp
+  </sql>
+  <select id="selectByExample" parameterType="com.tzld.piaoquan.longarticle.model.po.longarticle.PiaoquanSourceVideoPoolExample" resultMap="BaseResultMap">
+    select
+    <if test="distinct">
+      distinct
+    </if>
+    <include refid="Base_Column_List" />
+    from piaoquan_source_video_pool
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+    <if test="orderByClause != null">
+      order by ${orderByClause}
+    </if>
+    <if test="page != null">
+      limit #{page.offset} , #{page.pageSize}
+    </if>
+  </select>
+  <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
+    select 
+    <include refid="Base_Column_List" />
+    from piaoquan_source_video_pool
+    where id = #{id,jdbcType=INTEGER}
+  </select>
+  <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
+    delete from piaoquan_source_video_pool
+    where id = #{id,jdbcType=INTEGER}
+  </delete>
+  <delete id="deleteByExample" parameterType="com.tzld.piaoquan.longarticle.model.po.longarticle.PiaoquanSourceVideoPoolExample">
+    delete from piaoquan_source_video_pool
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </delete>
+  <insert id="insert" parameterType="com.tzld.piaoquan.longarticle.model.po.longarticle.PiaoquanSourceVideoPool">
+    insert into piaoquan_source_video_pool (id, video_id, title, 
+      category, video_recall_strategy, recall_date, 
+      `status`, status_update_timestamp)
+    values (#{id,jdbcType=INTEGER}, #{videoId,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR}, 
+      #{category,jdbcType=VARCHAR}, #{videoRecallStrategy,jdbcType=VARCHAR}, #{recallDate,jdbcType=DATE}, 
+      #{status,jdbcType=INTEGER}, #{statusUpdateTimestamp,jdbcType=BIGINT})
+  </insert>
+  <insert id="insertSelective" parameterType="com.tzld.piaoquan.longarticle.model.po.longarticle.PiaoquanSourceVideoPool">
+    insert into piaoquan_source_video_pool
+    <trim prefix="(" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        id,
+      </if>
+      <if test="videoId != null">
+        video_id,
+      </if>
+      <if test="title != null">
+        title,
+      </if>
+      <if test="category != null">
+        category,
+      </if>
+      <if test="videoRecallStrategy != null">
+        video_recall_strategy,
+      </if>
+      <if test="recallDate != null">
+        recall_date,
+      </if>
+      <if test="status != null">
+        `status`,
+      </if>
+      <if test="statusUpdateTimestamp != null">
+        status_update_timestamp,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides=",">
+      <if test="id != null">
+        #{id,jdbcType=INTEGER},
+      </if>
+      <if test="videoId != null">
+        #{videoId,jdbcType=INTEGER},
+      </if>
+      <if test="title != null">
+        #{title,jdbcType=VARCHAR},
+      </if>
+      <if test="category != null">
+        #{category,jdbcType=VARCHAR},
+      </if>
+      <if test="videoRecallStrategy != null">
+        #{videoRecallStrategy,jdbcType=VARCHAR},
+      </if>
+      <if test="recallDate != null">
+        #{recallDate,jdbcType=DATE},
+      </if>
+      <if test="status != null">
+        #{status,jdbcType=INTEGER},
+      </if>
+      <if test="statusUpdateTimestamp != null">
+        #{statusUpdateTimestamp,jdbcType=BIGINT},
+      </if>
+    </trim>
+  </insert>
+  <select id="countByExample" parameterType="com.tzld.piaoquan.longarticle.model.po.longarticle.PiaoquanSourceVideoPoolExample" resultType="java.lang.Long">
+    select count(*) from piaoquan_source_video_pool
+    <if test="_parameter != null">
+      <include refid="Example_Where_Clause" />
+    </if>
+  </select>
+  <update id="updateByExampleSelective" parameterType="map">
+    update piaoquan_source_video_pool
+    <set>
+      <if test="record.id != null">
+        id = #{record.id,jdbcType=INTEGER},
+      </if>
+      <if test="record.videoId != null">
+        video_id = #{record.videoId,jdbcType=INTEGER},
+      </if>
+      <if test="record.title != null">
+        title = #{record.title,jdbcType=VARCHAR},
+      </if>
+      <if test="record.category != null">
+        category = #{record.category,jdbcType=VARCHAR},
+      </if>
+      <if test="record.videoRecallStrategy != null">
+        video_recall_strategy = #{record.videoRecallStrategy,jdbcType=VARCHAR},
+      </if>
+      <if test="record.recallDate != null">
+        recall_date = #{record.recallDate,jdbcType=DATE},
+      </if>
+      <if test="record.status != null">
+        `status` = #{record.status,jdbcType=INTEGER},
+      </if>
+      <if test="record.statusUpdateTimestamp != null">
+        status_update_timestamp = #{record.statusUpdateTimestamp,jdbcType=BIGINT},
+      </if>
+    </set>
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByExample" parameterType="map">
+    update piaoquan_source_video_pool
+    set id = #{record.id,jdbcType=INTEGER},
+      video_id = #{record.videoId,jdbcType=INTEGER},
+      title = #{record.title,jdbcType=VARCHAR},
+      category = #{record.category,jdbcType=VARCHAR},
+      video_recall_strategy = #{record.videoRecallStrategy,jdbcType=VARCHAR},
+      recall_date = #{record.recallDate,jdbcType=DATE},
+      `status` = #{record.status,jdbcType=INTEGER},
+      status_update_timestamp = #{record.statusUpdateTimestamp,jdbcType=BIGINT}
+    <if test="_parameter != null">
+      <include refid="Update_By_Example_Where_Clause" />
+    </if>
+  </update>
+  <update id="updateByPrimaryKeySelective" parameterType="com.tzld.piaoquan.longarticle.model.po.longarticle.PiaoquanSourceVideoPool">
+    update piaoquan_source_video_pool
+    <set>
+      <if test="videoId != null">
+        video_id = #{videoId,jdbcType=INTEGER},
+      </if>
+      <if test="title != null">
+        title = #{title,jdbcType=VARCHAR},
+      </if>
+      <if test="category != null">
+        category = #{category,jdbcType=VARCHAR},
+      </if>
+      <if test="videoRecallStrategy != null">
+        video_recall_strategy = #{videoRecallStrategy,jdbcType=VARCHAR},
+      </if>
+      <if test="recallDate != null">
+        recall_date = #{recallDate,jdbcType=DATE},
+      </if>
+      <if test="status != null">
+        `status` = #{status,jdbcType=INTEGER},
+      </if>
+      <if test="statusUpdateTimestamp != null">
+        status_update_timestamp = #{statusUpdateTimestamp,jdbcType=BIGINT},
+      </if>
+    </set>
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+  <update id="updateByPrimaryKey" parameterType="com.tzld.piaoquan.longarticle.model.po.longarticle.PiaoquanSourceVideoPool">
+    update piaoquan_source_video_pool
+    set video_id = #{videoId,jdbcType=INTEGER},
+      title = #{title,jdbcType=VARCHAR},
+      category = #{category,jdbcType=VARCHAR},
+      video_recall_strategy = #{videoRecallStrategy,jdbcType=VARCHAR},
+      recall_date = #{recallDate,jdbcType=DATE},
+      `status` = #{status,jdbcType=INTEGER},
+      status_update_timestamp = #{statusUpdateTimestamp,jdbcType=BIGINT}
+    where id = #{id,jdbcType=INTEGER}
+  </update>
+</mapper>

+ 4 - 2
long-article-server/src/main/resources/mybatis-generator-config.xml

@@ -66,8 +66,10 @@
 <!--        <table tableName="long_articles_plan_account" domainObjectName="PlanAccount" alias=""/>-->
         <!--            <table tableName="long_articles_plan" domainObjectName="Plan" alias=""/>-->
 <!--        <table tableName="long_articles_publish_content" domainObjectName="PublishContent" alias=""/>-->
-        <table tableName="long_articles_group_send_result" domainObjectName="GroupSendResult" alias=""/>
-<!--                <table tableName="long_articles_publish_miniprogram" domainObjectName="PublishMiniprogram" alias=""/>-->
+<!--        <table tableName="long_articles_group_send_result" domainObjectName="GroupSendResult" alias=""/>-->
+        <table tableName="piaoquan_source_video_pool" domainObjectName="PiaoquanSourceVideoPool" alias=""/>
+
+        <!--                <table tableName="long_articles_publish_miniprogram" domainObjectName="PublishMiniprogram" alias=""/>-->
 <!--        <table tableName="get_off_videos" domainObjectName="OffVideo" alias=""/>-->
 
     </context>