Przeglądaj źródła

增加计划id名单 增加审核表字段

xueyiming 5 miesięcy temu
rodzic
commit
4bbbda64b2

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

@@ -5,6 +5,8 @@ public class TitleAudit {
 
     private Integer status;
 
+    private String flowPoolLevel;
+
     private Long createTimestamp;
 
     private String auditAccount;
@@ -27,6 +29,14 @@ public class TitleAudit {
         this.status = status;
     }
 
+    public String getFlowPoolLevel() {
+        return flowPoolLevel;
+    }
+
+    public void setFlowPoolLevel(String flowPoolLevel) {
+        this.flowPoolLevel = flowPoolLevel;
+    }
+
     public Long getCreateTimestamp() {
         return createTimestamp;
     }
@@ -59,6 +69,7 @@ public class TitleAudit {
         sb.append("Hash = ").append(hashCode());
         sb.append(", contentId=").append(contentId);
         sb.append(", status=").append(status);
+        sb.append(", flowPoolLevel=").append(flowPoolLevel);
         sb.append(", createTimestamp=").append(createTimestamp);
         sb.append(", auditAccount=").append(auditAccount);
         sb.append(", auditTimestamp=").append(auditTimestamp);

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

@@ -245,6 +245,76 @@ public class TitleAuditExample {
             return (Criteria) this;
         }
 
+        public Criteria andFlowPoolLevelIsNull() {
+            addCriterion("flow_pool_level is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFlowPoolLevelIsNotNull() {
+            addCriterion("flow_pool_level is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andFlowPoolLevelEqualTo(String value) {
+            addCriterion("flow_pool_level =", value, "flowPoolLevel");
+            return (Criteria) this;
+        }
+
+        public Criteria andFlowPoolLevelNotEqualTo(String value) {
+            addCriterion("flow_pool_level <>", value, "flowPoolLevel");
+            return (Criteria) this;
+        }
+
+        public Criteria andFlowPoolLevelGreaterThan(String value) {
+            addCriterion("flow_pool_level >", value, "flowPoolLevel");
+            return (Criteria) this;
+        }
+
+        public Criteria andFlowPoolLevelGreaterThanOrEqualTo(String value) {
+            addCriterion("flow_pool_level >=", value, "flowPoolLevel");
+            return (Criteria) this;
+        }
+
+        public Criteria andFlowPoolLevelLessThan(String value) {
+            addCriterion("flow_pool_level <", value, "flowPoolLevel");
+            return (Criteria) this;
+        }
+
+        public Criteria andFlowPoolLevelLessThanOrEqualTo(String value) {
+            addCriterion("flow_pool_level <=", value, "flowPoolLevel");
+            return (Criteria) this;
+        }
+
+        public Criteria andFlowPoolLevelLike(String value) {
+            addCriterion("flow_pool_level like", value, "flowPoolLevel");
+            return (Criteria) this;
+        }
+
+        public Criteria andFlowPoolLevelNotLike(String value) {
+            addCriterion("flow_pool_level not like", value, "flowPoolLevel");
+            return (Criteria) this;
+        }
+
+        public Criteria andFlowPoolLevelIn(List<String> values) {
+            addCriterion("flow_pool_level in", values, "flowPoolLevel");
+            return (Criteria) this;
+        }
+
+        public Criteria andFlowPoolLevelNotIn(List<String> values) {
+            addCriterion("flow_pool_level not in", values, "flowPoolLevel");
+            return (Criteria) this;
+        }
+
+        public Criteria andFlowPoolLevelBetween(String value1, String value2) {
+            addCriterion("flow_pool_level between", value1, value2, "flowPoolLevel");
+            return (Criteria) this;
+        }
+
+        public Criteria andFlowPoolLevelNotBetween(String value1, String value2) {
+            addCriterion("flow_pool_level not between", value1, value2, "flowPoolLevel");
+            return (Criteria) this;
+        }
+
         public Criteria andCreateTimestampIsNull() {
             addCriterion("create_timestamp is null");
             return (Criteria) this;

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

@@ -37,6 +37,7 @@ public class CardServiceImpl implements CardService {
         add("20250208065525959973866");
         add("20250208111811026884434");
         add("20250212125646224172850");
+        add("20250213023808593788754");
     }};
 
 

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

@@ -43,6 +43,7 @@ public class ContentServiceImpl implements ContentService {
         add("20250208065525959973866");
         add("20250208111811026884434");
         add("20250212125646224172850");
+        add("20250213023808593788754");
     }};
 
     @Autowired

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

@@ -4,10 +4,7 @@ import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.tzld.piaoquan.longarticle.dao.mapper.longarticle.CrawlerVideoMapper;
 import com.tzld.piaoquan.longarticle.dao.mapper.longarticle.TitleAuditMapper;
-import com.tzld.piaoquan.longarticle.model.po.longarticle.CrawlerVideo;
-import com.tzld.piaoquan.longarticle.model.po.longarticle.CrawlerVideoExample;
-import com.tzld.piaoquan.longarticle.model.po.longarticle.LongArticlesText;
-import com.tzld.piaoquan.longarticle.model.po.longarticle.TitleAudit;
+import com.tzld.piaoquan.longarticle.model.po.longarticle.*;
 import com.tzld.piaoquan.longarticle.utils.other.*;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.lang3.StringUtils;
@@ -106,12 +103,12 @@ public class CrawlerVideoServiceImpl {
     }
 
 
-    public boolean uploadCrawlerVideo(String contentId) {
-        boolean b = existUploadCrawlerVideo(contentId);
+    public boolean uploadCrawlerVideo(MatchVideo matchVideo) {
+        boolean b = existUploadCrawlerVideo(matchVideo.getContentId());
         if (b) {
             return true;
         }
-        boolean pushRes = pushOss(contentId);
+        boolean pushRes = pushOss(matchVideo.getContentId());
         if (pushRes) {
             try {
                 Random random = new Random();
@@ -119,7 +116,8 @@ public class CrawlerVideoServiceImpl {
                 // 将随机整数转换为字符
                 char auditAccount = (char) randomInt;
                 TitleAudit titleAudit = new TitleAudit();
-                titleAudit.setContentId(contentId);
+                titleAudit.setContentId(matchVideo.getContentId());
+                titleAudit.setFlowPoolLevel(matchVideo.getFlowPoolLevel());
                 titleAudit.setAuditAccount(String.valueOf(auditAccount));
                 titleAudit.setCreateTimestamp(System.currentTimeMillis());
                 titleAuditMapper.insertSelective(titleAudit);

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

@@ -454,7 +454,7 @@ public class MatchVideoServiceImpl {
             String lockValue = UUID.randomUUID().toString();
             boolean lock = redisLock.tryLock(lockKey, lockValue, 10, TimeUnit.MINUTES);
             if (lock) {
-                boolean res = crawlerVideoService.uploadCrawlerVideo(matchVideo.getContentId());
+                boolean res = crawlerVideoService.uploadCrawlerVideo(matchVideo);
                 if (res) {
                     updateStatus(matchVideo.getId(), ContentStatusEnum.SUCCESS_3.getStatusCode());
                     updateResultStatus(matchVideo.getContentId(), ContentResultStatusEnum.SUCCESS.getStatus());

+ 22 - 5
long-article-server/src/main/resources/mapper/longarticle/TitleAuditMapper.xml

@@ -4,6 +4,7 @@
   <resultMap id="BaseResultMap" type="com.tzld.piaoquan.longarticle.model.po.longarticle.TitleAudit">
     <id column="content_id" jdbcType="VARCHAR" property="contentId" />
     <result column="status" jdbcType="INTEGER" property="status" />
+    <result column="flow_pool_level" jdbcType="VARCHAR" property="flowPoolLevel" />
     <result column="create_timestamp" jdbcType="BIGINT" property="createTimestamp" />
     <result column="audit_account" jdbcType="VARCHAR" property="auditAccount" />
     <result column="audit_timestamp" jdbcType="BIGINT" property="auditTimestamp" />
@@ -67,7 +68,7 @@
     </where>
   </sql>
   <sql id="Base_Column_List">
-    content_id, `status`, create_timestamp, audit_account, audit_timestamp
+    content_id, `status`, flow_pool_level, create_timestamp, audit_account, audit_timestamp
   </sql>
   <select id="selectByExample" parameterType="com.tzld.piaoquan.longarticle.model.po.longarticle.TitleAuditExample" resultMap="BaseResultMap">
     select
@@ -103,10 +104,12 @@
     </if>
   </delete>
   <insert id="insert" parameterType="com.tzld.piaoquan.longarticle.model.po.longarticle.TitleAudit">
-    insert into long_articles_title_audit (content_id, `status`, create_timestamp, 
-      audit_account, audit_timestamp)
-    values (#{contentId,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{createTimestamp,jdbcType=BIGINT}, 
-      #{auditAccount,jdbcType=VARCHAR}, #{auditTimestamp,jdbcType=BIGINT})
+    insert into long_articles_title_audit (content_id, `status`, flow_pool_level, 
+      create_timestamp, audit_account, audit_timestamp
+      )
+    values (#{contentId,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{flowPoolLevel,jdbcType=VARCHAR}, 
+      #{createTimestamp,jdbcType=BIGINT}, #{auditAccount,jdbcType=VARCHAR}, #{auditTimestamp,jdbcType=BIGINT}
+      )
   </insert>
   <insert id="insertSelective" parameterType="com.tzld.piaoquan.longarticle.model.po.longarticle.TitleAudit">
     insert into long_articles_title_audit
@@ -117,6 +120,9 @@
       <if test="status != null">
         `status`,
       </if>
+      <if test="flowPoolLevel != null">
+        flow_pool_level,
+      </if>
       <if test="createTimestamp != null">
         create_timestamp,
       </if>
@@ -134,6 +140,9 @@
       <if test="status != null">
         #{status,jdbcType=INTEGER},
       </if>
+      <if test="flowPoolLevel != null">
+        #{flowPoolLevel,jdbcType=VARCHAR},
+      </if>
       <if test="createTimestamp != null">
         #{createTimestamp,jdbcType=BIGINT},
       </if>
@@ -160,6 +169,9 @@
       <if test="record.status != null">
         `status` = #{record.status,jdbcType=INTEGER},
       </if>
+      <if test="record.flowPoolLevel != null">
+        flow_pool_level = #{record.flowPoolLevel,jdbcType=VARCHAR},
+      </if>
       <if test="record.createTimestamp != null">
         create_timestamp = #{record.createTimestamp,jdbcType=BIGINT},
       </if>
@@ -178,6 +190,7 @@
     update long_articles_title_audit
     set content_id = #{record.contentId,jdbcType=VARCHAR},
       `status` = #{record.status,jdbcType=INTEGER},
+      flow_pool_level = #{record.flowPoolLevel,jdbcType=VARCHAR},
       create_timestamp = #{record.createTimestamp,jdbcType=BIGINT},
       audit_account = #{record.auditAccount,jdbcType=VARCHAR},
       audit_timestamp = #{record.auditTimestamp,jdbcType=BIGINT}
@@ -191,6 +204,9 @@
       <if test="status != null">
         `status` = #{status,jdbcType=INTEGER},
       </if>
+      <if test="flowPoolLevel != null">
+        flow_pool_level = #{flowPoolLevel,jdbcType=VARCHAR},
+      </if>
       <if test="createTimestamp != null">
         create_timestamp = #{createTimestamp,jdbcType=BIGINT},
       </if>
@@ -206,6 +222,7 @@
   <update id="updateByPrimaryKey" parameterType="com.tzld.piaoquan.longarticle.model.po.longarticle.TitleAudit">
     update long_articles_title_audit
     set `status` = #{status,jdbcType=INTEGER},
+      flow_pool_level = #{flowPoolLevel,jdbcType=VARCHAR},
       create_timestamp = #{createTimestamp,jdbcType=BIGINT},
       audit_account = #{auditAccount,jdbcType=VARCHAR},
       audit_timestamp = #{auditTimestamp,jdbcType=BIGINT}

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

@@ -60,7 +60,7 @@
 <!--            <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_text" domainObjectName="LongArticlesText" alias=""/>
+        <table tableName="long_articles_title_audit" domainObjectName="TitleAudit" alias=""/>
 <!--            <table tableName="long_articles_plan" domainObjectName="Plan" alias=""/>-->
 
 <!--                <table tableName="long_articles_publish_content" domainObjectName="PublishContent" alias=""/>-->