|
@@ -5,8 +5,9 @@ import cn.hutool.core.util.StrUtil;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
|
|
import com.zhongzheng.common.utils.DateUtils;
|
|
|
import com.zhongzheng.common.utils.ServletUtils;
|
|
|
-import com.zhongzheng.modules.exam.bo.ExamNumberGoodsAddBo;
|
|
|
+import com.zhongzheng.modules.exam.bo.*;
|
|
|
import com.zhongzheng.modules.exam.domain.ExamNumberGoods;
|
|
|
+import com.zhongzheng.modules.exam.mapper.ExamApplyMapper;
|
|
|
import com.zhongzheng.modules.exam.service.IExamNumberGoodsService;
|
|
|
import com.zhongzheng.modules.exam.vo.ExamNumberGoodsVo;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -15,9 +16,6 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.github.pagehelper.Page;
|
|
|
-import com.zhongzheng.modules.exam.bo.ExamNumberAddBo;
|
|
|
-import com.zhongzheng.modules.exam.bo.ExamNumberQueryBo;
|
|
|
-import com.zhongzheng.modules.exam.bo.ExamNumberEditBo;
|
|
|
import com.zhongzheng.modules.exam.domain.ExamNumber;
|
|
|
import com.zhongzheng.modules.exam.mapper.ExamNumberMapper;
|
|
|
import com.zhongzheng.modules.exam.vo.ExamNumberVo;
|
|
@@ -42,6 +40,9 @@ public class ExamNumberServiceImpl extends ServiceImpl<ExamNumberMapper, ExamNum
|
|
|
@Autowired
|
|
|
private IExamNumberGoodsService examNumberGoodsService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ExamApplyMapper examApplyMapper;
|
|
|
+
|
|
|
|
|
|
@Override
|
|
|
public ExamNumberVo queryById(Long examNumberId){
|
|
@@ -141,6 +142,13 @@ public class ExamNumberServiceImpl extends ServiceImpl<ExamNumberMapper, ExamNum
|
|
|
throw new IllegalArgumentException("当前商品已启用考次配置,不可开启,请重新创建新的配置考试次数和前培次数商品");
|
|
|
}
|
|
|
}
|
|
|
+ if (bo.getStatus() == 0){
|
|
|
+ ExamNumberGoodsQueryBo examNumberGoodsQueryBo = new ExamNumberGoodsQueryBo();
|
|
|
+ List<Integer> status = new ArrayList<>();
|
|
|
+ status.add(1);
|
|
|
+ examNumberGoodsQueryBo.setGoodsId(goodsId);
|
|
|
+ List<ExamNumberGoodsVo> examNumberGoodsVos = examApplyMapper.listGoods(examNumberGoodsQueryBo);
|
|
|
+ }
|
|
|
ExamNumberGoodsAddBo examNumberGoodsAddBo = new ExamNumberGoodsAddBo();
|
|
|
examNumberGoodsAddBo.setGoodsId(goodsId);
|
|
|
examNumberGoodsAddBo.setExamNumberId(update.getExamNumberId());
|