wangyunpeng 4 月之前
父節點
當前提交
7ee1d77a41

+ 17 - 2
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/service/recommend/ArticleVideoAuditService.java

@@ -125,9 +125,24 @@ public class ArticleVideoAuditService {
         }
         Page<ArticleVideoAuditListVO> result = new Page<>();
         // 根据配置判断当日是否审核完成 并 选择内容池返回
+        ArticleVideoAuditListVO item = null;
         String poolLevel = getAuditPoolLevel();
-        ArticleVideoAuditListVO item = articleAuditMapper.articleVideoAuditNext(param.getContentId(),
-                param.getStatus(), param.getTitle(), param.getAuditAccount(), param.getSourceProducePlan(), poolLevel);
+        if (Objects.isNull(poolLevel)) {
+            item = articleAuditMapper.articleVideoAuditNext(param.getContentId(),
+                    param.getStatus(), param.getTitle(), param.getAuditAccount(), param.getSourceProducePlan(), poolLevel);
+        } else {
+            for (String poolLevelStr : dailyAuditPoolCount.keySet()) {
+                if (!Objects.equals(poolLevelStr, poolLevel)) {
+                    continue;
+                }
+                item = articleAuditMapper.articleVideoAuditNext(param.getContentId(),
+                        param.getStatus(), param.getTitle(), param.getAuditAccount(), param.getSourceProducePlan(), poolLevel);
+                if (Objects.nonNull(item)) {
+                    break;
+                }
+                poolLevel = poolLevel + 1;
+            }
+        }
         if (Objects.isNull(item)) {
             return result;
         }

+ 19 - 3
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/service/recommend/VideoPoolAuditService.java

@@ -99,9 +99,25 @@ public class VideoPoolAuditService {
         }
         Page<VideoPoolAuditListVO> result = new Page<>();
         // 根据配置判断当日是否审核完成 并 选择内容池返回
+        PublishSingleVideoSource obj = null;
         Integer poolLevel = getAuditPoolLevel();
-        PublishSingleVideoSource obj = videoPoolAuditMapper.articleVideoAuditNext(param.getContentId(),
-                param.getStatus(), param.getTitle(), param.getAuditAccount(), poolLevel);
+        if (Objects.isNull(poolLevel)) {
+            obj = videoPoolAuditMapper.articleVideoAuditNext(param.getContentId(),
+                    param.getStatus(), param.getTitle(), param.getAuditAccount(), poolLevel);
+        } else {
+            for (String poolLevelStr : dailyAuditPoolCount.keySet()) {
+                ContentPoolEnum poolEnum = ContentPoolEnum.from(poolLevelStr);
+                if (!Objects.equals(poolEnum.getValue(), poolLevel)) {
+                    continue;
+                }
+                obj = videoPoolAuditMapper.articleVideoAuditNext(param.getContentId(),
+                        param.getStatus(), param.getTitle(), param.getAuditAccount(), poolLevel);
+                if (Objects.nonNull(obj)) {
+                    break;
+                }
+                poolLevel = poolLevel + 1;
+            }
+        }
         if (Objects.isNull(obj)) {
             return result;
         }
@@ -194,7 +210,7 @@ public class VideoPoolAuditService {
 
     @XxlJob("shuffleVideoPoolAuditGroup")
     public ReturnT<String> shuffleVideoPoolAuditGroup(String param) {
-        List<String> auditUser = Arrays.asList("a","b","c","d","e","f","g","h","i","j");
+        List<String> auditUser = Arrays.asList("a", "b", "c", "d", "e", "f", "g", "h", "i", "j");
         List<PublishSingleVideoSource> contentIds = videoSourceRepository.getByVideoPoolAuditStatus(ArticleVideoAuditStatusEnum.WAITING.getCode());
         for (int i = 0; i < contentIds.size(); i++) {
             int per = i % auditUser.size();