|
@@ -118,7 +118,7 @@ public class QuestionModuleServiceImpl extends ServiceImpl<QuestionModuleMapper,
|
|
|
QuestionModule update = BeanUtil.toBean(bo, QuestionModule.class);
|
|
|
validEntityBeforeSave(update);
|
|
|
update.setUpdateTime(DateUtils.getNowTime());
|
|
|
- if(bo.getBusinessList()!=null){
|
|
|
+ if(bo.getBusinessList()!=null&&bo.getBusinessList().size()>0){
|
|
|
iQuestionBusinessService.remove(new LambdaQueryWrapper<QuestionBusiness>().eq(QuestionBusiness::getMajorId, bo.getModuleExamId())
|
|
|
.eq(QuestionBusiness::getType,QuestionBusiness.TYPE_QUESTION_MODULE));
|
|
|
Collection<QuestionBusiness> coll = new HashSet<>();
|
|
@@ -131,7 +131,7 @@ public class QuestionModuleServiceImpl extends ServiceImpl<QuestionModuleMapper,
|
|
|
}
|
|
|
iQuestionBusinessService.saveBatch(coll);
|
|
|
}
|
|
|
- if(bo.getChapterList()!=null){
|
|
|
+ if(bo.getChapterList()!=null&&bo.getChapterList().size()>0){
|
|
|
iQuestionModuleChapterService.remove(new LambdaQueryWrapper<QuestionModuleChapter>().eq(QuestionModuleChapter::getModuleExamId, bo.getModuleExamId()));
|
|
|
Collection<QuestionModuleChapter> coll = new HashSet<>();
|
|
|
for(int i=0;i<bo.getChapterList().size();i++){
|