Przeglądaj źródła

feat:修改黑名单逻辑

zhaohaipeng 1 rok temu
rodzic
commit
a619190ff6

+ 5 - 4
recommend-server-service/src/main/java/com/tzld/piaoquan/recommend/server/service/filter/strategy/BlacklistContainer.java

@@ -326,9 +326,10 @@ public class BlacklistContainer {
 
         // 查看单APP配置的
         if (StringUtils.isNotBlank(userType) && Objects.nonNull(appType)) {
-            TagFilterConfig tagFilterConfig = tagFilterConfigMap.get(userType + CONNECTOR_STR + appType);
+            String key = userType + CONNECTOR_STR + appType;
+            TagFilterConfig tagFilterConfig = tagFilterConfigMap.get(key);
             if (Objects.nonNull(tagFilterConfig)) {
-                LOG.info("命中过滤标签配置: {}", userType + CONNECTOR_STR + appType);
+                LOG.info("命中过滤标签配置: {} == {}", key, tagFilterConfig.getRecommendExcludeTag());
                 return tagFilterConfig.getRecommendExcludeTag();
             }
         }
@@ -336,7 +337,7 @@ public class BlacklistContainer {
         if (Objects.nonNull(appType)) {
             TagFilterConfig tagFilterConfig = tagFilterConfigMap.get(appType.toString());
             if (Objects.nonNull(tagFilterConfig)) {
-                LOG.info("命中过滤标签配置: {}", appType);
+                LOG.info("命中过滤标签配置: {} == {}", appType, tagFilterConfig.getRecommendExcludeTag());
                 return tagFilterConfig.getRecommendExcludeTag();
             }
         }
@@ -344,7 +345,7 @@ public class BlacklistContainer {
         if (StringUtils.isNotBlank(userType)) {
             TagFilterConfig tagFilterConfig = tagFilterConfigMap.get(userType);
             if (Objects.nonNull(tagFilterConfig)) {
-                LOG.info("命中过滤标签配置: {}", userType);
+                LOG.info("命中过滤标签配置: {} == {}", userType, tagFilterConfig.getRecommendExcludeTag());
                 return tagFilterConfig.getRecommendExcludeTag();
             }
         }