🔍 改善 SEO 提交/更新机制
This commit is contained in:
parent
488b0f6107
commit
2b3b7b5ac4
@ -141,7 +141,7 @@ public class ArticleServiceImpl extends AbstractService<Article> implements Arti
|
||||
newArticle.setArticleStatus(article.getArticleStatus());
|
||||
articleMapper.insertSelective(newArticle);
|
||||
articleMapper.insertArticleContent(newArticle.getIdArticle(), articleContent, articleContentHtml);
|
||||
if (!ProjectConstant.ENV.equals(env) && defaultStatus.equals(newArticle.getArticleStatus()) && articleContent.length() > MAX_PREVIEW * 3) {
|
||||
if (!ProjectConstant.ENV.equals(env) && defaultStatus.equals(newArticle.getArticleStatus()) && articleContent.length() >= MAX_PREVIEW) {
|
||||
BaiDuUtils.sendSEOData(newArticle.getArticlePermalink());
|
||||
}
|
||||
} else {
|
||||
@ -155,7 +155,7 @@ public class ArticleServiceImpl extends AbstractService<Article> 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()) && articleContent.length() > MAX_PREVIEW * 3) {
|
||||
if (!ProjectConstant.ENV.equals(env) && defaultStatus.equals(newArticle.getArticleStatus()) && articleContent.length() >= MAX_PREVIEW) {
|
||||
BaiDuUtils.sendUpdateSEOData(newArticle.getArticlePermalink());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user