Commit 3f9c8230 authored by liuyuanjun's avatar liuyuanjun

尝试修改分割bug

parent 8270c357
......@@ -89,7 +89,7 @@ public interface BChapterRepository extends BaseMapper<BChapter> {
" bf.file_time AS fileTime ," +
" bf.file_size AS fileSize ," +
" if((SELECT count(0) from b_file bbf\n" +
" left join b_lesson bl on bl.business_id = bbf.lesson_id\n" +
" left join b_lesson bl on bl.business_id = bc.lesson_id\n" +
" where bbf.video_url = bf.video_url\n" +
" and bl.corp_id != '###')>1,1,0) isCutPdf " +
" FROM " +
......@@ -101,7 +101,7 @@ public interface BChapterRepository extends BaseMapper<BChapter> {
" ORDER BY " +
" bc.sort asc</script>")
@ResultMap(value = "SupperChildListResultMap")
List<QueryChapterListResDTO> queryBChaptersByPid(@Param("pid") String pid,@Param("lessonId") String lessonId);
List<QueryChapterListResDTO> queryBChaptersByPid(@Param("pid") String pid);
/**
* 根据章节id查找该章节学生分数列表
......
......@@ -719,7 +719,7 @@ public class BChapterServiceImpl implements BChapterService {
if ((ReleaseStateEnum.RELEASED.getCode().equals(bLesson.getReleaseState()) || ReleaseStateEnum.CLOSED.getCode().equals(bLesson.getReleaseState())) && chapterCount == 1 && bChapter.getChapterLevel() != 1) {
throw new ServiceException(ResultServiceEnums.CHAPTER_ONLY_ONE);
}
List<QueryChapterListResDTO> childList = bChapterRepository.queryBChaptersByPid(id,lessonId);
List<QueryChapterListResDTO> childList = bChapterRepository.queryBChaptersByPid(id);
boolean hasChild = childList != null && childList.size() > 0;
boolean isChapter = bChapter.getChapterLevel() == ChapterLevelEnum.CHAPTER.getCode();
if (isChapter && hasChild) {
......
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