diff --git a/servers/boe-server-all/src/main/java/com/xboe/school/study/service/impl/StudySignupServiceImpl.java b/servers/boe-server-all/src/main/java/com/xboe/school/study/service/impl/StudySignupServiceImpl.java index a10ee6b9..9fe39283 100644 --- a/servers/boe-server-all/src/main/java/com/xboe/school/study/service/impl/StudySignupServiceImpl.java +++ b/servers/boe-server-all/src/main/java/com/xboe/school/study/service/impl/StudySignupServiceImpl.java @@ -99,16 +99,20 @@ public class StudySignupServiceImpl implements IStudySignupService{ sc.setStatusTime(now); sc.setLastTime(sc.getAddTime()); sc.setTotalDuration(0); - for (CourseContent c : courseContents){ - scitem.setAname(signup.getName()); - scitem.setAid(signup.getAid()); - scitem.setCourseId(signup.getCourseId()); - scitem.setProgress(0); - scitem.setScore(0f); - scitem.setStudyId(sc.getId()); - scitem.setStatus(1); - scitem.setContentId(c.getId()); - scitem.setContentName(c.getContentName()); + if (courseContents.size()>0){ + log.info("查看在线课集合内容数据"+courseContents); + for (CourseContent c : courseContents){ + log.info("查看在线课内容数据"+c); + scitem.setAname(signup.getName()); + scitem.setAid(signup.getAid()); + scitem.setCourseId(signup.getCourseId()); + scitem.setProgress(0); + scitem.setScore(0f); + scitem.setStudyId(sc.getId()); + scitem.setStatus(1); + scitem.setContentId(c.getId()); + //scitem.setContentName(c.getContentName()); + } } scItemDao.save(scitem); studyCourseDao.save(sc);