Commit c79b64ae authored by luzhuang's avatar luzhuang

修改接口

parent 9d058fe2
...@@ -504,12 +504,13 @@ public class BLessonServiceImpl implements BLessonService { ...@@ -504,12 +504,13 @@ public class BLessonServiceImpl implements BLessonService {
@Override @Override
@Transactional(propagation = Propagation.REQUIRED, readOnly = false) @Transactional(propagation = Propagation.REQUIRED, readOnly = false)
public PersistModel releaseBLesson(String id) { public PersistModel releaseBLesson(String id) {
if(bChapterRepository.getlessonHours(id) == 0){
throw new ServiceException(ResultServiceEnums.LESSON_NO_CHAPTER);
}
BLesson bLesson = new BLesson(); BLesson bLesson = new BLesson();
bLesson.setBusinessId(id); bLesson.setBusinessId(id);
bLesson = bLessonRepository.selectByPrimaryKey(bLesson); bLesson = bLessonRepository.selectByPrimaryKey(bLesson);
if("0".equals(bLesson.getLessonType()) && bChapterRepository.getlessonHours(id) == 0){
throw new ServiceException(ResultServiceEnums.LESSON_NO_CHAPTER);
}
if (bLesson == null){ if (bLesson == null){
throw new ServiceException(ResultServiceEnums.NOT_LESSON_ERROR); throw new ServiceException(ResultServiceEnums.NOT_LESSON_ERROR);
} }
......
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