Commit ca548e9c by 裴大威

Merge branch 'ruansiyuan' into 'master'

加个非空判断

See merge request rays/pcloud-book!98
parents a282d422 3ed509a4
...@@ -1317,7 +1317,9 @@ public class BookSet { ...@@ -1317,7 +1317,9 @@ public class BookSet {
Map<Long, Long> bookIdsMap = new HashMap<>(); Map<Long, Long> bookIdsMap = new HashMap<>();
for (Object object : bookList) { for (Object object : bookList) {
BookDto bookDto = (BookDto) object; BookDto bookDto = (BookDto) object;
bookIdsMap.put(bookDto.getBookId(), bookDto.getBookId()); if (bookDto != null && bookDto.getBookId() != null) {
bookIdsMap.put(bookDto.getBookId(), bookDto.getBookId());
}
} }
List<Long> bookIds = Lists.newArrayList(bookIdsMap.values()); List<Long> bookIds = Lists.newArrayList(bookIdsMap.values());
if (CollectionUtils.isEmpty(bookIds)) { if (CollectionUtils.isEmpty(bookIds)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment