@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);
List<Community> communities = communityMapper.selectByCriteria(communityCriteria);
// 结果集处理所属完整区域字符串
List<Community> items = new ArrayList<Community>();
for(Community c : communities)
{