Kaynağa Gözat

审核标题修改

wangyunpeng 6 ay önce
ebeveyn
işleme
633c7fd421

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

@@ -1,5 +1,7 @@
 package com.tzld.longarticle.recommend.server.mapper.longArticle;
 
+import com.tzld.longarticle.recommend.server.model.param.videoAudit.ArticleTitleUpdateParam;
+import com.tzld.longarticle.recommend.server.model.param.videoAudit.VideoTitleUpdateParam;
 import com.tzld.longarticle.recommend.server.model.vo.ArticleVideoAuditListVO;
 import org.apache.ibatis.annotations.Mapper;
 
@@ -19,7 +21,7 @@ public interface ArticleAuditMapper {
 
     List<String> searchFilterValueByItemName(String itemName, String searchKeyword);
 
-    void updateArticleTitle(String contentId, String title);
+    void updateArticleTitle(ArticleTitleUpdateParam param, Long updateTime);
 
-    void updateVideoTitle(String contentId, String title);
+    void updateVideoTitle(VideoTitleUpdateParam param, Long updateTime);
 }

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

@@ -6,4 +6,5 @@ import lombok.Data;
 public class ArticleTitleUpdateParam {
     private String contentId;
     private String title;
+    private String updateAccount;
 }

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

@@ -7,4 +7,5 @@ public class VideoTitleUpdateParam {
     private String contentId;
     private Long videoId;
     private String title;
+    private String updateAccount;
 }

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

@@ -215,10 +215,12 @@ public class ArticleVideoAuditService {
     }
 
     public void updateArticleTitle(ArticleTitleUpdateParam param) {
-        articleAuditMapper.updateArticleTitle(param.getContentId(), param.getTitle());
+        long now = System.currentTimeMillis();
+        articleAuditMapper.updateArticleTitle(param, now);
     }
 
     public void updateVideoTitle(VideoTitleUpdateParam param) {
-        articleAuditMapper.updateVideoTitle(param.getContentId(), param.getTitle());
+        long now = System.currentTimeMillis();
+        articleAuditMapper.updateVideoTitle(param, now);
     }
 }

+ 10 - 4
long-article-recommend-service/src/main/resources/mapper/longArticle/ArticleAuditMapper.xml

@@ -121,14 +121,20 @@
 
     <update id="updateArticleTitle">
         update long_articles_text
-        set article_title = #{title}
-        where content_id = #{contentId}
+        set old_article_title = article_title,
+            article_title = #{param.title},
+            article_title_update_account = #{param.updateAccount},
+            article_title_update_timestamp = #{updateTime}
+        where content_id = #{param.contentId}
     </update>
 
     <update id="updateVideoTitle">
         update long_articles_text
-        set kimi_title = #{title}
-        where content_id = #{contentId}
+        set old_kimi_title = kimi_title,
+            kimi_title = #{param.title},
+            kimi_title_update_account = #{param.updateAccount},
+            kimi_title_update_timestamp = #{updateTime}
+        where content_id = #{param.contentId}
     </update>
 
 </mapper>