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