|
@@ -11,6 +11,7 @@ import com.zhongzheng.common.exception.CustomException;
|
|
|
import com.zhongzheng.common.utils.DateUtils;
|
|
|
import com.zhongzheng.common.utils.ServletUtils;
|
|
|
import com.zhongzheng.modules.course.bo.CourseChapterSectionListAddBo;
|
|
|
+import com.zhongzheng.modules.course.bo.CourseMenuListAddBo;
|
|
|
import com.zhongzheng.modules.course.bo.CourseMenuQueryBo;
|
|
|
import com.zhongzheng.modules.course.bo.CourseQueryBo;
|
|
|
import com.zhongzheng.modules.course.domain.CourseChapterSection;
|
|
@@ -217,7 +218,7 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
|
|
|
}
|
|
|
boolean result = this.save(add);
|
|
|
//课程列表
|
|
|
- if(bo.getCourseList()!=null){
|
|
|
+ if(bo.getCourseList()!=null&&bo.getCourseList().size()>0){
|
|
|
Collection<GoodsCourse> coll = new HashSet<>();
|
|
|
for(int i=0;i<bo.getCourseList().size();i++){
|
|
|
GoodsCourseAddBo item = bo.getCourseList().get(i);
|
|
@@ -229,7 +230,13 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
|
|
|
}
|
|
|
iGoodsCourseService.saveBatch(coll);
|
|
|
}
|
|
|
-
|
|
|
+ //模块章列表
|
|
|
+ if(bo.getMenuList()!=null&&bo.getMenuList().size()>0){
|
|
|
+ CourseMenuListAddBo menuListAddBo = new CourseMenuListAddBo();
|
|
|
+ menuListAddBo.setGoodsId(add.getGoodsId());
|
|
|
+ menuListAddBo.setMenuList(bo.getMenuList());
|
|
|
+ iCourseMenuService.insertByGoodsAddBo(menuListAddBo);
|
|
|
+ }
|
|
|
return result;
|
|
|
}
|
|
|
|
|
@@ -312,7 +319,13 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
|
|
|
if(bo.getGoodsPhotographExamConfig()!=null){
|
|
|
update.setGoodsPhotoExamConfig(JSON.toJSONString(bo.getGoodsPhotographExamConfig()));
|
|
|
}
|
|
|
-
|
|
|
+ //模块章列表
|
|
|
+ if(bo.getMenuList()!=null&&bo.getMenuList().size()>0){
|
|
|
+ CourseMenuListAddBo menuListAddBo = new CourseMenuListAddBo();
|
|
|
+ menuListAddBo.setCourseId(bo.getCourseId());
|
|
|
+ menuListAddBo.setMenuList(bo.getMenuList());
|
|
|
+ iCourseMenuService.updateByEditBo(menuListAddBo);
|
|
|
+ }
|
|
|
return this.updateById(update);
|
|
|
}
|
|
|
|