|
@@ -194,6 +194,14 @@ public class UserSubscribeServiceImpl extends ServiceImpl<UserSubscribeMapper, U
|
|
|
if(Validator.isEmpty(add.getOrderGoodsId())){
|
|
|
throw new CustomException("缺失订单商品ID");
|
|
|
}
|
|
|
+ ExamApplyQueryBo applyQueryBo = new ExamApplyQueryBo();
|
|
|
+ applyQueryBo.setUserId(bo.getUserId());
|
|
|
+ //查询剩余考试次数
|
|
|
+ Integer residueSubscribeNext = examApplyMapper.residueSubscribeNext(applyQueryBo);
|
|
|
+ if (residueSubscribeNext == null || residueSubscribeNext < 1){
|
|
|
+ throw new CustomException("考试次数不足");
|
|
|
+ }
|
|
|
+
|
|
|
//判断当前时间是否超过了选择时间
|
|
|
Date date = new Date();
|
|
|
Long times = add.getApplySiteExamTime()*1000;//时间戳
|