提交 e177da37 authored 作者: zhouzhigang's avatar zhouzhigang

--no commit message

上级 8fc63dce
......@@ -342,23 +342,26 @@ public class BookRecommendServiceImpl extends BaseModelServiceImpl<BookRecommend
book.setStatus(ApprovalStatusEnum.TBD.getCode());
SchoolAsedLibrary asedLibrary = null;
CallBack<PhyResourceVo> data = bgResourceClient.getById(book.getBookId());
if (!data.isStatus() || data.getData() == null) {
asedLibrary = libraryMapper.selectByPrimaryKey(book.getBookId());
book.setResourceName(asedLibrary.getResourceName());
book.setAuthor(asedLibrary.getAuther());
book.setIsbn(asedLibrary.getIsbn());
} else {
PhyResourceVo phyResource = data.getData();
book.setResourceName(phyResource.getName());
book.setAuthor(phyResource.getAuthor());
book.setCover(phyResource.getCover());
book.setIsbn(phyResource.getIsbn());
if(data != null) {
if (!data.isStatus() || data.getData() == null) {
asedLibrary = libraryMapper.selectByPrimaryKey(book.getBookId());
book.setResourceName(asedLibrary.getResourceName());
book.setAuthor(asedLibrary.getAuther());
book.setIsbn(asedLibrary.getIsbn());
} else {
PhyResourceVo phyResource = data.getData();
book.setResourceName(phyResource.getName());
book.setAuthor(phyResource.getAuthor());
book.setCover(phyResource.getCover());
book.setIsbn(phyResource.getIsbn());
}
}
if (data.getData() == null && asedLibrary == null) {
log.error(book.getBookId()+ "资源不存在");
throw new BaseException("资源不存在");
}
// if (data.getData() == null && asedLibrary == null ) {
// log.error(book.getBookId()+ "资源不存在");
// throw new BaseException("资源不存在");
// }
});
item = books.stream()
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论