如果只是单表,那么分页查询就容易的多了
这里的@ModelAttribute注解可以将前端传过来的 current 和 size 字段映射到Page对象中
BaseController中
关联多表分页查询
PbBuildingController中
PbBuildingService
PbBuildingMapper
PbBuildingMapper.xml
如果仅仅查列表而不需要分页,前端不需要传current和size参数,而后台不需要Page参数
如果Mybatis-Plus分页查询且不返回总数total
使用 // 不查询总记录数 page.setSearchCount(false);
Mybatis-Plus分页查询不返回总数total