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

This commit is contained in:
runphp 2022-08-12 02:19:55 +00:00 committed by Gitee
commit 73ceeb7ef7
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 3 additions and 4 deletions

View File

@ -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;
} }