Sfoglia il codice sorgente

Merge branch 'wyp/0221-articleDelete' of Server/long-article-recommend into master

wangyunpeng 4 mesi fa
parent
commit
7de69d96b9

+ 1 - 1
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/mapper/aigc/PublishContentMapper.java

@@ -39,7 +39,7 @@ public interface PublishContentMapper {
 
     List<PublishGzhPushDTO> getPushByPushIdIn(List<String> pushIds);
 
-    List<PublishGzhPushDTO> getPushByPushTimeBetween(Long start, Long end);
+    List<PublishGzhPushDTO> getPushByPushTimeBetween(Long start, Long end, List<String> accountNames);
 
     List<PublishGzhPushContentRelDTO> getGroupPushRelByPushIdIn(List<String> pushIds);
 

+ 3 - 0
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/model/param/ArticleDeleteParam.java

@@ -2,10 +2,13 @@ package com.tzld.longarticle.recommend.server.model.param;
 
 import lombok.Data;
 
+import java.util.List;
+
 @Data
 public class ArticleDeleteParam {
 
     private String dateStrBegin;
     private String dateStrEnd;
 
+    private List<String> accountNames;
 }

+ 1 - 1
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/service/recommend/ArticleAuditService.java

@@ -864,7 +864,7 @@ public class ArticleAuditService {
             startTime = DateUtils.dateStrToTimestamp(param.getDateStrBegin(), "yyyyMMdd");
             endTime = DateUtils.dateStrToTimestamp(param.getDateStrEnd(), "yyyyMMdd");
         }
-        List<PublishGzhPushDTO> pushList = publishContentMapper.getPushByPushTimeBetween(startTime * 1000, endTime * 1000);
+        List<PublishGzhPushDTO> pushList = publishContentMapper.getPushByPushTimeBetween(startTime * 1000, endTime * 1000, param.getAccountNames());
         List<String> pushIds = pushList.stream().map(PublishGzhPushDTO::getPushId).collect(Collectors.toList());
         Map<String, String> pushIdMap = pushList.stream().filter(o -> StringUtils.hasText(o.getGroupPushMsgId()))
                 .collect(Collectors.toMap(PublishGzhPushDTO::getPushId, PublishGzhPushDTO::getGroupPushMsgId));

+ 7 - 0
long-article-recommend-service/src/main/resources/mapper/aigc/PublishContentMapper.xml

@@ -174,6 +174,13 @@
         from publish_gzh_push
         where push_finish_timestamp between #{start} and #{end}
         and push_type = 2 and push_status = 2 and publish_status = 2 and group_push_msg_id is not null
+        <if test="accountNames!= null and accountNames.size() > 0">
+            and publish_account_id in (select id from publish_account where name in
+            <foreach collection="accountNames" item="item" open="(" close=")" separator=",">
+                #{item}
+            </foreach>
+            )
+        </if>
     </select>
 
     <select id="getGroupPushRelByPushIdIn"