提交 12d71c4c authored 作者: renjianyu's avatar renjianyu

--no commit message

上级 f8114c9f
...@@ -55,4 +55,8 @@ public class ChapterLibrary implements java.io.Serializable { ...@@ -55,4 +55,8 @@ public class ChapterLibrary implements java.io.Serializable {
@Transient @Transient
@ApiModelProperty(value = "子目录") @ApiModelProperty(value = "子目录")
private List<ChapterLibrary> list = new ArrayList<ChapterLibrary>(); private List<ChapterLibrary> list = new ArrayList<ChapterLibrary>();
@Transient
@ApiModelProperty(value = "绑定资源状态")
private String resourceType ;
} }
\ No newline at end of file
...@@ -140,10 +140,6 @@ public class FgEbookController { ...@@ -140,10 +140,6 @@ public class FgEbookController {
// 目录 // 目录
List<ChapterLibrary> chapterList = this.getDirectory(null, oid,1); List<ChapterLibrary> chapterList = this.getDirectory(null, oid,1);
vo.setChapterList(chapterList); vo.setChapterList(chapterList);
Example example = clservice.createExample();
example.createCriteria().andEqualTo("bookId", oid);
PageHelper.orderBy(" orderNum asc, pdfNum asc");
List<ChapterLibrary> list = clservice.selectByExample(example);
// 保存浏览记录 // 保存浏览记录
recordService.saveOrUpdateRecord(oid, AllResourceTypeEnum.BOOK.getCode().toString()); recordService.saveOrUpdateRecord(oid, AllResourceTypeEnum.BOOK.getCode().toString());
// 更新浏览量 // 更新浏览量
...@@ -395,6 +391,7 @@ public class FgEbookController { ...@@ -395,6 +391,7 @@ public class FgEbookController {
example.createCriteria().andEqualTo("bookId", bookId).andNotEqualTo("orderNum", orderNum); example.createCriteria().andEqualTo("bookId", bookId).andNotEqualTo("orderNum", orderNum);
PageHelper.orderBy(" orderNum asc, pdfNum asc"); PageHelper.orderBy(" orderNum asc, pdfNum asc");
List<ChapterLibrary> list = clservice.selectByExample(example); List<ChapterLibrary> list = clservice.selectByExample(example);
clmapper.selectchapterList(bookId, orderNum);
List<ChapterLibrary> voList = Copy.copyList(list , ChapterLibrary.class, obj -> obj.getLevel().intValue() == 0); List<ChapterLibrary> voList = Copy.copyList(list , ChapterLibrary.class, obj -> obj.getLevel().intValue() == 0);
tree(list,voList); tree(list,voList);
......
package com.zrqx.resource.fg.mapper.articlelibrary; package com.zrqx.resource.fg.mapper.articlelibrary;
import java.util.List;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
import com.zrqx.core.mapper.BaseMapper; import com.zrqx.core.mapper.BaseMapper;
...@@ -17,4 +19,9 @@ public interface FgChapterLibraryMapper extends BaseMapper<ChapterLibrary> { ...@@ -17,4 +19,9 @@ public interface FgChapterLibraryMapper extends BaseMapper<ChapterLibrary> {
@Select("select * from res_chapter_library where bookid = #{bookid} and orderNum = #{orderNum}") @Select("select * from res_chapter_library where bookid = #{bookid} and orderNum = #{orderNum}")
FgEbookChapterVO selectchapter(@Param("bookid")String bookid ,@Param("orderNum")Integer orderNum ); FgEbookChapterVO selectchapter(@Param("bookid")String bookid ,@Param("orderNum")Integer orderNum );
@Select("select *,(select GROUP_CONCAT(DISTINCT c.resourcetype) from res_article_library a inner join res_resource_relation c on a.id = c.objectid where a.markid = b.markid ORDER BY c.resourcetype ) resourceType from res_chapter_library b where bookid = #{bookid} and orderNum != #{orderNum} order by orderNum asc, pdfNum asc")
List<ChapterLibrary> selectchapterList(@Param("bookid")String bookid ,@Param("orderNum")Integer orderNum );
} }
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论