fix:修复接口500的问题,增加BaseController getDataTable 的空表处理

This commit is contained in:
高大 2026-01-26 15:47:48 +08:00
parent b2a7748cc3
commit 0eb7cce258
1 changed files with 6 additions and 1 deletions

View File

@ -66,7 +66,12 @@ public class BaseController
rspData.setCode(HttpStatus.SUCCESS);
rspData.setRows(list);
rspData.setMsg("查询成功");
if (list == null || list.size() == 0) {
rspData.setTotal(0);
} else {
rspData.setTotal(new PageInfo(list).getTotal());
}
return rspData;
}