|
@@ -43,6 +43,7 @@ import lombok.Getter;
|
|
|
import lombok.Setter;
|
|
|
import lombok.experimental.Accessors;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.apache.commons.collections4.CollectionUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.dao.DuplicateKeyException;
|
|
|
import org.springframework.stereotype.Service;
|
|
@@ -586,8 +587,8 @@ public class XxlJobService {
|
|
|
Map<String, Content> hisCacheMap = recallService.getArticleTitleHisCacheMap(paramList, type);
|
|
|
for (String titleMd5 : titleMd5List) {
|
|
|
Content content = hisCacheMap.get(titleMd5);
|
|
|
- ArticleTitleHisCache cache = titleMap.get(titleMd5);
|
|
|
- if (content != null) {
|
|
|
+ if (Objects.nonNull(content) && CollectionUtils.isNotEmpty(content.getHisPublishArticleList())) {
|
|
|
+ ArticleTitleHisCache cache = titleMap.get(titleMd5);
|
|
|
cache.setHisPublishArticleList(JSONObject.toJSONString(content.getHisPublishArticleList()));
|
|
|
cache.setUpdateTimestamp(System.currentTimeMillis());
|
|
|
articleTitleHisCacheRepository.save(cache);
|