mybatisplus分页查询三层
时间: 2023-12-19 16:32:18 浏览: 61
mybatis-plus分页查询
```java
// Service层
public IPage<User> selectUserPage(Page<User> page, Integer age) {
return baseMapper.selectUserPage(page, age);
}
// Mapper层
List<User> selectUserPage(@Param("page") Page<User> page, @Param("age") Integer age);
```
```xml
<!-- Mapper XML文件 -->
<select id="selectUserPage" resultType="User">
SELECT * FROM user WHERE age = #{age}
</select>
```
阅读全文