1、查询当前的文章上一篇文章。
// 查询上一篇文章
select * from article
where id =
(select id from
article where id < ${id}
order by id desc limit 1
)
2、查询当前文章下一篇文章。
// 查询当前文章下一篇
select * from article
where id =
(select id from article
where id > ${id}
order by id asc limit 1
)