Ver Fonte

生成匹配小程序增加视频内容池、票圈视频

wangyunpeng há 1 semana atrás
pai
commit
d2601b6174

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

@@ -7,6 +7,10 @@ public class NewMatchVideo {
 
     private String contentId;
 
+    private String videoPoolTraceId;
+
+    private Long pqVideoId;
+
     private String flowPoolLevel;
 
     private Integer contentStatus;
@@ -33,6 +37,22 @@ public class NewMatchVideo {
         this.contentId = contentId;
     }
 
+    public String getVideoPoolTraceId() {
+        return videoPoolTraceId;
+    }
+
+    public void setVideoPoolTraceId(String videoPoolTraceId) {
+        this.videoPoolTraceId = videoPoolTraceId;
+    }
+
+    public Long getPqVideoId() {
+        return pqVideoId;
+    }
+
+    public void setPqVideoId(Long pqVideoId) {
+        this.pqVideoId = pqVideoId;
+    }
+
     public String getFlowPoolLevel() {
         return flowPoolLevel;
     }
@@ -81,6 +101,8 @@ public class NewMatchVideo {
         sb.append("Hash = ").append(hashCode());
         sb.append(", id=").append(id);
         sb.append(", contentId=").append(contentId);
+        sb.append(", videoPoolTraceId=").append(videoPoolTraceId);
+        sb.append(", pqVideoId=").append(pqVideoId);
         sb.append(", flowPoolLevel=").append(flowPoolLevel);
         sb.append(", contentStatus=").append(contentStatus);
         sb.append(", retryCount=").append(retryCount);

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

@@ -246,6 +246,136 @@ public class NewMatchVideoExample {
             return (Criteria) this;
         }
 
+        public Criteria andVideoPoolTraceIdIsNull() {
+            addCriterion("video_pool_trace_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoPoolTraceIdIsNotNull() {
+            addCriterion("video_pool_trace_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoPoolTraceIdEqualTo(String value) {
+            addCriterion("video_pool_trace_id =", value, "videoPoolTraceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoPoolTraceIdNotEqualTo(String value) {
+            addCriterion("video_pool_trace_id <>", value, "videoPoolTraceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoPoolTraceIdGreaterThan(String value) {
+            addCriterion("video_pool_trace_id >", value, "videoPoolTraceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoPoolTraceIdGreaterThanOrEqualTo(String value) {
+            addCriterion("video_pool_trace_id >=", value, "videoPoolTraceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoPoolTraceIdLessThan(String value) {
+            addCriterion("video_pool_trace_id <", value, "videoPoolTraceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoPoolTraceIdLessThanOrEqualTo(String value) {
+            addCriterion("video_pool_trace_id <=", value, "videoPoolTraceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoPoolTraceIdLike(String value) {
+            addCriterion("video_pool_trace_id like", value, "videoPoolTraceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoPoolTraceIdNotLike(String value) {
+            addCriterion("video_pool_trace_id not like", value, "videoPoolTraceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoPoolTraceIdIn(List<String> values) {
+            addCriterion("video_pool_trace_id in", values, "videoPoolTraceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoPoolTraceIdNotIn(List<String> values) {
+            addCriterion("video_pool_trace_id not in", values, "videoPoolTraceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoPoolTraceIdBetween(String value1, String value2) {
+            addCriterion("video_pool_trace_id between", value1, value2, "videoPoolTraceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andVideoPoolTraceIdNotBetween(String value1, String value2) {
+            addCriterion("video_pool_trace_id not between", value1, value2, "videoPoolTraceId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqVideoIdIsNull() {
+            addCriterion("pq_video_id is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqVideoIdIsNotNull() {
+            addCriterion("pq_video_id is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqVideoIdEqualTo(Long value) {
+            addCriterion("pq_video_id =", value, "pqVideoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqVideoIdNotEqualTo(Long value) {
+            addCriterion("pq_video_id <>", value, "pqVideoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqVideoIdGreaterThan(Long value) {
+            addCriterion("pq_video_id >", value, "pqVideoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqVideoIdGreaterThanOrEqualTo(Long value) {
+            addCriterion("pq_video_id >=", value, "pqVideoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqVideoIdLessThan(Long value) {
+            addCriterion("pq_video_id <", value, "pqVideoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqVideoIdLessThanOrEqualTo(Long value) {
+            addCriterion("pq_video_id <=", value, "pqVideoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqVideoIdIn(List<Long> values) {
+            addCriterion("pq_video_id in", values, "pqVideoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqVideoIdNotIn(List<Long> values) {
+            addCriterion("pq_video_id not in", values, "pqVideoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqVideoIdBetween(Long value1, Long value2) {
+            addCriterion("pq_video_id between", value1, value2, "pqVideoId");
+            return (Criteria) this;
+        }
+
+        public Criteria andPqVideoIdNotBetween(Long value1, Long value2) {
+            addCriterion("pq_video_id not between", value1, value2, "pqVideoId");
+            return (Criteria) this;
+        }
+
         public Criteria andFlowPoolLevelIsNull() {
             addCriterion("flow_pool_level is null");
             return (Criteria) this;

+ 5 - 0
long-article-server/src/main/java/com/tzld/piaoquan/longarticle/model/vo/MatchContentItem.java

@@ -16,4 +16,9 @@ public class MatchContentItem {
     private String produceContentId;
 
     private String title;
+
+    private String videoPoolTraceId;
+
+    private Long pqVideoId;
+
 }

+ 101 - 7
long-article-server/src/main/java/com/tzld/piaoquan/longarticle/service/local/impl/CrawlerVideoServiceImpl.java

@@ -2,27 +2,28 @@ package com.tzld.piaoquan.longarticle.service.local.impl;
 
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
+import com.tzld.piaoquan.longarticle.component.RedisLock;
 import com.tzld.piaoquan.longarticle.dao.mapper.longarticle.CrawlerVideoMapper;
+import com.tzld.piaoquan.longarticle.dao.mapper.longarticle.SingleVideoSourceMapper;
 import com.tzld.piaoquan.longarticle.dao.mapper.longarticle.TitleAuditMapper;
-import com.tzld.piaoquan.longarticle.model.dto.AuditContentRequest;
+import com.tzld.piaoquan.longarticle.model.bo.VideoDetail;
 import com.tzld.piaoquan.longarticle.model.po.longarticle.*;
 import com.tzld.piaoquan.longarticle.service.remote.MatchService;
+import com.tzld.piaoquan.longarticle.service.remote.VideoService;
 import com.tzld.piaoquan.longarticle.utils.LarkRobotUtil;
+import com.tzld.piaoquan.longarticle.utils.VideoUtils;
 import com.tzld.piaoquan.longarticle.utils.other.*;
 import com.tzld.piaoquan.longarticle.utils.page.Page;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.stereotype.Service;
 import org.springframework.util.CollectionUtils;
 
 import java.nio.file.Files;
 import java.nio.file.Paths;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.Random;
+import java.util.*;
+import java.util.concurrent.TimeUnit;
 import java.util.stream.Collectors;
 
 @Slf4j
@@ -38,6 +39,15 @@ public class CrawlerVideoServiceImpl {
     @Autowired
     private MatchService matchService;
 
+    @Autowired
+    private RedisLock redisLock;
+
+    @Autowired
+    private SingleVideoSourceMapper singleVideoSourceMapper;
+
+    @Autowired
+    private VideoService videoService;
+
     private static final String default_user_id = "69637498";
 
     private static final Double NLP_SIMILARITY_THRESHOLD = 0.55;
@@ -46,6 +56,8 @@ public class CrawlerVideoServiceImpl {
 
     private static final int MIN_NUM = 1;
 
+    private static final String SINGLE_VIDEO_LOCK_KEY = "single_video_lock_key_%s";
+
     private static final List<String> sensitiveWords = new ArrayList<String>() {{
         add("人民");
         add("必胜");
@@ -59,7 +71,7 @@ public class CrawlerVideoServiceImpl {
         add("习");
     }};
 
-    public boolean addCrawlerVideo(String contentId, String rootContentId, LongArticlesText kimiText) {
+    public boolean addCrawlerVideo(String contentId, String videoPoolTraceId, Long pqVideoId, String rootContentId, LongArticlesText kimiText) {
         if (existCrawlerVideo(contentId)) {
             return true;
         }
@@ -77,6 +89,29 @@ public class CrawlerVideoServiceImpl {
                 }
             }
         }
+        //// 查询视频池是否存在该视频
+        //if (StringUtils.isNotEmpty(videoPoolTraceId)) {
+        //    String lockKey = String.format(SINGLE_VIDEO_LOCK_KEY, contentId);
+        //    String lockValue = UUID.randomUUID().toString();
+        //    boolean lock = redisLock.tryLock(lockKey, lockValue, 300, TimeUnit.SECONDS);
+        //    if (lock) {
+        //        log.info("singleCrawlerVideo lock lockKey={}", lockKey);
+        //        Boolean res = addCrawlerVideoByVideoPoolTraceId(contentId, videoPoolTraceId);
+        //        log.info("singleCrawlerVideo unlock lockKey={}", lockKey);
+        //        redisLock.unlock(lockKey, lockValue);
+        //        if (res) {
+        //            return true;
+        //        }
+        //    }
+        //}
+        //if (Objects.nonNull(pqVideoId)) {
+        //    JSONObject videoDetail = VideoUtils.getVideoDetail(pqVideoId);;
+        //    if (Objects.nonNull(videoDetail)) {
+        //        CrawlerVideo crawlerVideo = piaoquanVideoProduce(contentId, videoDetail);
+        //        crawlerVideo.setCrawlerTime(new Date());
+        //        crawlerVideoMapper.insertSelective(crawlerVideo);
+        //    }
+        //}
         log.info("addCrawlerVideo contentId={} rootContentId={} kimiText={}", contentId, rootContentId, kimiText);
         //爬虫爬取视频
         int count = 0;
@@ -109,6 +144,65 @@ public class CrawlerVideoServiceImpl {
         return count >= MIN_NUM;
     }
 
+    public CrawlerVideo piaoquanVideoProduce(String contentId, JSONObject videoDetail) {
+        CrawlerVideo crawlerVideo = new CrawlerVideo();
+        crawlerVideo.setPlatform("piaoquan");
+        crawlerVideo.setDownloadStatus(2);
+        crawlerVideo.setVideoTitle(videoDetail.getString("title"));
+        crawlerVideo.setOutVideoId(String.valueOf(videoDetail.getLong("id")));
+        crawlerVideo.setVideoUrl(videoDetail.getString("videoPath"));
+        crawlerVideo.setVideoOssPath(videoDetail.getString("ossVideoPath"));
+        String shareImgPath = videoDetail.getString("shareImgPath");
+        if (StringUtils.isNotEmpty(shareImgPath)) {
+            String coverUrl = shareImgPath.substring(0, shareImgPath.indexOf("?"));
+            crawlerVideo.setCoverUrl(coverUrl);
+            String coverPath = VideoDownloader.downloadCover(crawlerVideo.getOutVideoId(), crawlerVideo.getPlatform(), crawlerVideo.getCoverUrl());
+            try {
+                String coverOssPath = OSSUploader.uploadToOSS(coverPath, "image");
+                crawlerVideo.setCoverOssPath(coverOssPath);
+                if (StringUtils.isNotEmpty(coverPath)) {
+                    Files.delete(Paths.get(coverPath));
+                }
+            } catch (Exception e) {
+                log.error("pushOss del file error", e);
+            }
+        }
+        crawlerVideo.setContentId(contentId);
+        crawlerVideo.setCrawlerTime(new Date());
+        crawlerVideo.setUserId(default_user_id);
+        return crawlerVideo;
+    }
+
+    public Boolean addCrawlerVideoByVideoPoolTraceId(String contentId, String videoPoolTraceId) {
+        //判断数据是否已经存在
+        CrawlerVideoExample crawlerVideoExample = new CrawlerVideoExample();
+        crawlerVideoExample.createCriteria().andContentIdEqualTo(contentId);
+        long l = crawlerVideoMapper.countByExample(crawlerVideoExample);
+        if (l > 0) {
+            return true;
+        }
+
+        //数据准备
+        SingleVideoSourceExample example = new SingleVideoSourceExample();
+        example.createCriteria().andContentTraceIdEqualTo(videoPoolTraceId);
+        List<SingleVideoSource> singleVideoSources = singleVideoSourceMapper.selectByExample(example);
+        if (CollectionUtils.isEmpty(singleVideoSources)) {
+            return false;
+        }
+        SingleVideoSource singleVideoSource = singleVideoSources.get(0);
+
+        //视频抓取表插入
+        CrawlerVideo crawlerVideo = new CrawlerVideo();
+        crawlerVideo.setDownloadStatus(2);
+        crawlerVideo.setVideoTitle(singleVideoSource.getArticleTitle());
+        crawlerVideo.setCoverUrl(singleVideoSource.getCoverUrl());
+        crawlerVideo.setVideoOssPath(singleVideoSource.getVideoOssPath());
+        crawlerVideo.setCrawlerTime(new Date(singleVideoSource.getCrawlerTimestamp() * 1000));
+        crawlerVideo.setContentId(contentId);
+        crawlerVideo.setPlatform(singleVideoSource.getPlatform());
+        crawlerVideoMapper.insertSelective(crawlerVideo);
+        return true;
+    }
 
     public boolean uploadCrawlerVideo(String contentId, String flowPoolLeve) {
         if (existUploadCrawlerVideo(contentId)) {

+ 1 - 1
long-article-server/src/main/java/com/tzld/piaoquan/longarticle/service/local/impl/MatchVideoServiceImpl.java

@@ -436,7 +436,7 @@ public class MatchVideoServiceImpl {
                 LongArticlesText kimiText = kimiService.getKimiText(matchVideo.getContentId());
                 if (kimiText.getKimiStatus() == 1) {
                     String rootContentId = getRootContentId(matchVideo.getContentId());
-                    boolean res = crawlerVideoService.addCrawlerVideo(matchVideo.getContentId(), rootContentId, kimiText);
+                    boolean res = crawlerVideoService.addCrawlerVideo(matchVideo.getContentId(), null, null, rootContentId, kimiText);
                     if (res) {
                         updateStatus(matchVideo.getId(), ContentStatusEnum.CRAWLER_SUCCESS.getStatusCode());
                     } else {

+ 4 - 3
long-article-server/src/main/java/com/tzld/piaoquan/longarticle/service/local/impl/NewMatchVideoServiceImpl.java

@@ -5,14 +5,12 @@ import com.tzld.piaoquan.longarticle.dao.mapper.aigc.ProducePlanExeRecordMapper;
 import com.tzld.piaoquan.longarticle.dao.mapper.longarticle.LongArticlesTextMapper;
 import com.tzld.piaoquan.longarticle.dao.mapper.longarticle.NewMatchVideoMapper;
 import com.tzld.piaoquan.longarticle.dao.mapper.longarticle.PromotionSourceMapper;
-import com.tzld.piaoquan.longarticle.model.bo.MatchContent;
 import com.tzld.piaoquan.longarticle.model.po.aigc.ProducePlanExeRecord;
 import com.tzld.piaoquan.longarticle.model.po.aigc.ProducePlanExeRecordExample;
 import com.tzld.piaoquan.longarticle.model.po.longarticle.*;
 import com.tzld.piaoquan.longarticle.model.vo.MatchContentItem;
 import com.tzld.piaoquan.longarticle.service.local.KimiService;
 import com.tzld.piaoquan.longarticle.service.local.NewMatchVideoService;
-import com.tzld.piaoquan.longarticle.service.remote.AigcService;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -63,6 +61,8 @@ public class NewMatchVideoServiceImpl implements NewMatchVideoService {
         }
         NewMatchVideo newMatchVideo = new NewMatchVideo();
         newMatchVideo.setContentId(matchContentItem.getProduceContentId());
+        newMatchVideo.setVideoPoolTraceId(matchContentItem.getVideoPoolTraceId());
+        newMatchVideo.setPqVideoId(matchContentItem.getPqVideoId());
         newMatchVideo.setFlowPoolLevel(matchContentItem.getFlowPoolLevelTag());
         newMatchVideo.setContentStatus(NewContentStatusEnum.DEFAULT.getStatusCode());
         newMatchVideoMapper.insertSelective(newMatchVideo);
@@ -178,7 +178,8 @@ public class NewMatchVideoServiceImpl implements NewMatchVideoService {
         try {
             LongArticlesText kimiText = kimiService.getKimiText(newMatchVideo.getContentId());
             String rootContentId = getRootContentId(newMatchVideo.getContentId());
-            updateSuccess = crawlerVideoService.addCrawlerVideo(newMatchVideo.getContentId(), rootContentId, kimiText);
+            updateSuccess = crawlerVideoService.addCrawlerVideo(newMatchVideo.getContentId(),
+                    newMatchVideo.getVideoPoolTraceId(), newMatchVideo.getPqVideoId(), rootContentId, kimiText);
         } catch (Exception e) {
             log.error("Failed to crawler match video content for ID: {}", newMatchVideo.getContentId(), e);
         }

+ 40 - 7
long-article-server/src/main/resources/mapper/longarticle/NewMatchVideoMapper.xml

@@ -4,6 +4,8 @@
   <resultMap id="BaseResultMap" type="com.tzld.piaoquan.longarticle.model.po.longarticle.NewMatchVideo">
     <id column="id" jdbcType="BIGINT" property="id" />
     <result column="content_id" jdbcType="VARCHAR" property="contentId" />
+    <result column="video_pool_trace_id" jdbcType="VARCHAR" property="videoPoolTraceId" />
+    <result column="pq_video_id" jdbcType="BIGINT" property="pqVideoId" />
     <result column="flow_pool_level" jdbcType="VARCHAR" property="flowPoolLevel" />
     <result column="content_status" jdbcType="INTEGER" property="contentStatus" />
     <result column="retry_count" jdbcType="INTEGER" property="retryCount" />
@@ -69,7 +71,8 @@
     </where>
   </sql>
   <sql id="Base_Column_List">
-    id, content_id, flow_pool_level, content_status, retry_count, create_time, update_time
+    id, content_id, video_pool_trace_id, pq_video_id, flow_pool_level, content_status, 
+    retry_count, create_time, update_time
   </sql>
   <select id="selectByExample" parameterType="com.tzld.piaoquan.longarticle.model.po.longarticle.NewMatchVideoExample" resultMap="BaseResultMap">
     select
@@ -105,12 +108,14 @@
     </if>
   </delete>
   <insert id="insert" parameterType="com.tzld.piaoquan.longarticle.model.po.longarticle.NewMatchVideo">
-    insert into long_articles_new_match_videos (id, content_id, flow_pool_level, 
-      content_status, retry_count, create_time, 
-      update_time)
-    values (#{id,jdbcType=BIGINT}, #{contentId,jdbcType=VARCHAR}, #{flowPoolLevel,jdbcType=VARCHAR}, 
-      #{contentStatus,jdbcType=INTEGER}, #{retryCount,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, 
-      #{updateTime,jdbcType=TIMESTAMP})
+    insert into long_articles_new_match_videos (id, content_id, video_pool_trace_id, 
+      pq_video_id, flow_pool_level, content_status, 
+      retry_count, create_time, update_time
+      )
+    values (#{id,jdbcType=BIGINT}, #{contentId,jdbcType=VARCHAR}, #{videoPoolTraceId,jdbcType=VARCHAR}, 
+      #{pqVideoId,jdbcType=BIGINT}, #{flowPoolLevel,jdbcType=VARCHAR}, #{contentStatus,jdbcType=INTEGER}, 
+      #{retryCount,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
+      )
   </insert>
   <insert id="insertSelective" parameterType="com.tzld.piaoquan.longarticle.model.po.longarticle.NewMatchVideo">
     insert into long_articles_new_match_videos
@@ -121,6 +126,12 @@
       <if test="contentId != null">
         content_id,
       </if>
+      <if test="videoPoolTraceId != null">
+        video_pool_trace_id,
+      </if>
+      <if test="pqVideoId != null">
+        pq_video_id,
+      </if>
       <if test="flowPoolLevel != null">
         flow_pool_level,
       </if>
@@ -144,6 +155,12 @@
       <if test="contentId != null">
         #{contentId,jdbcType=VARCHAR},
       </if>
+      <if test="videoPoolTraceId != null">
+        #{videoPoolTraceId,jdbcType=VARCHAR},
+      </if>
+      <if test="pqVideoId != null">
+        #{pqVideoId,jdbcType=BIGINT},
+      </if>
       <if test="flowPoolLevel != null">
         #{flowPoolLevel,jdbcType=VARCHAR},
       </if>
@@ -176,6 +193,12 @@
       <if test="record.contentId != null">
         content_id = #{record.contentId,jdbcType=VARCHAR},
       </if>
+      <if test="record.videoPoolTraceId != null">
+        video_pool_trace_id = #{record.videoPoolTraceId,jdbcType=VARCHAR},
+      </if>
+      <if test="record.pqVideoId != null">
+        pq_video_id = #{record.pqVideoId,jdbcType=BIGINT},
+      </if>
       <if test="record.flowPoolLevel != null">
         flow_pool_level = #{record.flowPoolLevel,jdbcType=VARCHAR},
       </if>
@@ -200,6 +223,8 @@
     update long_articles_new_match_videos
     set id = #{record.id,jdbcType=BIGINT},
       content_id = #{record.contentId,jdbcType=VARCHAR},
+      video_pool_trace_id = #{record.videoPoolTraceId,jdbcType=VARCHAR},
+      pq_video_id = #{record.pqVideoId,jdbcType=BIGINT},
       flow_pool_level = #{record.flowPoolLevel,jdbcType=VARCHAR},
       content_status = #{record.contentStatus,jdbcType=INTEGER},
       retry_count = #{record.retryCount,jdbcType=INTEGER},
@@ -215,6 +240,12 @@
       <if test="contentId != null">
         content_id = #{contentId,jdbcType=VARCHAR},
       </if>
+      <if test="videoPoolTraceId != null">
+        video_pool_trace_id = #{videoPoolTraceId,jdbcType=VARCHAR},
+      </if>
+      <if test="pqVideoId != null">
+        pq_video_id = #{pqVideoId,jdbcType=BIGINT},
+      </if>
       <if test="flowPoolLevel != null">
         flow_pool_level = #{flowPoolLevel,jdbcType=VARCHAR},
       </if>
@@ -236,6 +267,8 @@
   <update id="updateByPrimaryKey" parameterType="com.tzld.piaoquan.longarticle.model.po.longarticle.NewMatchVideo">
     update long_articles_new_match_videos
     set content_id = #{contentId,jdbcType=VARCHAR},
+      video_pool_trace_id = #{videoPoolTraceId,jdbcType=VARCHAR},
+      pq_video_id = #{pqVideoId,jdbcType=BIGINT},
       flow_pool_level = #{flowPoolLevel,jdbcType=VARCHAR},
       content_status = #{contentStatus,jdbcType=INTEGER},
       retry_count = #{retryCount,jdbcType=INTEGER},

+ 19 - 21
long-article-server/src/main/resources/mybatis-generator-config.xml

@@ -35,7 +35,8 @@
             <property name="forceBigDecimals" value="false"/>
         </javaTypeResolver>
 
-        <javaModelGenerator targetPackage="com.tzld.piaoquan.longarticle.model.po.longarticle" targetProject="long-article-server/src/main/java">
+        <javaModelGenerator targetPackage="com.tzld.piaoquan.longarticle.model.po.longarticle"
+                            targetProject="long-article-server/src/main/java">
             <property name="constructorBased" value="false"/>
             <property name="enableSubPackages" value="true"/>
             <property name="immutable" value="false"/>
@@ -49,29 +50,26 @@
                              targetProject="long-article-server/src/main/java">
             <property name="enableSubPackages" value="true"/>
         </javaClientGenerator>
-<!--        <table tableName="video_content_understanding" domainObjectName="VideoContentUnderstanding" alias="" />-->
-<!--        <table tableName="long_articles_match_videos" domainObjectName="MatchVideo" alias="" />-->
-<!--            <columnOverride column="response" javaType="java.lang.String" jdbcType="LONGVARCHAR" />-->
-<!--        </table>-->
-<!--        <table tableName="long_articles_text" domainObjectName="LongArticlesText" alias="">-->
-<!--            <columnOverride column="article_text" javaType="java.lang.String" jdbcType="LONGVARCHAR" />-->
-<!--        </table>-->
-<!--        <table tableName="long_articles_account_special_settings" domainObjectName="AccountSpecialSettings" alias=""/>-->
-<!--        <table tableName="ai_video_ab_test" domainObjectName="AIVideoAbTest" alias=""/>-->
+        <!--        <table tableName="video_content_understanding" domainObjectName="VideoContentUnderstanding" alias=""/>-->
+        <!--        <table tableName="long_articles_match_videos" domainObjectName="MatchVideo" alias="">-->
+        <!--            <columnOverride column="response" javaType="java.lang.String" jdbcType="LONGVARCHAR"/>-->
+        <!--        </table>-->
+        <!--        <table tableName="long_articles_text" domainObjectName="LongArticlesText" alias="">-->
+        <!--            <columnOverride column="article_text" javaType="java.lang.String" jdbcType="LONGVARCHAR"/>-->
+        <!--        </table>-->
+        <!--        <table tableName="long_articles_account_special_settings" domainObjectName="AccountSpecialSettings" alias=""/>-->
+        <!--        <table tableName="ai_video_ab_test" domainObjectName="AIVideoAbTest" alias=""/>-->
 
-        <!--            <columnOverride column="video_url" javaType="java.lang.String" jdbcType="LONGVARCHAR" />-->
-<!--            <columnOverride column="cover_url" javaType="java.lang.String" jdbcType="LONGVARCHAR" />-->
-<!--        </table>-->
-<!--        <table tableName="long_articles_root_source_id" domainObjectName="RootSource" alias=""/>-->
-        <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_new_match_videos" domainObjectName="NewMatchVideo" alias=""/>-->
+        <!--        <table tableName="long_articles_root_source_id" domainObjectName="RootSource" alias=""/>-->
+        <!--        <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_new_match_videos" domainObjectName="NewMatchVideo" alias=""/>
 
-<!--        <table tableName="video_keywords_map" domainObjectName="VideoKeywordsMap" alias=""/>-->
+        <!--        <table tableName="video_keywords_map" domainObjectName="VideoKeywordsMap" alias=""/>-->
 
-        <!--                <table tableName="long_articles_publish_miniprogram" domainObjectName="PublishMiniprogram" alias=""/>-->
-<!--        <table tableName="get_off_videos" domainObjectName="OffVideo" alias=""/>-->
+        <!--        <table tableName="long_articles_publish_miniprogram" domainObjectName="PublishMiniprogram" alias=""/>-->
+        <!--        <table tableName="get_off_videos" domainObjectName="OffVideo" alias=""/>-->
 
     </context>