Parcourir la source

次条增加排序日志

wangyunpeng il y a 6 mois
Parent
commit
732d50f2b0
13 fichiers modifiés avec 27 ajouts et 15 suppressions
  1. 3 1
      long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/service/recommend/rank/RankService.java
  2. 2 0
      long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/service/recommend/rank/strategy/HisJumpRankStrategy.java
  3. 2 2
      long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/service/recommend/rank/strategy/RankV10Strategy.java
  4. 2 1
      long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/service/recommend/rank/strategy/RankV11Strategy.java
  5. 2 1
      long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/service/recommend/rank/strategy/RankV12Strategy.java
  6. 2 1
      long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/service/recommend/rank/strategy/RankV13Strategy.java
  7. 2 1
      long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/service/recommend/rank/strategy/RankV14Strategy.java
  8. 2 1
      long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/service/recommend/rank/strategy/RankV15Strategy.java
  9. 2 2
      long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/service/recommend/rank/strategy/RankV4Strategy.java
  10. 2 1
      long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/service/recommend/rank/strategy/RankV5Strategy.java
  11. 2 1
      long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/service/recommend/rank/strategy/RankV7Strategy.java
  12. 2 1
      long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/service/recommend/rank/strategy/RankV8Strategy.java
  13. 2 2
      long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/service/recommend/rank/strategy/RankV9Strategy.java

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

