@Override
public Pagination findPagination(Map<String, Object> queryMap,
int currentPage, int pageSize)
{
FriendshipLinkCriteria friendshipLinkCriteria = new FriendshipLinkCriteria();
Criteria criteria = friendshipLinkCriteria.createCriteria();
// 设置搜索条件参数
if (queryMap != null)
{
if (queryMap.containsKey("name"))
{
criteria.andLinkNameLike("%" + (String) queryMap.get("name") + "%");
}
if (queryMap.containsKey("isDisplay"))
{
criteria.andIsDisplayEqualTo(Short.parseShort((String) queryMap.get("isDisplay")));
}
}
// 设置分页参数
friendshipLinkCriteria.setPageSize(pageSize);
friendshipLinkCriteria.setStartIndex((currentPage - 1) * pageSize);