Pre Merge pull request !230 from runphp/N/A

pull/230/MERGE
runphp 3 years ago committed by Gitee
commit 73ceeb7ef7
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

@ -59,14 +59,13 @@ public class BaseController
/**
*
*/
@SuppressWarnings({ "rawtypes", "unchecked" })
protected TableDataInfo getDataTable(List<?> list)
protected <T> TableDataInfo<T> getDataTable(List<T> list)
{
TableDataInfo rspData = new TableDataInfo();
TableDataInfo<T> rspData = new TableDataInfo<>();
rspData.setCode(HttpStatus.SUCCESS);
rspData.setRows(list);
rspData.setMsg("查询成功");
rspData.setTotal(new PageInfo(list).getTotal());
rspData.setTotal(new PageInfo<>(list).getTotal());
return rspData;
}

Loading…
Cancel
Save