|
@@ -316,7 +316,7 @@ public class ExamSimulateServiceImpl extends ServiceImpl<ExamSimulateMapper, Exa
|
|
|
|
|
|
private List<Long> getWrongQuestion(Long orderGoodsId,Long examId,Integer fromType,Integer orderType,Integer maxQnum,List<Long> knowledQuestionIds,Integer qType){
|
|
|
if(orderType==2){
|
|
|
- int num = ((int)(maxQnum*Math.random()) + 1)/2;//最多一半是错题
|
|
|
+ int num = ((int)(maxQnum*Math.random()) + 1)/2;
|
|
|
ExamSimulateQueryBo queryBo = new ExamSimulateQueryBo();
|
|
|
queryBo.setOrderGoodsId(orderGoodsId);
|
|
|
queryBo.setExamId(examId);
|
|
@@ -324,7 +324,7 @@ public class ExamSimulateServiceImpl extends ServiceImpl<ExamSimulateMapper, Exa
|
|
|
queryBo.setKnowledQuestionIds(knowledQuestionIds);
|
|
|
queryBo.setType(qType);
|
|
|
queryBo.setQnum(num);
|
|
|
- queryBo.setRandomNum(2);
|
|
|
+ queryBo.setRandomNum(orderType);
|
|
|
List<Long> questionlist = baseMapper.getWrongQuestionList(queryBo);
|
|
|
return questionlist;
|
|
|
}else {
|