|
|
@@ -24,10 +24,8 @@ import com.zhongzheng.modules.course.service.ICourseSectionBusinessService;
|
|
|
import com.zhongzheng.modules.course.service.ICourseService;
|
|
|
import com.zhongzheng.modules.course.vo.CourseUserVo;
|
|
|
import com.zhongzheng.modules.course.vo.CourseVo;
|
|
|
-import com.zhongzheng.modules.exam.domain.ExamApplyGoods;
|
|
|
-import com.zhongzheng.modules.exam.domain.ExamApplyUser;
|
|
|
-import com.zhongzheng.modules.exam.service.IExamApplyGoodsService;
|
|
|
-import com.zhongzheng.modules.exam.service.IExamApplyUserService;
|
|
|
+import com.zhongzheng.modules.exam.domain.*;
|
|
|
+import com.zhongzheng.modules.exam.service.*;
|
|
|
import com.zhongzheng.modules.exam.vo.ExamApplyGoodsVo;
|
|
|
import com.zhongzheng.modules.goods.domain.GoodsCourse;
|
|
|
import com.zhongzheng.modules.goods.service.IGoodsCourseService;
|
|
|
@@ -110,6 +108,12 @@ public class CourseServiceImpl extends ServiceImpl<CourseMapper, Course> impleme
|
|
|
@Autowired
|
|
|
private IExamApplyUserService iExamApplyUserService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IExamBeforeApplyService iExamBeforeApplyService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IExamBeforeService iExamBeforeService;
|
|
|
+
|
|
|
|
|
|
|
|
|
@Override
|
|
|
@@ -403,6 +407,7 @@ public class CourseServiceImpl extends ServiceImpl<CourseMapper, Course> impleme
|
|
|
List<ExamApplyGoodsVo> examApplyGoodsVoList = iExamApplyGoodsService.listByGoodsId(goodsUserVo.getGoodsId());
|
|
|
if (examApplyGoodsVoList != null && examApplyGoodsVoList.size() > 0) {
|
|
|
List<ExamApplyGoodsVo> examApplyGoodsVos = new ArrayList<>();
|
|
|
+ List<ExamApplyGoodsVo> examApplyGoodsVos2 = new ArrayList<>();
|
|
|
examApplyGoodsVoList.forEach(examApplyGoodsVo -> {
|
|
|
LambdaQueryWrapper<ExamApplyUser> lqw = Wrappers.lambdaQuery();
|
|
|
lqw.eq(ExamApplyUser::getApplyId, examApplyGoodsVo.getApplyId());
|
|
|
@@ -415,8 +420,26 @@ public class CourseServiceImpl extends ServiceImpl<CourseMapper, Course> impleme
|
|
|
if (userIds.contains(bo.getUserId())) {
|
|
|
examApplyGoodsVos.add(examApplyGoodsVo);
|
|
|
}
|
|
|
+ }else {
|
|
|
+ examApplyGoodsVos2.add(examApplyGoodsVo);
|
|
|
+ }
|
|
|
+ LambdaQueryWrapper<ExamBeforeApply> lq = Wrappers.lambdaQuery();
|
|
|
+ lq.eq(ExamBeforeApply::getApplyId, examApplyGoodsVo.getApplyId());
|
|
|
+ ExamBeforeApply examBeforeApply = iExamBeforeApplyService.getOne(lq);
|
|
|
+ if (examBeforeApply != null) {
|
|
|
+ LambdaQueryWrapper<ExamBefore> lqw1 = Wrappers.lambdaQuery();
|
|
|
+ lqw1.eq(ExamBefore::getBeforeId, examBeforeApply.getBeforeId());
|
|
|
+ lqw1.eq(ExamBefore::getStatus, 1);
|
|
|
+ ExamBefore examBefore = iExamBeforeService.getOne(lqw1);
|
|
|
+ if (examBefore != null) {
|
|
|
+ if (System.currentTimeMillis()/1000 > examBefore.getBeforeStartTime() && System.currentTimeMillis()/1000 < examBefore.getBeforeEndTime()) {
|
|
|
+ goodsUserVo.setBeforeStatus(1L);
|
|
|
+ goodsUserVo.setBeforeName(examBefore.getBeforeName());
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
+ examApplyGoodsVos.addAll(examApplyGoodsVos2);
|
|
|
goodsUserVo.setExamApplyGoodsList(examApplyGoodsVos);
|
|
|
}
|
|
|
}
|