Ver código fonte

Merge branch 'feature_20240524_zhaohaipeng_remote_log' of algorithm/recommend-server into master

zhaohaipeng 11 meses atrás
pai
commit
a7e7fc1420

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

@@ -201,8 +201,8 @@ public class BlacklistContainer {
 
         return videoIds.stream().filter(videoId -> {
             if (videoTagAnyMatch(videoId, tagIdSet)) {
-                LOG.info("用户 {} 在因命中 {} 移除对应的视频ID {}: 请求参数为: hotSceneType={}, cityCode={}, clientIP={}, mid={}, usedScene={}, appType={}",
-                        uid, userType, videoId, hotSceneType, cityCode, clientIP, mid, usedScene, appType);
+                // LOG.info("用户 {} 在因命中 {} 移除对应的视频ID {}: 请求参数为: hotSceneType={}, cityCode={}, clientIP={}, mid={}, usedScene={}, appType={}",
+                //         uid, userType, videoId, hotSceneType, cityCode, clientIP, mid, usedScene, appType);
                 return false;
             }
             return true;
@@ -212,15 +212,15 @@ public class BlacklistContainer {
     public String matchUserBlacklistTypeEnum(String uid, Long hotSceneType, String cityCode, String clientIP, String mid,
                                              String usedScene, Integer appType) {
         try {
-            LOG.info("计算用户黑名单类型,判断参数: uid={}, hotSceneType={}, cityCode={}, clientIP={}, mid={}, usedScene={}, appType={}",
-                    uid, hotSceneType, cityCode, clientIP, mid, usedScene, appType);
+            // LOG.info("计算用户黑名单类型,判断参数: uid={}, hotSceneType={}, cityCode={}, clientIP={}, mid={}, usedScene={}, appType={}",
+            //         uid, hotSceneType, cityCode, clientIP, mid, usedScene, appType);
             if (StringUtils.isNotBlank(uid)) {
                 String key = this.calcUserRedisKey(uid);
                 Map<String, String> uidBlacklistMap = blacklistCache.get(key);
                 if (uidBlacklistMap.containsKey(uid)) {
                     String userType = uidBlacklistMap.get(uid);
                     this.filterLogUpload(uid, cityCode, hotSceneType, clientIP, userType, "UID", mid, usedScene, appType);
-                    LOG.info("用户 {} 在UID黑名单中命中 {}", uid, userType);
+                    // LOG.info("用户 {} 在UID黑名单中命中 {}", uid, userType);
                     return userType;
                 }
             }
@@ -230,7 +230,7 @@ public class BlacklistContainer {
                 if (ipBlacklistMap.containsKey(clientIP)) {
                     String userType = ipBlacklistMap.get(clientIP);
                     this.filterLogUpload(uid, cityCode, hotSceneType, clientIP, userType, "IP", mid, usedScene, appType);
-                    LOG.info("用户 {} 在IP黑名单中命中 {}, 参数为: clientIP为: {}", uid, userType, clientIP);
+                    // LOG.info("用户 {} 在IP黑名单中命中 {}, 参数为: clientIP为: {}", uid, userType, clientIP);
                     return userType;
                 }
             }
@@ -263,7 +263,7 @@ public class BlacklistContainer {
         if (StringUtils.isNotBlank(cityCode) && Objects.nonNull(appType)) {
             GeneralizationUserConfig userConfig = generalizationUserConditionConfig.get(cityCode + CONNECTOR_STR + appType);
             if (Objects.nonNull(userConfig) && userConfig.isExcludeHotSceneType(hotSceneType)) {
-                LOG.info("用户 {} 在泛化用户规则中命中: {}, 参数为: appType = {}, cityCode={}, hotSceneType={}", uid, userConfig.fullUserType, appType, cityCode, hotSceneType);
+                // LOG.info("用户 {} 在泛化用户规则中命中: {}, 参数为: appType = {}, cityCode={}, hotSceneType={}", uid, userConfig.fullUserType, appType, cityCode, hotSceneType);
                 return userConfig.getFullUserType();
             }
         }
@@ -272,7 +272,7 @@ public class BlacklistContainer {
         if (Objects.nonNull(appType)) {
             GeneralizationUserConfig userConfig = generalizationUserConditionConfig.get(appType.toString());
             if (Objects.nonNull(userConfig) && userConfig.isExcludeHotSceneType(hotSceneType)) {
-                LOG.info("用户 {} 在泛化用户规则中命中: {}, 参数为: appType={}, hotSceneType={}", uid, userConfig.fullUserType, appType, hotSceneType);
+                // LOG.info("用户 {} 在泛化用户规则中命中: {}, 参数为: appType={}, hotSceneType={}", uid, userConfig.fullUserType, appType, hotSceneType);
                 return userConfig.getFullUserType();
             }
         }
@@ -281,7 +281,7 @@ public class BlacklistContainer {
         if (StringUtils.isNotBlank(cityCode)) {
             GeneralizationUserConfig userConfig = generalizationUserConditionConfig.get(cityCode);
             if (Objects.nonNull(userConfig) && userConfig.isExcludeHotSceneType(hotSceneType)) {
-                LOG.info("用户 {} 在泛化用户规则中命中: {}, 参数为: cityCode={}, hotSceneType={}", uid, userConfig.fullUserType, cityCode, hotSceneType);
+                // LOG.info("用户 {} 在泛化用户规则中命中: {}, 参数为: cityCode={}, hotSceneType={}", uid, userConfig.fullUserType, cityCode, hotSceneType);
                 return userConfig.getFullUserType();
             }
         }
@@ -329,7 +329,7 @@ public class BlacklistContainer {
             String key = userType + CONNECTOR_STR + appType;
             TagFilterConfig tagFilterConfig = tagFilterConfigMap.get(key);
             if (Objects.nonNull(tagFilterConfig)) {
-                LOG.info("命中过滤标签配置: {} == {}", key, tagFilterConfig.getRecommendExcludeTag());
+                // LOG.info("命中过滤标签配置: {} == {}", key, tagFilterConfig.getRecommendExcludeTag());
                 return tagFilterConfig.getRecommendExcludeTag();
             }
         }
@@ -337,7 +337,7 @@ public class BlacklistContainer {
         if (StringUtils.isNotBlank(userType)) {
             TagFilterConfig tagFilterConfig = tagFilterConfigMap.get(userType);
             if (Objects.nonNull(tagFilterConfig)) {
-                LOG.info("命中过滤标签配置: {} == {}", userType, tagFilterConfig.getRecommendExcludeTag());
+                // LOG.info("命中过滤标签配置: {} == {}", userType, tagFilterConfig.getRecommendExcludeTag());
                 return tagFilterConfig.getRecommendExcludeTag();
             }
         }