fix:修复接口500的问题,增加BaseController getDataTable 的空表处理
This commit is contained in:
parent
b2a7748cc3
commit
0eb7cce258
|
|
@ -66,7 +66,12 @@ public class BaseController
|
|||
rspData.setCode(HttpStatus.SUCCESS);
|
||||
rspData.setRows(list);
|
||||
rspData.setMsg("查询成功");
|
||||
rspData.setTotal(new PageInfo(list).getTotal());
|
||||
if (list == null || list.size() == 0) {
|
||||
rspData.setTotal(0);
|
||||
} else {
|
||||
rspData.setTotal(new PageInfo(list).getTotal());
|
||||
}
|
||||
|
||||
return rspData;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue