Commit fe965f5a by 朱亚洁

bug:[1027830]展示书刊标签

parent 511540d4
...@@ -637,9 +637,10 @@ public class BookBizImpl implements BookBiz { ...@@ -637,9 +637,10 @@ public class BookBizImpl implements BookBiz {
bookDto.setTempletId(bookAdviserDto.getTempletId()); bookDto.setTempletId(bookAdviserDto.getTempletId());
bookSet.setFirstTemplateName(bookDto); bookSet.setFirstTemplateName(bookDto);
adviserId = bookAdviserDto.getAdviserId(); adviserId = bookAdviserDto.getAdviserId();
if(bookAdviserDto.getGraLabelId()!=null){ bookDto.setGraLabelId(bookAdviserDto.getGraLabelId());
bookDto.setGraLabelId(bookAdviserDto.getGraLabelId()); bookDto.setSubLabelId(bookAdviserDto.getSubLabelId());
} bookDto.setVerLabelId(bookAdviserDto.getVerLabelId());
bookDto.setVolLabelId(bookAdviserDto.getVolLabelId());
} }
if (Objects.nonNull(bookDto)){ if (Objects.nonNull(bookDto)){
bookDto.setIsLibraryBook(checkIsLibraryBook(adviserId, bookId) ? 1 : 0); bookDto.setIsLibraryBook(checkIsLibraryBook(adviserId, bookId) ? 1 : 0);
...@@ -1234,6 +1235,7 @@ public class BookBizImpl implements BookBiz { ...@@ -1234,6 +1235,7 @@ public class BookBizImpl implements BookBiz {
} }
// 获取书籍基本信息 // 获取书籍基本信息
BookDto bookDto = this.getBaseById(bookId); BookDto bookDto = this.getBaseById(bookId);
bookSet.setLabelNames(Arrays.asList(bookDto));
return bookDto; return bookDto;
} }
......
...@@ -229,7 +229,7 @@ public interface BookFacade { ...@@ -229,7 +229,7 @@ public interface BookFacade {
* 获取书籍的基本信息(微信客户端) * 获取书籍的基本信息(微信客户端)
*/ */
@ApiOperation(value = "获取书籍的基本信息(微信客户端)", httpMethod = "GET") @ApiOperation(value = "获取书籍的基本信息(微信客户端)", httpMethod = "GET")
@ApiImplicitParams({@ApiImplicitParam(name = "token", value = "token", dataType = "string", paramType = "header"), @ApiImplicitParams({
@ApiImplicitParam(name = "bookId", value = "书籍标识", dataType = "long", paramType = "query")}) @ApiImplicitParam(name = "bookId", value = "书籍标识", dataType = "long", paramType = "query")})
@RequestMapping(value = "getBaseInfoById4Wechat", method = RequestMethod.GET) @RequestMapping(value = "getBaseInfoById4Wechat", method = RequestMethod.GET)
ResponseDto<BookDto> getBaseInfoById4Wechat(@CookieValue("userInfo") String userInfo, ResponseDto<BookDto> getBaseInfoById4Wechat(@CookieValue("userInfo") String userInfo,
......
...@@ -1968,6 +1968,9 @@ public class BookSet { ...@@ -1968,6 +1968,9 @@ public class BookSet {
labelIds.add(bookDto.getVolLabelId()); labelIds.add(bookDto.getVolLabelId());
} }
}); });
if (ListUtils.isEmpty(labelIds)) {
return;
}
Map<Long, BookLabel> bookLabelMap = bookLabelDao.getMapByIds(labelIds); Map<Long, BookLabel> bookLabelMap = bookLabelDao.getMapByIds(labelIds);
recordList.forEach(bookDto -> { recordList.forEach(bookDto -> {
if (bookLabelMap.get(bookDto.getAreaLabelId()) != null) { if (bookLabelMap.get(bookDto.getAreaLabelId()) != null) {
......
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