Bläddra i källkod

Merge branch 'wyp/0111-whiteAccount' of Server/long-article-recommend into master

wangyunpeng 5 månader sedan
förälder
incheckning
f7718c4f22

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

@@ -2,6 +2,7 @@ package com.tzld.longarticle.recommend.server.service.recommend.recall;
 
 
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.alibaba.fastjson.JSONObject;
+import com.ctrip.framework.apollo.spring.annotation.ApolloJsonValue;
 import com.google.common.cache.Cache;
 import com.google.common.cache.Cache;
 import com.google.common.cache.CacheBuilder;
 import com.google.common.cache.CacheBuilder;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Lists;
@@ -115,6 +116,8 @@ public class RecallService implements ApplicationContextAware {
     private Boolean contentHisFeishuEnable;
     private Boolean contentHisFeishuEnable;
     @Value("${morning.noon.fission.rate:0.64}")
     @Value("${morning.noon.fission.rate:0.64}")
     private double morningNoonFissionRate;
     private double morningNoonFissionRate;
+    @ApolloJsonValue("${whiteAccountList:[]}")
+    private List<String> whiteAccountList;
 
 
 
 
     @PostConstruct
     @PostConstruct
@@ -184,10 +187,12 @@ public class RecallService implements ApplicationContextAware {
         List<Content> content = aigcWaitingPublishContentService.getAllContent(param);
         List<Content> content = aigcWaitingPublishContentService.getAllContent(param);
         long t2 = System.currentTimeMillis();
         long t2 = System.currentTimeMillis();
         CostMonitor.logCost("Recall", "GetAllContents", t2 - t1);
         CostMonitor.logCost("Recall", "GetAllContents", t2 - t1);
-        // 临时过滤文章视频不匹配content
-        filterNotMatchContent(content);
-        // 过滤仅保留审核通过content
-        filterAuditPassContent(content);
+        if (whiteAccountList.contains(param.getAccountName())) {
+            // 临时过滤文章视频不匹配content
+            filterNotMatchContent(content);
+            // 过滤仅保留审核通过content
+            filterAuditPassContent(content);
+        }
         if (CollectionUtils.isEmpty(content)) {
         if (CollectionUtils.isEmpty(content)) {
             FeishuMessageSender.sendWebHookMessage(FeishuRobotIdEnum.RECOMMEND.getRobotId(),
             FeishuMessageSender.sendWebHookMessage(FeishuRobotIdEnum.RECOMMEND.getRobotId(),
                     "内容召回失败\n"
                     "内容召回失败\n"