Commit a818edca by 田超

Merge branch 'fixbug/1027830' into 'master'

bug: [1027830] 展示书刊标签

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