diff --git a/src/main/java/com/rymcu/forest/service/impl/ArticleServiceImpl.java b/src/main/java/com/rymcu/forest/service/impl/ArticleServiceImpl.java index 7db94a9..4144a04 100644 --- a/src/main/java/com/rymcu/forest/service/impl/ArticleServiceImpl.java +++ b/src/main/java/com/rymcu/forest/service/impl/ArticleServiceImpl.java @@ -199,30 +199,14 @@ public class ArticleServiceImpl extends AbstractService
implements Arti } if (StringUtils.isNotBlank(articleContentHtml)) { - String previewContent; - if (articleContentHtml.length() > MAX_PREVIEW) { - previewContent = BaiDuAipUtils.getNewsSummary(newArticle.getArticleTitle(), articleContentHtml, MAX_PREVIEW); - if (previewContent.length() > MAX_PREVIEW) { - previewContent = previewContent.substring(0, MAX_PREVIEW); - } - } else { - previewContent = Html2TextUtil.getContent(articleContentHtml); + String previewContent = Html2TextUtil.getContent(articleContentHtml); + if (previewContent.length() > MAX_PREVIEW) { + previewContent = previewContent.substring(0, MAX_PREVIEW); } newArticle.setArticlePreviewContent(previewContent); } articleMapper.updateByPrimaryKeySelective(newArticle); - // 推送百度 SEO - if (!ProjectConstant.ENV.equals(env) - && defaultStatus.equals(newArticle.getArticleStatus()) - && articleContent.length() >= MAX_PREVIEW) { - if (isUpdate) { - BaiDuUtils.sendUpdateSEOData(newArticle.getArticlePermalink()); - } else { - BaiDuUtils.sendSEOData(newArticle.getArticlePermalink()); - } - } - map.put("id", newArticle.getIdArticle()); return map; } diff --git a/src/main/java/com/rymcu/forest/task/BaiDuCronTask.java b/src/main/java/com/rymcu/forest/task/BaiDuCronTask.java index 097d7ff..6872773 100644 --- a/src/main/java/com/rymcu/forest/task/BaiDuCronTask.java +++ b/src/main/java/com/rymcu/forest/task/BaiDuCronTask.java @@ -10,7 +10,7 @@ import org.springframework.stereotype.Component; /** * @author ronger */ -@Component +//@Component @Slf4j public class BaiDuCronTask {