|
@@ -11,6 +11,9 @@ import com.zhongzheng.modules.collect.domain.CollectBank;
|
|
|
import com.zhongzheng.modules.exam.bo.*;
|
|
|
import com.zhongzheng.modules.exam.domain.ExamApply;
|
|
|
import com.zhongzheng.modules.exam.vo.ExamNumberGoodsVo;
|
|
|
+import com.zhongzheng.modules.order.domain.OrderGoods;
|
|
|
+import com.zhongzheng.modules.order.service.IOrderGoodsService;
|
|
|
+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;
|
|
@@ -33,6 +36,9 @@ import java.util.stream.Collectors;
|
|
|
@Service
|
|
|
public class ExamBeforeServiceImpl extends ServiceImpl<ExamBeforeMapper, ExamBefore> implements IExamBeforeService {
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private IOrderGoodsService iOrderGoodsService;
|
|
|
+
|
|
|
@Override
|
|
|
public ExamBeforeVo queryById(Long beforeId){
|
|
|
ExamBeforeVo examBeforeVo = baseMapper.selectByBefore(beforeId);
|
|
@@ -176,6 +182,9 @@ public class ExamBeforeServiceImpl extends ServiceImpl<ExamBeforeMapper, ExamBef
|
|
|
if (verLong < 1){
|
|
|
throw new IllegalArgumentException("您不符合考前刷题条件,请先预约考试,或者咨询相关工作人员,了解使用条件。");
|
|
|
}
|
|
|
+ OrderGoods orderGoods = iOrderGoodsService.getOne(new LambdaQueryWrapper<OrderGoods>()
|
|
|
+ .eq(OrderGoods::getOrderGoodsId,examBeforeQueryBo.getOrderGoodsId()));
|
|
|
+ examBeforeQueryBo.setGoodsId(orderGoods.getGoodsId());
|
|
|
ExamBeforeVo examBeforeVo = baseMapper.verifyExamBeforeVo(examBeforeQueryBo);
|
|
|
return examBeforeVo;
|
|
|
}
|