Browse Source

审核标题修改

wangyunpeng 6 months ago
parent
commit
2723dd5d14

+ 4 - 1
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/mapper/longArticle/ArticleAuditMapper.java

@@ -18,5 +18,8 @@ public interface ArticleAuditMapper {
     void updateCrawlerVideoIsIllegal(List<Integer> illegalVideoIds, Integer isIllegal);
 
     List<String> searchFilterValueByItemName(String itemName, String searchKeyword);
-    
+
+    void updateArticleTitle(String contentId, String title);
+
+    void updateVideoTitle(String contentId, String title);
 }

+ 9 - 0
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/model/param/videoAudit/ArticleTitleUpdateParam.java

@@ -0,0 +1,9 @@
+package com.tzld.longarticle.recommend.server.model.param.videoAudit;
+
+import lombok.Data;
+
+@Data
+public class ArticleTitleUpdateParam {
+    private String contentId;
+    private String title;
+}

+ 9 - 0
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/model/param/videoAudit/VideoTitleUpdateParam.java

@@ -0,0 +1,9 @@
+package com.tzld.longarticle.recommend.server.model.param.videoAudit;
+
+import lombok.Data;
+
+@Data
+public class VideoTitleUpdateParam {
+    private String contentId;
+    private String title;
+}

+ 9 - 4
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/service/recommend/ArticleVideoAuditService.java

@@ -10,10 +10,7 @@ import com.tzld.longarticle.recommend.server.model.entity.longArticle.ArticleReM
 import com.tzld.longarticle.recommend.server.model.entity.longArticle.LongArticleCrawlerVideo;
 import com.tzld.longarticle.recommend.server.model.entity.longArticle.LongArticleTitleAudit;
 import com.tzld.longarticle.recommend.server.model.entity.longArticle.LongArticlesMatchVideo;
-import com.tzld.longarticle.recommend.server.model.param.videoAudit.ArticleAuditParam;
-import com.tzld.longarticle.recommend.server.model.param.videoAudit.ArticleVideoAuditListParam;
-import com.tzld.longarticle.recommend.server.model.param.videoAudit.AuditFilterParam;
-import com.tzld.longarticle.recommend.server.model.param.videoAudit.VideoAuditParam;
+import com.tzld.longarticle.recommend.server.model.param.videoAudit.*;
 import com.tzld.longarticle.recommend.server.model.vo.ArticleVideoAuditListVO;
 import com.tzld.longarticle.recommend.server.repository.longArticle.*;
 import com.tzld.longarticle.recommend.server.util.page.Page;
@@ -216,4 +213,12 @@ public class ArticleVideoAuditService {
         }
         return ReturnT.SUCCESS;
     }
+
+    public void updateArticleTitle(ArticleTitleUpdateParam param) {
+        articleAuditMapper.updateArticleTitle(param.getContentId(), param.getTitle());
+    }
+
+    public void updateVideoTitle(VideoTitleUpdateParam param) {
+        articleAuditMapper.updateVideoTitle(param.getContentId(), param.getTitle());
+    }
 }

+ 15 - 4
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/web/recommend/ArticleVideoAuditController.java

@@ -1,10 +1,7 @@
 package com.tzld.longarticle.recommend.server.web.recommend;
 
 import com.tzld.longarticle.recommend.server.common.response.CommonResponse;
-import com.tzld.longarticle.recommend.server.model.param.videoAudit.ArticleAuditParam;
-import com.tzld.longarticle.recommend.server.model.param.videoAudit.ArticleVideoAuditListParam;
-import com.tzld.longarticle.recommend.server.model.param.videoAudit.AuditFilterParam;
-import com.tzld.longarticle.recommend.server.model.param.videoAudit.VideoAuditParam;
+import com.tzld.longarticle.recommend.server.model.param.videoAudit.*;
 import com.tzld.longarticle.recommend.server.model.vo.ArticleVideoAuditListVO;
 import com.tzld.longarticle.recommend.server.service.recommend.ArticleVideoAuditService;
 import com.tzld.longarticle.recommend.server.util.page.Page;
@@ -51,4 +48,18 @@ public class ArticleVideoAuditController {
         return CommonResponse.success();
     }
 
+
+    @PostMapping("/updateArticleTitle")
+    public CommonResponse<Void> updateArticleTitle(@RequestBody ArticleTitleUpdateParam param) {
+        service.updateArticleTitle(param);
+        return CommonResponse.success();
+    }
+
+
+    @PostMapping("/updateVideoTitle")
+    public CommonResponse<Void> updateVideoTitle(@RequestBody VideoTitleUpdateParam param) {
+        service.updateVideoTitle(param);
+        return CommonResponse.success();
+    }
+
 }

+ 12 - 0
long-article-recommend-service/src/main/resources/mapper/longArticle/ArticleAuditMapper.xml

@@ -119,4 +119,16 @@
         </choose>
     </select>
 
+    <update id="updateArticleTitle">
+        update long_articles_text
+        set article_title = #{title}
+        where content_id = #{contentId}
+    </update>
+
+    <update id="updateVideoTitle">
+        update long_articles_text
+        set kimi_title = #{title}
+        where content_id = #{contentId}
+    </update>
+
 </mapper>