|
@@ -10,6 +10,7 @@ import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.collections4.CollectionUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.util.StringUtils;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
@@ -30,6 +31,9 @@ public class PublishContentFilterService {
|
|
|
List<String> filterTitleList = longArticleBaseMapper.getFilterColdLongArticleTitle();
|
|
|
List<Set<Character>> firstSecondTitleCache = TitleSimilarCheckUtil.makeCache(filterTitleList);
|
|
|
for (PublishContentFilterContentItem contentItem : param.getContentList()) {
|
|
|
+ if (!StringUtils.hasText(contentItem.getTitle())) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
boolean isDuplicate = false;
|
|
|
if (ContentPoolEnum.autoArticlePoolLevel4.getContentPool().equals(contentItem.getPoolLevel())) {
|
|
|
isDuplicate = TitleSimilarCheckUtil.isDuplicateContentByCache(contentItem.getTitle(),
|