|
@@ -21,10 +21,7 @@ import com.zhongzheng.common.utils.ServletUtils;
|
|
|
import com.zhongzheng.common.utils.ToolsUtils;
|
|
|
import com.zhongzheng.common.utils.http.HttpUtils;
|
|
|
import com.zhongzheng.modules.bank.bo.*;
|
|
|
-import com.zhongzheng.modules.bank.domain.Exam;
|
|
|
-import com.zhongzheng.modules.bank.domain.ExamQuestion;
|
|
|
-import com.zhongzheng.modules.bank.domain.QuestionBusiness;
|
|
|
-import com.zhongzheng.modules.bank.domain.QuestionChapterExam;
|
|
|
+import com.zhongzheng.modules.bank.domain.*;
|
|
|
import com.zhongzheng.modules.bank.mapper.ExamMapper;
|
|
|
import com.zhongzheng.modules.bank.service.*;
|
|
|
import com.zhongzheng.modules.bank.vo.ExamVo;
|
|
@@ -353,7 +350,7 @@ public class ExamServiceImpl extends ServiceImpl<ExamMapper, Exam> implements IE
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public boolean getShanDongExam(Long userId,String majorname) {
|
|
|
+ public boolean getShanDongExam(Long userId,String majorname,Long relExamId) {
|
|
|
Boolean getNew = false;
|
|
|
User user = iUserService.getOne(new LambdaQueryWrapper<User>()
|
|
|
.eq(User::getUserId, userId).last("limit 1"));
|
|
@@ -380,8 +377,9 @@ public class ExamServiceImpl extends ServiceImpl<ExamMapper, Exam> implements IE
|
|
|
QuestionOtherAddBo addBo = new QuestionOtherAddBo();
|
|
|
addBo.setJsonStr(respone);
|
|
|
addBo.setFromPlat(1);
|
|
|
- addBo.setUserId(1L);
|
|
|
+ addBo.setUserId(userId);
|
|
|
addBo.setMajorname(majorname);
|
|
|
+ addBo.setRelExamId(relExamId);
|
|
|
Long id = iQuestionOtherService.insertByAddBo(addBo);
|
|
|
iQuestionOtherService.queryById(id);
|
|
|
// System.out.println(respone);
|
|
@@ -389,7 +387,16 @@ public class ExamServiceImpl extends ServiceImpl<ExamMapper, Exam> implements IE
|
|
|
throw new CustomException("同步请求错误" + e.getMessage());
|
|
|
}
|
|
|
}else{
|
|
|
-
|
|
|
+ QuestionOther add = iQuestionOtherService.getOne(new LambdaQueryWrapper<QuestionOther>()
|
|
|
+ .eq(QuestionOther::getId, 3L).last("limit 1"));
|
|
|
+ if(Validator.isEmpty(add)){
|
|
|
+ throw new CustomException("模拟数据不存在");
|
|
|
+ }
|
|
|
+ add.setUserId(userId);
|
|
|
+ add.setMajorname(majorname);
|
|
|
+ add.setRelExamId(relExamId);
|
|
|
+ add.setId(null);
|
|
|
+ iQuestionOtherService.save(add);
|
|
|
}
|
|
|
|
|
|
return false;
|