wangyunpeng hace 7 meses
padre
commit
f358c51a4a

+ 3 - 0
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/service/score/strategy/CategoryStrategy.java

@@ -43,6 +43,9 @@ public class CategoryStrategy implements ScoreStrategy {
         Map<Integer, AccountCategoryWeightConfig> categoryWeightConfigMap = Arrays.stream(categoryWeightConfigList).collect(Collectors.toMap(AccountCategoryWeightConfig::getIndex, o -> o));
         String[] contentPools = accountContentPoolConfigService.getContentPools(param.getAccountName());
         for (Content content : param.getContents()) {
+            if (CollectionUtils.isEmpty(content.getCategory())) {
+                continue;
+            }
             Score score = new Score();
             score.setStrategy(this);
             score.setContentId(content.getId());