|
@@ -3,6 +3,7 @@ package com.zhongzheng.modules.course.service.impl;
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import com.zhongzheng.common.utils.DateUtils;
|
|
|
+import com.zhongzheng.modules.course.bo.CourseChapterBusinessAddBo;
|
|
|
import com.zhongzheng.modules.course.bo.CourseChapterSectionAddBo;
|
|
|
import com.zhongzheng.modules.course.bo.CourseChapterSectionEditBo;
|
|
|
import com.zhongzheng.modules.course.bo.CourseChapterSectionQueryBo;
|
|
@@ -66,9 +67,15 @@ public class CourseChapterSectionServiceImpl extends ServiceImpl<CourseChapterSe
|
|
|
|
|
|
@Override
|
|
|
public Boolean insertByAddBo(CourseChapterSectionAddBo bo) {
|
|
|
- CourseChapterSection add = BeanUtil.toBean(bo, CourseChapterSection.class);
|
|
|
- validEntityBeforeSave(add);
|
|
|
- return this.save(add);
|
|
|
+ Boolean result = false;
|
|
|
+ for(int i=0;i<bo.getSectionIdList().size();i++){
|
|
|
+ Long sectionId = bo.getSectionIdList().get(i);
|
|
|
+ CourseChapterSection add = new CourseChapterSection();
|
|
|
+ add.setChapterId(bo.getChapterId());
|
|
|
+ add.setSectionId(sectionId);
|
|
|
+ result = this.save(add);
|
|
|
+ }
|
|
|
+ return result;
|
|
|
}
|
|
|
|
|
|
@Override
|