@@ -100,11 +100,13 @@ public class RankService implements InitializingBean {
     public static void commonAddSecondContent(RankParam param, List<Content> result,
                                               String[] publishPool, String[] contentPools,
                                               Map<String, List<Content>> contentMap,
-                                              Map<Integer, AccountIndexReplacePoolConfig> indexReplacePoolConfigMap) {
+                                              Map<Integer, AccountIndexReplacePoolConfig> indexReplacePoolConfigMap,
+                                              String strategy) {
         List<Content> pool = contentMap.get(contentPools[1]);
         if (CollectionUtils.isNotEmpty(pool)) {
             pool = contentSourceTypeFilter(param.getStrategy(), pool, 2);
         }
+        RankService.printSortLog(strategy, param.getAccountName(), "次条", pool);
         if (CollectionUtils.isNotEmpty(pool)) {
             int i = RandomUtils.nextInt(0, Math.min(pool.size(), 5));
             int j = RandomUtils.nextInt(0, Math.min(pool.size(), 5));

+ 2 - 0
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/service/recommend/rank/strategy/HisJumpRankStrategy.java

@@ -96,6 +96,7 @@ public class HisJumpRankStrategy implements RankStrategy {
         }
         // 次
         List<Content> pool2 = contentMap.get(contentPools[1]);
+        RankService.printSortLog(param.getStrategy(), param.getAccountName(), "次条", pool2);
         if (CollectionUtils.isNotEmpty(pool2)) {
             int i = RandomUtils.nextInt(0, Math.min(pool2.size(), 20));
             result.add(pool2.get(i));
@@ -114,6 +115,7 @@ public class HisJumpRankStrategy implements RankStrategy {
 
         // 3-8
         List<Content> pool = contentMap.get(contentPools[2]);
+        RankService.printSortLog(param.getStrategy(), param.getAccountName(), "3-8", pool);
         if (CollectionUtils.isNotEmpty(pool) && param.getSize() > result.size()) {
             int slotNum = param.getSize() - result.size();
             List<Content> subPool = pool.subList(0, Math.min(pool.size(), 30));

+ 2 - 2
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/service/recommend/rank/strategy/RankV10Strategy.java

@@ -1,7 +1,6 @@
 package com.tzld.longarticle.recommend.server.service.recommend.rank.strategy;
 
 
-import com.tzld.longarticle.recommend.server.common.enums.recommend.RankStrategyEnum;
 import com.tzld.longarticle.recommend.server.common.enums.recommend.ScoreStrategyEnum;
 import com.tzld.longarticle.recommend.server.model.dto.Content;
 import com.tzld.longarticle.recommend.server.model.entity.crawler.Article;
@@ -109,7 +108,8 @@ public class RankV10Strategy implements RankStrategy {
             return new RankResult(result);
         }
         // 次
-        RankService.commonAddSecondContent(param, result, publishPool, contentPools, contentMap, indexReplacePoolConfigMap);
+        RankService.commonAddSecondContent(param, result, publishPool, contentPools, contentMap,
+                indexReplacePoolConfigMap, param.getStrategy());
 
         // 3-8
         RankService.commonAdd38Content(param, result, contentPools, contentMap, param.getStrategy());

+ 2 - 1
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/service/recommend/rank/strategy/RankV11Strategy.java

@@ -129,7 +129,8 @@ public class RankV11Strategy implements RankStrategy {
             return new RankResult(result);
         }
         // 次
-        RankService.commonAddSecondContent(param, result, publishPool, contentPools, contentMap, indexReplacePoolConfigMap);
+        RankService.commonAddSecondContent(param, result, publishPool, contentPools, contentMap,
+                indexReplacePoolConfigMap, param.getStrategy());
 
         // 3-8
         RankService.commonAdd38Content(param, result, contentPools, contentMap, param.getStrategy());

+ 2 - 1
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/service/recommend/rank/strategy/RankV12Strategy.java

@@ -129,7 +129,8 @@ public class RankV12Strategy implements RankStrategy {
             return new RankResult(result);
         }
         // 次
-        RankService.commonAddSecondContent(param, result, publishPool, contentPools, contentMap, indexReplacePoolConfigMap);
+        RankService.commonAddSecondContent(param, result, publishPool, contentPools, contentMap,
+                indexReplacePoolConfigMap, param.getStrategy());
 
         // 3-8
         RankService.commonAdd38Content(param, result, contentPools, contentMap, param.getStrategy());

+ 2 - 1
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/service/recommend/rank/strategy/RankV13Strategy.java

@@ -130,7 +130,8 @@ public class RankV13Strategy implements RankStrategy {
             return new RankResult(result);
         }
         // 次
-        RankService.commonAddSecondContent(param, result, publishPool, contentPools, contentMap, indexReplacePoolConfigMap);
+        RankService.commonAddSecondContent(param, result, publishPool, contentPools, contentMap,
+                indexReplacePoolConfigMap, param.getStrategy());
 
         // 3-8
         RankService.commonAdd38Content(param, result, contentPools, contentMap, param.getStrategy());

+ 2 - 1
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/service/recommend/rank/strategy/RankV14Strategy.java

@@ -130,7 +130,8 @@ public class RankV14Strategy implements RankStrategy {
             return new RankResult(result);
         }
         // 次
-        RankService.commonAddSecondContent(param, result, publishPool, contentPools, contentMap, indexReplacePoolConfigMap);
+        RankService.commonAddSecondContent(param, result, publishPool, contentPools, contentMap,
+                indexReplacePoolConfigMap, param.getStrategy());
 
         // 3-8
         RankService.commonAdd38Content(param, result, contentPools, contentMap, param.getStrategy());

+ 2 - 1
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/service/recommend/rank/strategy/RankV15Strategy.java

@@ -122,7 +122,8 @@ public class RankV15Strategy implements RankStrategy {
             return new RankResult(result);
         }
         // 次
-        RankService.commonAddSecondContent(param, result, publishPool, contentPools, contentMap, indexReplacePoolConfigMap);
+        RankService.commonAddSecondContent(param, result, publishPool, contentPools, contentMap,
+                indexReplacePoolConfigMap, param.getStrategy());
 
         // 3-8
         // RankService.commonAdd38Content(param, result, contentPools, contentMap, param.getStrategy());

+ 2 - 2
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/service/recommend/rank/strategy/RankV4Strategy.java

@@ -1,7 +1,6 @@
 package com.tzld.longarticle.recommend.server.service.recommend.rank.strategy;
 
 
-import com.tzld.longarticle.recommend.server.common.enums.recommend.RankStrategyEnum;
 import com.tzld.longarticle.recommend.server.common.enums.recommend.ScoreStrategyEnum;
 import com.tzld.longarticle.recommend.server.model.dto.Content;
 import com.tzld.longarticle.recommend.server.model.entity.crawler.Article;
@@ -99,7 +98,8 @@ public class RankV4Strategy implements RankStrategy {
             return new RankResult(result);
         }
         // 次
-        RankService.commonAddSecondContent(param, result, publishPool, contentPools, contentMap, indexReplacePoolConfigMap);
+        RankService.commonAddSecondContent(param, result, publishPool, contentPools, contentMap,
+                indexReplacePoolConfigMap, param.getStrategy());
 
         // 3-8
         RankService.commonAdd38Content(param, result, contentPools, contentMap, param.getStrategy());

+ 2 - 1
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/service/recommend/rank/strategy/RankV5Strategy.java

@@ -117,7 +117,8 @@ public class RankV5Strategy implements RankStrategy {
             return new RankResult(result);
         }
         // 次
-        RankService.commonAddSecondContent(param, result, publishPool, contentPools, contentMap, indexReplacePoolConfigMap);
+        RankService.commonAddSecondContent(param, result, publishPool, contentPools, contentMap,
+                indexReplacePoolConfigMap, param.getStrategy());
 
         // 3-8
         RankService.commonAdd38Content(param, result, contentPools, contentMap, param.getStrategy());

+ 2 - 1
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/service/recommend/rank/strategy/RankV7Strategy.java

@@ -101,7 +101,8 @@ public class RankV7Strategy implements RankStrategy {
             return new RankResult(result);
         }
         // 次
-        RankService.commonAddSecondContent(param, result, publishPool, contentPools, contentMap, indexReplacePoolConfigMap);
+        RankService.commonAddSecondContent(param, result, publishPool, contentPools, contentMap,
+                indexReplacePoolConfigMap, param.getStrategy());
 
         // 3-8
         RankService.commonAdd38Content(param, result, contentPools, contentMap, param.getStrategy());

+ 2 - 1
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/service/recommend/rank/strategy/RankV8Strategy.java

@@ -113,7 +113,8 @@ public class RankV8Strategy implements RankStrategy {
             return new RankResult(result);
         }
         // 次
-        RankService.commonAddSecondContent(param, result, publishPool, contentPools, contentMap, indexReplacePoolConfigMap);
+        RankService.commonAddSecondContent(param, result, publishPool, contentPools, contentMap,
+                indexReplacePoolConfigMap, param.getStrategy());
 
         // 3-8
         RankService.commonAdd38Content(param, result, contentPools, contentMap, param.getStrategy());

+ 2 - 2
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/service/recommend/rank/strategy/RankV9Strategy.java

@@ -1,7 +1,6 @@
 package com.tzld.longarticle.recommend.server.service.recommend.rank.strategy;
 
 
-import com.tzld.longarticle.recommend.server.common.enums.recommend.RankStrategyEnum;
 import com.tzld.longarticle.recommend.server.common.enums.recommend.ScoreStrategyEnum;
 import com.tzld.longarticle.recommend.server.model.dto.Content;
 import com.tzld.longarticle.recommend.server.model.entity.crawler.Article;
@@ -101,7 +100,8 @@ public class RankV9Strategy implements RankStrategy {
             return new RankResult(result);
         }
         // 次
-        RankService.commonAddSecondContent(param, result, publishPool, contentPools, contentMap, indexReplacePoolConfigMap);
+        RankService.commonAddSecondContent(param, result, publishPool, contentPools, contentMap,
+                indexReplacePoolConfigMap, param.getStrategy());
 
         // 3-8
         RankService.commonAdd38Content(param, result, contentPools, contentMap, param.getStrategy());