use of com.mendmix.mybatis.plugin.pagination.PageExecutor.PageDataLoader in project jeesuite-libs by vakinge.
the class BaseMybatisTest method testPage.
@Test
public void testPage() {
Page<UserEntity> pageInfo;
UserEntity example = new UserEntity();
example.setType((short) 1);
PageParams pageParams = new PageParams(1, 10, new OrderBy("name"));
pageInfo = PageExecutor.pagination(pageParams, new PageDataLoader<UserEntity>() {
@Override
public List<UserEntity> load() {
return userMapper.selectByExample(example);
}
});
System.out.println(pageInfo);
}
Aggregations