use of com.github.lybgeek.mongodb.common.page.PageQuery in project springboot-learning by lyb-geek.
the class UserServiceImpl method pageUsers.
@Override
public PageResult<User> pageUsers(PageQuery<UserDTO> pageQuery) {
UserDTO userDTO = pageQuery.getQueryParams();
User dbUser = getUser(userDTO);
PageQuery<User> dbPageQuery = new PageQuery<>();
dbPageQuery.setQueryParams(dbUser);
dbPageQuery.setPageSize(pageQuery.getPageSize() == null ? 10 : pageQuery.getPageSize());
dbPageQuery.setPageNum(pageQuery.getPageNum() == null ? 1 : pageQuery.getPageNum());
PageResult<User> pageResult = userDao.pageUsers(dbPageQuery);
return pageResult;
}