diff --git a/src/main/java/com/rymcu/vertical/service/impl/ArticleServiceImpl.java b/src/main/java/com/rymcu/vertical/service/impl/ArticleServiceImpl.java index 69d47d5..ea482ca 100644 --- a/src/main/java/com/rymcu/vertical/service/impl/ArticleServiceImpl.java +++ b/src/main/java/com/rymcu/vertical/service/impl/ArticleServiceImpl.java @@ -141,7 +141,7 @@ public class ArticleServiceImpl extends AbstractService
implements Arti newArticle.setArticleStatus(article.getArticleStatus()); articleMapper.insertSelective(newArticle); articleMapper.insertArticleContent(newArticle.getIdArticle(), articleContent, articleContentHtml); - if (!ProjectConstant.ENV.equals(env) && defaultStatus.equals(newArticle.getArticleStatus())) { + if (!ProjectConstant.ENV.equals(env) && defaultStatus.equals(newArticle.getArticleStatus()) && articleContent.length() > MAX_PREVIEW * 3) { BaiDuUtils.sendSEOData(newArticle.getArticlePermalink()); } } else { @@ -155,7 +155,7 @@ public class ArticleServiceImpl extends AbstractService
implements Arti newArticle.setArticleStatus(article.getArticleStatus()); newArticle.setUpdatedTime(new Date()); articleMapper.updateArticleContent(newArticle.getIdArticle(), articleContent, articleContentHtml); - if (!ProjectConstant.ENV.equals(env) && defaultStatus.equals(newArticle.getArticleStatus())) { + if (!ProjectConstant.ENV.equals(env) && defaultStatus.equals(newArticle.getArticleStatus()) && articleContent.length() > MAX_PREVIEW * 3) { BaiDuUtils.sendUpdateSEOData(newArticle.getArticlePermalink()); } }