|
@@ -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
|
|
@@ -416,6 +420,20 @@ public class CourseServiceImpl extends ServiceImpl<CourseMapper, Course> impleme
|
|
|
examApplyGoodsVos.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.setExamApplyGoodsList(examApplyGoodsVos);
|
|
|
}
|