package com.rthd.utils;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.github.pagehelper.PageInfo;
public class ResultDataGrid {
public static <T> Object getResultDataGrid(List<T> list)
{
PageInfo<T> p=new PageInfo<T>(list);
Map<String,Object> map = new HashMap<String,Object>();
map.put("total", p.getTotal());
map.put("rows", p.getList());
return map;
}
}
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.github.pagehelper.PageInfo;
public class ResultDataGrid {
public static <T> Object getResultDataGrid(List<T> list)
{
PageInfo<T> p=new PageInfo<T>(list);
Map<String,Object> map = new HashMap<String,Object>();
map.put("total", p.getTotal());
map.put("rows", p.getList());
return map;
}
}