|
@@ -20,8 +20,12 @@ import com.zhongzheng.modules.course.service.ICourseMenuService;
|
|
|
import com.zhongzheng.modules.course.service.ICourseSectionService;
|
|
|
import com.zhongzheng.modules.course.vo.CourseLiveVo;
|
|
|
import com.zhongzheng.modules.course.vo.CourseVo;
|
|
|
+import com.zhongzheng.modules.exam.domain.ExamApplyUser;
|
|
|
import com.zhongzheng.modules.exam.domain.ExamBefore;
|
|
|
+import com.zhongzheng.modules.exam.service.IExamApplyGoodsService;
|
|
|
+import com.zhongzheng.modules.exam.service.IExamApplyUserService;
|
|
|
import com.zhongzheng.modules.exam.service.IExamBeforeService;
|
|
|
+import com.zhongzheng.modules.exam.vo.ExamApplyGoodsVo;
|
|
|
import com.zhongzheng.modules.goods.bo.GoodsQueryBo;
|
|
|
import com.zhongzheng.modules.goods.service.IGoodsCourseService;
|
|
|
import com.zhongzheng.modules.goods.service.IGoodsService;
|
|
@@ -127,6 +131,12 @@ public class OrderGoodsServiceImpl extends ServiceImpl<OrderGoodsMapper, OrderGo
|
|
|
@Autowired
|
|
|
private IExamBeforeService iExamBeforeService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IExamApplyGoodsService iExamApplyGoodsService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IExamApplyUserService iExamApplyUserService;
|
|
|
+
|
|
|
@Override
|
|
|
public OrderGoodsVo queryById(Long orderGoodsId) {
|
|
|
OrderGoods db = this.baseMapper.selectById(orderGoodsId);
|
|
@@ -552,6 +562,30 @@ public class OrderGoodsServiceImpl extends ServiceImpl<OrderGoodsMapper, OrderGo
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ //查询对应考试安排
|
|
|
+ List<ExamApplyGoodsVo> examApplyGoodsVoList = iExamApplyGoodsService.listByGoodsId(goodsVo.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());
|
|
|
+ List<ExamApplyUser> examApplyUserList = iExamApplyUserService.list(lqw);
|
|
|
+ if (examApplyUserList != null && examApplyUserList.size() > 0) {
|
|
|
+ ArrayList<Long> userIds = new ArrayList<>();
|
|
|
+ examApplyUserList.forEach(examApplyUser -> {
|
|
|
+ userIds.add(examApplyUser.getUserId());
|
|
|
+ });
|
|
|
+ if (userIds.contains(bo.getUserId())) {
|
|
|
+ examApplyGoodsVos.add(examApplyGoodsVo);
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ examApplyGoodsVos2.add(examApplyGoodsVo);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ examApplyGoodsVos.addAll(examApplyGoodsVos2);
|
|
|
+ goodsVo.setExamApplyGoodsList(examApplyGoodsVos);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
return list;
|