|
@@ -158,11 +158,14 @@ public class ArticleVideoAuditService {
|
|
|
// 从待审核队列中获取数据,如未获取到则从数据库查询一条
|
|
|
Long size = redisTemplate.opsForZSet().size(auditQueueRedisKey);
|
|
|
if (Objects.isNull(size) || size == 0) {
|
|
|
- Map<Object, Object> entries = redisTemplate.opsForHash().entries(inAuditListRedisKey);
|
|
|
+ List<String> entries = redisTemplate.opsForList().range(inAuditListRedisKey, 0, -1);
|
|
|
List<String> excludeContentIds = new ArrayList<>();
|
|
|
- entries.forEach((k, v) -> {
|
|
|
- excludeContentIds.add((String) k);
|
|
|
- });
|
|
|
+ if (CollectionUtils.isNotEmpty(entries)) {
|
|
|
+ excludeContentIds = entries.stream().map(o -> {
|
|
|
+ JSONObject json = JSONObject.parseObject(o);
|
|
|
+ return json.getString("id");
|
|
|
+ }).collect(Collectors.toList());
|
|
|
+ }
|
|
|
item = articleAuditMapper.articleVideoAuditNext(param.getContentId(),
|
|
|
param.getStatus(), param.getTitle(), param.getAuditAccount(), param.getSourceProducePlan(),
|
|
|
null, excludeContentIds);
|
|
@@ -218,7 +221,6 @@ public class ArticleVideoAuditService {
|
|
|
}
|
|
|
// 当日审核数+1
|
|
|
addAuditCount(titleAudit.getFlowPoolLevel());
|
|
|
- redisTemplate.opsForHash().delete("article-pool-in-audit-list", titleAudit.getContentId());
|
|
|
}
|
|
|
|
|
|
private void addAuditCount(String poolLevel) {
|
|
@@ -439,8 +441,10 @@ public class ArticleVideoAuditService {
|
|
|
redisTemplate.opsForList().leftPop(inAuditListRedisKey);
|
|
|
String id = firstObj.getString("id");
|
|
|
LongArticleTitleAudit videoAudit = titleAuditRepository.getByContentId(id);
|
|
|
- ContentPoolEnum poolEnum = ContentPoolEnum.from(videoAudit.getFlowPoolLevel());
|
|
|
- redisTemplate.opsForZSet().add(auditQueueRedisKey, id, poolEnum.getWeight());
|
|
|
+ if (videoAudit.getStatus() == ArticleVideoAuditStatusEnum.WAITING.getCode()) {
|
|
|
+ ContentPoolEnum poolEnum = ContentPoolEnum.from(videoAudit.getFlowPoolLevel());
|
|
|
+ redisTemplate.opsForZSet().add(auditQueueRedisKey, id, poolEnum.getWeight());
|
|
|
+ }
|
|
|
} else {
|
|
|
break;
|
|
|
}
|