mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-08 01:28:24 +08:00
test: 测试分页查询。
This commit is contained in:
parent
d2022d30df
commit
3953b4abd8
@ -249,13 +249,13 @@ class UserMapperTest {
|
|||||||
.leftJoin(USER_ROLE).as("ur").on(USER_ROLE.USER_ID.eq(USER.USER_ID))
|
.leftJoin(USER_ROLE).as("ur").on(USER_ROLE.USER_ID.eq(USER.USER_ID))
|
||||||
.leftJoin(ROLE).as("r").on(USER_ROLE.ROLE_ID.eq(ROLE.ROLE_ID));
|
.leftJoin(ROLE).as("r").on(USER_ROLE.ROLE_ID.eq(ROLE.ROLE_ID));
|
||||||
System.err.println(queryWrapper.toSQL());
|
System.err.println(queryWrapper.toSQL());
|
||||||
Page<UserVO> page = Page.of(1, 1);
|
Page<UserVO> page = new Page<>();
|
||||||
page.setOptimizeCountQuery(false);
|
page.setOptimizeCountQuery(false);
|
||||||
int pageNumber = 0;
|
int pageNumber = 0;
|
||||||
do {
|
do {
|
||||||
page.setPageNumber(page.getPageNumber() + 1);
|
|
||||||
page = userMapper.paginateAs(page, queryWrapper, UserVO.class);
|
page = userMapper.paginateAs(page, queryWrapper, UserVO.class);
|
||||||
System.err.println(page);
|
System.err.println(page);
|
||||||
|
page.setPageNumber(page.getPageNumber() + 1);
|
||||||
} while (page.hasNext());
|
} while (page.hasNext());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user