|
@@ -142,12 +142,19 @@ public class ExamNumberServiceImpl extends ServiceImpl<ExamNumberMapper, ExamNum
|
|
throw new IllegalArgumentException("当前商品已启用考次配置,不可开启,请重新创建新的配置考试次数和前培次数商品");
|
|
throw new IllegalArgumentException("当前商品已启用考次配置,不可开启,请重新创建新的配置考试次数和前培次数商品");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if (bo.getStatus() == 0){
|
|
|
|
|
|
+ if (bo.getStatus() == -1 || bo.getStatus()==1){
|
|
ExamNumberGoodsQueryBo examNumberGoodsQueryBo = new ExamNumberGoodsQueryBo();
|
|
ExamNumberGoodsQueryBo examNumberGoodsQueryBo = new ExamNumberGoodsQueryBo();
|
|
List<Integer> status = new ArrayList<>();
|
|
List<Integer> status = new ArrayList<>();
|
|
status.add(1);
|
|
status.add(1);
|
|
examNumberGoodsQueryBo.setGoodsId(goodsId);
|
|
examNumberGoodsQueryBo.setGoodsId(goodsId);
|
|
List<ExamNumberGoodsVo> examNumberGoodsVos = examApplyMapper.listGoods(examNumberGoodsQueryBo);
|
|
List<ExamNumberGoodsVo> examNumberGoodsVos = examApplyMapper.listGoods(examNumberGoodsQueryBo);
|
|
|
|
+ if (CollectionUtils.isNotEmpty(examNumberGoodsVos)){
|
|
|
|
+ for (ExamNumberGoodsVo examNumberGoodsVo : examNumberGoodsVos) {
|
|
|
|
+ if (examNumberGoodsVo.getGoodsStatus() == 0){
|
|
|
|
+ throw new IllegalArgumentException("当前商品已启用考试安排,不可开启或关闭");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
ExamNumberGoodsAddBo examNumberGoodsAddBo = new ExamNumberGoodsAddBo();
|
|
ExamNumberGoodsAddBo examNumberGoodsAddBo = new ExamNumberGoodsAddBo();
|
|
examNumberGoodsAddBo.setGoodsId(goodsId);
|
|
examNumberGoodsAddBo.setGoodsId(goodsId);
|