修改对象类型

This commit is contained in:
禾几海
2020-05-26 14:01:27 +08:00
parent 4770c37f4f
commit 7d7a0fc82d
9 changed files with 28 additions and 13 deletions

View File

@@ -321,7 +321,10 @@ public class ArticleServiceImpl implements ArticleService {
open.forEach(article -> {
ArticleModel model = ModalTrans.article(article, true);
model.setTags(null);
setPreAndNextArticle(model);
// setPreAndNextArticle(model);
model.setNextArticle(null);
model.setPreArticle(null);
modelList.add(model);
});
return new PageData<ArticleModel>(new PageInfo<Article>(open), modelList);
}
@@ -337,6 +340,9 @@ public class ArticleServiceImpl implements ArticleService {
List<ArticleModel> modelList = new ArrayList<>();
articleByTag.forEach(articleTag -> {
ArticleModel model = ModalTrans.article(articleTag.getArticle(), true);
model.setNextArticle(null);
model.setPreArticle(null);
modelList.add(model);
});
return new PageData<ArticleModel>(new PageInfo<ArticleTag>(articleByTag), modelList);
}