he2802 4 жил өмнө
parent
commit
6aa39b75ca

+ 2 - 2
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/service/impl/ExamServiceImpl.java

@@ -128,7 +128,7 @@ public class ExamServiceImpl extends ServiceImpl<ExamMapper, Exam> implements IE
         Exam update = BeanUtil.toBean(bo, Exam.class);
         validEntityBeforeSave(update);
         update.setUpdateTime(DateUtils.getNowTime());
-        if(bo.getQuestionList()!=null&&bo.getQuestionList().size()>0){
+        if(bo.getQuestionList()!=null){
             Collection<ExamQuestion> coll = new HashSet<>();
             iExamQuestionService.remove(new LambdaQueryWrapper<ExamQuestion>().eq(ExamQuestion::getExamId, bo.getExamId()));
             for(int i=0;i<bo.getQuestionList().size();i++){
@@ -141,7 +141,7 @@ public class ExamServiceImpl extends ServiceImpl<ExamMapper, Exam> implements IE
             }
             iExamQuestionService.saveBatch(coll);
         }
-        if(bo.getBusinessList()!=null&&bo.getBusinessList().size()>0){
+        if(bo.getBusinessList()!=null){
             iQuestionBusinessService.remove(new LambdaQueryWrapper<QuestionBusiness>()
                     .eq(QuestionBusiness::getMajorId, bo.getExamId())
                     .eq(QuestionBusiness::getType,QuestionBusiness.TYPE_EXAM));

+ 2 - 2
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/service/impl/QuestionChapterServiceImpl.java

@@ -119,7 +119,7 @@ public class QuestionChapterServiceImpl extends ServiceImpl<QuestionChapterMappe
         QuestionChapter update = BeanUtil.toBean(bo, QuestionChapter.class);
         validEntityBeforeSave(update);
         update.setUpdateTime(DateUtils.getNowTime());
-        if(bo.getBusinessList()!=null&&bo.getBusinessList().size()>0){
+        if(bo.getBusinessList()!=null){
             iQuestionBusinessService.remove(new LambdaQueryWrapper<QuestionBusiness>().eq(QuestionBusiness::getMajorId, bo.getChapterExamId())
                     .eq(QuestionBusiness::getType,QuestionBusiness.TYPE_QUESTION_CHAPTER));
             Collection<QuestionBusiness> coll = new HashSet<>();
@@ -132,7 +132,7 @@ public class QuestionChapterServiceImpl extends ServiceImpl<QuestionChapterMappe
             }
             iQuestionBusinessService.saveBatch(coll);
         }
-        if(bo.getExamList()!=null&&bo.getExamList().size()>0){
+        if(bo.getExamList()!=null){
             iQuestionChapterExamService.remove(new LambdaQueryWrapper<QuestionChapterExam>().eq(QuestionChapterExam::getChapterExamId, bo.getChapterExamId()));
             Collection<QuestionChapterExam> coll = new HashSet<>();
             for(int i=0;i<bo.getBusinessList().size();i++){

+ 2 - 2
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/service/impl/QuestionModuleServiceImpl.java

@@ -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&&bo.getBusinessList().size()>0){
+        if(bo.getBusinessList()!=null){
             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&&bo.getChapterList().size()>0){
+        if(bo.getChapterList()!=null){
             iQuestionModuleChapterService.remove(new LambdaQueryWrapper<QuestionModuleChapter>().eq(QuestionModuleChapter::getModuleExamId, bo.getModuleExamId()));
             Collection<QuestionModuleChapter> coll = new HashSet<>();
             for(int i=0;i<bo.getChapterList().size();i++){

+ 1 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/bank/service/impl/QuestionServiceImpl.java

@@ -127,7 +127,7 @@ public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> i
         }
         validEntityBeforeSave(update);
         update.setUpdateTime(DateUtils.getNowTime());
-        if(bo.getBusinessList()!=null&&bo.getBusinessList().size()>0){
+        if(bo.getBusinessList()!=null){
             iQuestionBusinessService.remove(new LambdaQueryWrapper<QuestionBusiness>()
                     .eq(QuestionBusiness::getMajorId, bo.getQuestionId())
             .eq(QuestionBusiness::getType,QuestionBusiness.TYPE_QUESTION));

+ 2 - 2
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseChapterServiceImpl.java

@@ -134,7 +134,7 @@ public class CourseChapterServiceImpl extends ServiceImpl<CourseChapterMapper, C
         CourseChapter update = BeanUtil.toBean(bo, CourseChapter.class);
         validEntityBeforeSave(update);
         update.setUpdateTime(DateUtils.getNowTime());
-        if(bo.getBusinessList()!= null&&bo.getBusinessList().size()>0){
+        if(bo.getBusinessList()!= null){
             iCourseChapterBusinessService.remove(new LambdaQueryWrapper<CourseChapterBusiness>().eq(CourseChapterBusiness::getChapterId, bo.getChapterId()));
             for(int i=0;i<bo.getBusinessList().size();i++){
                 CourseChapterBusinessAddBo item = bo.getBusinessList().get(i);
@@ -142,7 +142,7 @@ public class CourseChapterServiceImpl extends ServiceImpl<CourseChapterMapper, C
                 iCourseChapterBusinessService.insertByAddBo(item);
             }
         }
-        if(bo.getSectionIdList()!=null&&bo.getSectionIdList().size()>0){
+        if(bo.getSectionIdList()!=null){
             iCourseChapterSectionService.remove(new LambdaQueryWrapper<CourseChapterSection>().eq(CourseChapterSection::getChapterId, bo.getChapterId()));
             Collection<CourseChapterSection> coll = new HashSet<>();
             for(int i=0;i<bo.getSectionIdList().size();i++){

+ 2 - 2
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseModuleServiceImpl.java

@@ -121,7 +121,7 @@ public class CourseModuleServiceImpl extends ServiceImpl<CourseModuleMapper, Cou
         CourseModule update = BeanUtil.toBean(bo, CourseModule.class);
         validEntityBeforeSave(update);
         update.setUpdateTime(DateUtils.getNowTime());
-        if(bo.getBusinessList()!= null&&bo.getBusinessList().size()>0){
+        if(bo.getBusinessList()!= null){
             iCourseModuleBusinessService.remove(new LambdaQueryWrapper<CourseModuleBusiness>().eq(CourseModuleBusiness::getModuleId, bo.getModuleId()));
             for(int i=0;i<bo.getBusinessList().size();i++){
                 CourseModuleBusinessAddBo item = bo.getBusinessList().get(i);
@@ -129,7 +129,7 @@ public class CourseModuleServiceImpl extends ServiceImpl<CourseModuleMapper, Cou
                 iCourseModuleBusinessService.insertByAddBo(item);
             }
         }
-        if(bo.getChapterIdList()!=null&&bo.getChapterIdList().size()>0){
+        if(bo.getChapterIdList()!=null){
             iCourseModuleChapterService.remove(new LambdaQueryWrapper<CourseModuleChapter>().eq(CourseModuleChapter::getModuleId, bo.getModuleId()));
             Collection<CourseModuleChapter> coll = new HashSet<>();
             for(int i=0;i<bo.getChapterIdList().size();i++){

+ 2 - 2
zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/service/impl/GoodsServiceImpl.java

@@ -203,7 +203,7 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
         validEntityBeforeSave(update);
         update.setUpdateTime(DateUtils.getNowTime());
         //课程列表
-        if(bo.getCourseList()!=null&&bo.getCourseList().size()>0){
+        if(bo.getCourseList()!=null){
             iGoodsCourseService.remove(new LambdaQueryWrapper<GoodsCourse>().eq(GoodsCourse::getGoodsId, bo.getGoodsId()));
             Collection<GoodsCourse> coll = new HashSet<>();
             for(int i=0;i<bo.getCourseList().size();i++){
@@ -237,7 +237,7 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
         Goods update = BeanUtil.toBean(bo, Goods.class);
         validEntityBeforeSave(update);
         update.setUpdateTime(DateUtils.getNowTime());
-        if(bo.getBankList()!=null&&bo.getBankList().size()>0){
+        if(bo.getBankList()!=null){
             iGoodsAttachedService.remove(new LambdaQueryWrapper<GoodsAttached>().eq(GoodsAttached::getGoodsId, bo.getGoodsId()));
             Collection<GoodsAttached> coll = new HashSet<>();
             for(int i=0;i<bo.getBankList().size();i++){