Explorar el Código

匹配失败待发布内容状态更新

wangyunpeng hace 4 días
padre
commit
f06d8b645a

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

@@ -117,4 +117,6 @@ public interface LongArticleBaseMapper {
     Long getMinGzhWaitingPublishContent(String planId, String accountId);
 
     List<Content> getPublishContentGzhWaiting(String planId, String accountId);
+
+    void updateContentStatusBySourceId(String sourceId);
 }

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

@@ -8,6 +8,7 @@ import com.tzld.longarticle.recommend.server.common.enums.recommend.ContentPoolE
 import com.tzld.longarticle.recommend.server.mapper.aigc.AigcBaseMapper;
 import com.tzld.longarticle.recommend.server.mapper.aigc.PublishContentMapper;
 import com.tzld.longarticle.recommend.server.mapper.longArticle.ArticleAuditMapper;
+import com.tzld.longarticle.recommend.server.mapper.longArticle.LongArticleBaseMapper;
 import com.tzld.longarticle.recommend.server.model.dto.PublishContentMiniprogramDTO;
 import com.tzld.longarticle.recommend.server.model.entity.aigc.ProducePlanExeRecord;
 import com.tzld.longarticle.recommend.server.model.entity.longArticle.*;
@@ -39,6 +40,8 @@ public class ArticleVideoAuditService {
     @Autowired
     private AigcBaseMapper aigcBaseMapper;
     @Autowired
+    private LongArticleBaseMapper longArticleBaseMapper;
+    @Autowired
     private ArticleAuditMapper articleAuditMapper;
     @Autowired
     private PublishContentMapper publishContentMapper;
@@ -515,4 +518,8 @@ public class ArticleVideoAuditService {
         }
         return titleAuditRepository.getByStatusIn(Arrays.asList(ArticleVideoAuditStatusEnum.PASS.getCode(), ArticleVideoAuditStatusEnum.REJECT.getCode()));
     }
+
+    public void updateContentStatusBySourceId(String sourceId) {
+        longArticleBaseMapper.updateContentStatusBySourceId(sourceId);
+    }
 }

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

@@ -97,4 +97,10 @@ public class ArticleVideoAuditController {
         return CommonResponse.success(service.getAllAuditArticle(timestamp));
     }
 
+    @GetMapping("/updateContentStatusBySourceId")
+    public CommonResponse<Void> updateContentStatusBySourceId(String sourceId) {
+        service.updateContentStatusBySourceId(sourceId);
+        return CommonResponse.success();
+    }
+
 }

+ 4 - 0
long-article-recommend-service/src/main/resources/mapper/longArticle/LongArticleBaseMapper.xml

@@ -482,4 +482,8 @@
           and status = 1
     </select>
 
+    <update id="updateContentStatusBySourceId">
+        update publish_content_gzh_waiting set status = 0 where source_id = #{sourceId}
+    </update>
+
 </mapper>