Commit 32ff305e by daixing

fix

parent f2fa465c
......@@ -262,9 +262,18 @@ public class BookGroupBizImpl implements BookGroupBiz {
return null;
}
List<BookGroupDTO> list = bookGroupDao.getDTOByIds(bookGroupIds);
List<Long> bookIds = list.stream().map(BookGroupDTO::getBookId).collect(Collectors.toList());
Map<Long, BookDto> mapByIds = bookDao.getMapByIds(bookIds);
if (ListUtils.isEmpty(list)) {
return null;
}
list.forEach(e ->{
if (!MapUtils.isEmpty(mapByIds) && mapByIds.get(e.getBookId()) != null){
e.setBookName(mapByIds.get(e.getBookId()).getBookName());
e.setIsbn(mapByIds.get(e.getBookId()).getIsbn());
e.setBookNumber("BK" + e.getBookId());
}
});
return list.stream().collect(Collectors.toMap(BookGroupDTO::getId, dto -> dto));
}
......
......@@ -133,6 +133,11 @@ public class BookGroupDTO extends BaseDto {
private String bookName;
/**
* 编号
*/
private String bookNumber;
private String url;
private Long bookClockInfoId;
......@@ -359,6 +364,14 @@ public class BookGroupDTO extends BaseDto {
this.isShowBookName = isShowBookName;
}
public String getBookNumber() {
return bookNumber;
}
public void setBookNumber(String bookNumber) {
this.bookNumber = bookNumber;
}
@Override
public String toString() {
return "BookGroupDTO{" +
......@@ -386,9 +399,10 @@ public class BookGroupDTO extends BaseDto {
", bookImg='" + bookImg + '\'' +
", isbn='" + isbn + '\'' +
", bookName='" + bookName + '\'' +
", bookNumber='" + bookNumber + '\'' +
", url='" + url + '\'' +
", bookClockInfoId=" + bookClockInfoId +
", isShowBookName='" + isShowBookName + '\'' +
"} " + super.toString();
", isShowBookName=" + isShowBookName +
'}';
}
}
\ No newline at end of file
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