parent
2a675aa304
commit
d4b3b515d1
|
|
@ -59,14 +59,13 @@ public class BaseController
|
||||||
/**
|
/**
|
||||||
* 响应请求分页数据
|
* 响应请求分页数据
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
protected <T> TableDataInfo<T> getDataTable(List<T> list)
|
||||||
protected TableDataInfo getDataTable(List<?> list)
|
|
||||||
{
|
{
|
||||||
TableDataInfo rspData = new TableDataInfo();
|
TableDataInfo<T> rspData = new TableDataInfo<>();
|
||||||
rspData.setCode(HttpStatus.SUCCESS);
|
rspData.setCode(HttpStatus.SUCCESS);
|
||||||
rspData.setRows(list);
|
rspData.setRows(list);
|
||||||
rspData.setMsg("查询成功");
|
rspData.setMsg("查询成功");
|
||||||
rspData.setTotal(new PageInfo(list).getTotal());
|
rspData.setTotal(new PageInfo<>(list).getTotal());
|
||||||
return rspData;
|
return rspData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue