Commit 9d058fe2 authored by luzhuang's avatar luzhuang

修改接口

parent 99f8b03c
......@@ -409,11 +409,10 @@ public class BChapterServiceImpl implements BChapterService {
throw new ServiceException(ResultServiceEnums.CHAPTER_NOT_EXISTS);
int chapterCount =bChapterRepository.getlessonHours(lessonId);
if(chapterCount == 1){
BLesson bLesson = bLessonRepository.selectByPrimaryKey(lessonId);
if("2".equals(bLesson.getReleaseState()) && chapterCount == 1){
throw new ServiceException(ResultServiceEnums.CHAPTER_ONLY_ONE);
}
String firstChapter = bChapterRepository.getFirstChapter(id);
List<QueryChapterListResDTO> childList = bChapterRepository.queryBChaptersByPid(id);
boolean hasChild = childList != null && childList.size() > 0;
boolean isChapter = bChapter.getChapterLevel() == ChapterLevelEnum.CHAPTER.getCode();
......
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