#525 加强Utils Modules模块 下午的成果,BeanMapper加强,QueueUtil加强,ReflectionUtil加强

This commit is contained in:
calvin1978
2017-01-14 17:49:09 +08:00
parent 229baa6ca8
commit 831ce7da71
45 changed files with 2343 additions and 231 deletions
@@ -42,7 +42,7 @@ public class BookEndpoint {
public List<BookDto> listAllBook(Pageable pageable) {
Iterable<Book> books = adminService.findAll(pageable);
return BeanMapper.mapList(books, BookDto.class);
return BeanMapper.mapList(books, Book.class,BookDto.class);
}
@RequestMapping(value = "/api/books/{id}", produces = MediaTypes.JSON_UTF_8)
@@ -127,7 +127,7 @@ public class BookEndpoint {
checkToken(token);
Account currentUser = accountService.getLoginUser(token);
List<Book> books = adminService.listMyBook(currentUser.id, pageable);
return BeanMapper.mapList(books, BookDto.class);
return BeanMapper.mapList(books, Book.class, BookDto.class);
}
@RequestMapping(value = "/api/myborrowedbook", produces = MediaTypes.JSON_UTF_8)
@@ -136,7 +136,7 @@ public class BookEndpoint {
checkToken(token);
Account currentUser = accountService.getLoginUser(token);
List<Book> books = borrowService.listMyBorrowedBook(currentUser.id, pageable);
return BeanMapper.mapList(books, BookDto.class);
return BeanMapper.mapList(books, Book.class, BookDto.class);
}
private void checkToken(String token) {