Browse Source

内容池交互 fix

wangyunpeng 1 week ago
parent
commit
81658c4633

+ 6 - 1
api-module/src/main/java/com/tzld/piaoquan/api/job/contentplatform/ContentPlatformVideoJob.java

@@ -540,7 +540,12 @@ public class ContentPlatformVideoJob {
         String strategy = "recommend";
         for (String channel : channelList) {
             ContentPlatformAccount account = accountMap.get(channel);
-            List<ContentPlatformVideoAccountRel> accoutnVideoAccountRelList = videoAccountRelMap.getOrDefault(account.getId(), new ArrayList<>());
+            List<ContentPlatformVideoAccountRel> accoutnVideoAccountRelList;
+            if (Objects.nonNull(account)) {
+                accoutnVideoAccountRelList = videoAccountRelMap.getOrDefault(account.getId(), new ArrayList<>());
+            } else {
+                accoutnVideoAccountRelList = new ArrayList<>();
+            }
             Map<Long, Double> videoSimScoreMap = accoutnVideoAccountRelList.stream().collect(
                     Collectors.toMap(ContentPlatformVideoAccountRel::getVideoId, ContentPlatformVideoAccountRel::getSimScore));
             for (String type : typeList) {

+ 3 - 3
api-module/src/main/java/com/tzld/piaoquan/api/service/contentplatform/impl/ContentPlatformPlanServiceImpl.java

@@ -515,13 +515,13 @@ public class ContentPlatformPlanServiceImpl implements ContentPlatformPlanServic
                     item = "videoTag.platform = 'platform'";
                     break;
                 case "同类用户喜欢":
-                    item = "videoTag.account_id = " + accountId;
+                    item = "videoTag.type = '" + type + "'";
                     break;
                 case "你的用户爱看":
-                    item = "videoTag.type = '" + type + "'";
+                    item = "videoTag.channel = '" + channel + "'";
                     break;
                 case "猜TA想看":
-                    item = "videoTag.channel = '" + channel + "'";
+                    item = "videoTag.account_id = " + accountId;
                     break;
                 default:
                     item = null;