mybatisplus-service分页方法
时间: 2023-08-26 21:12:05 浏览: 122
mybatis-plus分页查询的实现示例
MyBatis-Plus提供了几种通用的分页查询方法。其中,无条件分页查询的方法包括:
- `IPage<T> page(IPage<T> page)`
- `IPage<Map<String, Object>> pageMaps(IPage<T> page)`
而条件分页查询的方法包括:
- `IPage<T> page(IPage<T> page, Wrapper<T> queryWrapper)`
- `IPage<Map<String, Object>> pageMaps(IPage<T> page, Wrapper<T> queryWrapper)`
这些方法可以在service层的自定义接口的mapper中使用。例如,在`CustomerService`接口中,可以直接使用这些方法进行分页查询操作。<em>1</em><em>2</em><em>3</em>
#### 引用[.reference_title]
- *1* [springboot+mybatisPlus ---分页查询](https://blog.csdn.net/m0_72309077/article/details/128906871)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}} ] [.reference_item]
- *2* [MybatisPlus - 分页插件使用](https://blog.csdn.net/qiaohao0206/article/details/125432460)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}} ] [.reference_item]
- *3* [SpringBoot整合MybatisPlus-分页](https://blog.csdn.net/qq_60506984/article/details/128843948)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}} ] [.reference_item]
[ .reference_list ]
阅读全文