use of com.github.lybgeek.redis.dto.BookDTO in project springboot-learning by lyb-geek.
the class RedisApplicationTest method testPageBook.
@Test
public void testPageBook() {
PageQuery pageQuery = new PageQuery<>().setPageNo(1).setPageSize(5);
BookDTO bookDTO = new BookDTO();
bookDTO.setAuthor("张三");
// bookDTO.setBookName("图解Http");
// bookDTO.setId(4L);
pageQuery.setQueryParams(bookDTO);
PageResult<BookDTO> pageResult = bookService.pageBook(pageQuery);
if (pageResult != null) {
pageResult.getList().forEach(book -> System.out.println(book));
}
}
Aggregations