pageNum与pageSize是传到后台的参数
if(pageSize==null&&("NaN").equals(pageNum)){
return getDataTable(listAll);
}else{
/*return getDataTable(listAll);*/
/*进行分页*/
List<Map<String,Object>> newList = new ArrayList<>();
int pageIndex = Integer.valueOf(pageNum).intValue();
if(pageIndex *pageSize>listAll.size()){
newList = listAll.subList((pageIndex-1)*pageSize,listAll.size());
}else{
newList =listAll.subList((pageIndex-1)*pageSize,pageIndex*pageSize);
}
return getDataTable_sjzl(newList,listAll.size());
}
protected TableDataInfo getDataTable_sjzl(List<?> list,int pageTotal)
{
TableDataInfo rspData = new TableDataInfo();
rspData.setCode(0);
rspData.setRows(list);
rspData.setTotal(pageTotal);
return rspData;
}