取上一条
sql = " from News n where n.id < ? order by n.id desc ";
List list = getSession().createQuery(sql);
return list.size() > 0 ? list.get(0) : null;
取下一条
sql = " from News n where n.id > ? order by n.id asc ";
List list = getSession().createQuery(sql);
return list.size > 0 ? list.get(0) : null;
取上一条下一条记录
最新推荐文章于 2024-09-18 14:11:14 发布
2256

被折叠的 条评论
为什么被折叠?



