yangdamao 2 anos atrás
pai
commit
ac8919ac51

+ 20 - 24
zhongzheng-system/src/main/java/com/zhongzheng/modules/exam/service/impl/ExamApplyGoodsServiceImpl.java

@@ -1,29 +1,25 @@
 package com.zhongzheng.modules.exam.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.domain.CourseChapterSection;
-import com.zhongzheng.modules.exam.domain.ExamApply;
-import com.zhongzheng.modules.exam.domain.ExamApplyUser;
-import com.zhongzheng.modules.exam.service.IExamApplyService;
-import com.zhongzheng.modules.exam.service.IExamApplyUserService;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.github.pagehelper.Page;
+import com.zhongzheng.common.utils.DateUtils;
 import com.zhongzheng.modules.exam.bo.ExamApplyGoodsAddBo;
-import com.zhongzheng.modules.exam.bo.ExamApplyGoodsQueryBo;
 import com.zhongzheng.modules.exam.bo.ExamApplyGoodsEditBo;
+import com.zhongzheng.modules.exam.bo.ExamApplyGoodsQueryBo;
+import com.zhongzheng.modules.exam.domain.ExamApply;
 import com.zhongzheng.modules.exam.domain.ExamApplyGoods;
 import com.zhongzheng.modules.exam.mapper.ExamApplyGoodsMapper;
-import com.zhongzheng.modules.exam.vo.ExamApplyGoodsVo;
 import com.zhongzheng.modules.exam.service.IExamApplyGoodsService;
+import com.zhongzheng.modules.exam.service.IExamApplyService;
+import com.zhongzheng.modules.exam.service.IExamApplyUserService;
+import com.zhongzheng.modules.exam.vo.ExamApplyGoodsVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
 
 import java.util.Collection;
-import java.util.Collections;
 import java.util.HashSet;
 import java.util.List;
 import java.util.stream.Collectors;
@@ -141,17 +137,17 @@ public class ExamApplyGoodsServiceImpl extends ServiceImpl<ExamApplyGoodsMapper,
             coll.add(add);
         }
         saveBatch(coll);
-        iExamApplyUserService.remove(new LambdaQueryWrapper<ExamApplyUser>().eq(ExamApplyUser::getApplyId, bo.getApplyId()));
-        Collection<ExamApplyUser> coll2 = new HashSet<>();
-        for(Long userId : bo.getUserId()){
-            ExamApplyUser add = new ExamApplyUser();
-            add.setApplyId(bo.getApplyId());
-            add.setUserId(userId);
-            add.setCreateTime(DateUtils.getNowTime());
-            add.setUpdateTime(DateUtils.getNowTime());
-            coll2.add(add);
-        }
-        iExamApplyUserService.saveBatch(coll2);
+//        iExamApplyUserService.remove(new LambdaQueryWrapper<ExamApplyUser>().eq(ExamApplyUser::getApplyId, bo.getApplyId()));
+//        Collection<ExamApplyUser> coll2 = new HashSet<>();
+//        for(Long userId : bo.getUserId()){
+//            ExamApplyUser add = new ExamApplyUser();
+//            add.setApplyId(bo.getApplyId());
+//            add.setUserId(userId);
+//            add.setCreateTime(DateUtils.getNowTime());
+//            add.setUpdateTime(DateUtils.getNowTime());
+//            coll2.add(add);
+//        }
+//        iExamApplyUserService.saveBatch(coll2);
         return true;
     }