Commit 61cc7003 by 宋珺琪

修改题目入参改为paperid

parent fdfd1a8a
......@@ -47,8 +47,8 @@ public class AnswerController {
}
@GetMapping("/answersPhoto/{questionid}/{tablename}/{paperid}")
public ApiResult answersPhoto(@PathVariable("paperid") String paperid, @PathVariable("tablename") String tablename, @PathVariable("subject") String subject){
return ApiResultHandler.buildApiResult(200,"查询题库照片",answerService.answersPhoto(paperid,tablename,subject));
public ApiResult answersPhoto(@PathVariable("questionid") String questionid, @PathVariable("tablename") String tablename, @PathVariable("paperid") String paperid){
return ApiResultHandler.buildApiResult(200,"查询题库照片",answerService.answersPhoto(questionid,tablename,paperid));
}
@PostMapping("/updateAnswersPhoto")
......
......@@ -55,8 +55,8 @@ public class AnswerServiceImpl implements AnswerService {
}
@Override
public List<PaperPhoto> answersPhoto(String paperid, String tablename, String subject) {
return answerMapper.answersPhoto(paperid,getQuestionType(tablename),subject);
public List<PaperPhoto> answersPhoto(String questionid, String tablename, String paperid) {
return answerMapper.answersPhoto(questionid,getQuestionType(tablename),paperid);
}
@Override
......
......@@ -25,7 +25,7 @@ public class JudgeQuestionServiceImpl implements JudgeQuestionService {
public List<JudgeQuestion> findByIdAndType(Integer paperId) {
List<JudgeQuestion> list = judgeQuestionMapper.findByIdAndType(paperId);
list.stream().forEach(p->{
List<PaperPhoto> listPhoto = answerMapper.answersPhoto(String.valueOf(p.getQuestionId()),"3",p.getSubject());
List<PaperPhoto> listPhoto = answerMapper.answersPhoto(String.valueOf(p.getQuestionId()),"3",String.valueOf(paperId));
p.setImg(listPhoto.stream()
.map(PaperPhoto::getImg)
.distinct()
......
......@@ -25,7 +25,7 @@ public class MultiQuestionServiceImpl implements MultiQuestionService {
public List<MultiQuestion> findByIdAndType(Integer PaperId) {
List<MultiQuestion> list = multiQuestionMapper.findByIdAndType(PaperId);
list.stream().forEach(p->{
List<PaperPhoto> listPhoto = answerMapper.answersPhoto(String.valueOf(p.getQuestionId()),"1",p.getSubject());
List<PaperPhoto> listPhoto = answerMapper.answersPhoto(String.valueOf(p.getQuestionId()),"1",String.valueOf(PaperId));
p.setImg(listPhoto.stream()
.map(PaperPhoto::getImg)
.distinct()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment