提交 cec63206 authored 作者: renjiancai's avatar renjiancai

--no commit message

上级 515db19c
...@@ -10,6 +10,7 @@ import com.zrqx.core.model.resource.articlelibrary.ArticleLibrary; ...@@ -10,6 +10,7 @@ import com.zrqx.core.model.resource.articlelibrary.ArticleLibrary;
import com.zrqx.core.model.resource.audiolibrary.AudioLibrary; import com.zrqx.core.model.resource.audiolibrary.AudioLibrary;
import com.zrqx.core.model.resource.coursewarelibrary.CoursewareLibrary; import com.zrqx.core.model.resource.coursewarelibrary.CoursewareLibrary;
import com.zrqx.core.model.resource.ebook.Book; import com.zrqx.core.model.resource.ebook.Book;
import com.zrqx.core.model.resource.ebook.Ebook;
import com.zrqx.core.model.resource.imagelibrary.ImageLibrary; import com.zrqx.core.model.resource.imagelibrary.ImageLibrary;
import com.zrqx.core.model.resource.videolibrary.VideoLibrary; import com.zrqx.core.model.resource.videolibrary.VideoLibrary;
import com.zrqx.core.vo.resource.ResourceRelationVo; import com.zrqx.core.vo.resource.ResourceRelationVo;
...@@ -18,6 +19,7 @@ import com.zrqx.resource.bg.mapper.articlelibrary.ArticleLibraryMapper; ...@@ -18,6 +19,7 @@ import com.zrqx.resource.bg.mapper.articlelibrary.ArticleLibraryMapper;
import com.zrqx.resource.bg.mapper.audiolibrary.AudioLibraryMapper; import com.zrqx.resource.bg.mapper.audiolibrary.AudioLibraryMapper;
import com.zrqx.resource.bg.mapper.coursewarelibrary.CoursewareLibraryMapper; import com.zrqx.resource.bg.mapper.coursewarelibrary.CoursewareLibraryMapper;
import com.zrqx.resource.bg.mapper.ebook.BookMapper; import com.zrqx.resource.bg.mapper.ebook.BookMapper;
import com.zrqx.resource.bg.mapper.ebook.EbookMapper;
import com.zrqx.resource.bg.mapper.imagelibrary.ImageLibraryMapper; import com.zrqx.resource.bg.mapper.imagelibrary.ImageLibraryMapper;
import com.zrqx.resource.bg.mapper.videolibrary.VideoLibraryMapper; import com.zrqx.resource.bg.mapper.videolibrary.VideoLibraryMapper;
...@@ -37,6 +39,8 @@ public class ResourceRelationServiceImpl implements ResourceRelationService { ...@@ -37,6 +39,8 @@ public class ResourceRelationServiceImpl implements ResourceRelationService {
private PeriodicalClient periodicalClient; private PeriodicalClient periodicalClient;
@Autowired @Autowired
private BookMapper bookMapper; private BookMapper bookMapper;
@Autowired
private EbookMapper ebookMapper;
public List<ResourceRelationVo> queryRelationList(List<ResourceRelationVo> list) { public List<ResourceRelationVo> queryRelationList(List<ResourceRelationVo> list) {
list.forEach(e -> { list.forEach(e -> {
...@@ -45,6 +49,14 @@ public class ResourceRelationServiceImpl implements ResourceRelationService { ...@@ -45,6 +49,14 @@ public class ResourceRelationServiceImpl implements ResourceRelationService {
Book book = bookMapper.selectByPrimaryKey(e.getResourceId()); Book book = bookMapper.selectByPrimaryKey(e.getResourceId());
if (book != null) { if (book != null) {
e.setName(book.getName()); e.setName(book.getName());
e.setAuthor(book.getAuthor());
if(book.getAddress()!=null){
e.setAddress(book.getAddress());
}
Ebook ebook = ebookMapper.selectByPrimaryKey(book.getId());
if(ebook!=null){
e.setSummary(ebook.getSummary());
}
} }
} }
if (e.getResourceType().equals(ResourceTypeEnum.ARTICLE.getCode())) { if (e.getResourceType().equals(ResourceTypeEnum.ARTICLE.getCode())) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论