Commit 61cc7003 by 宋珺琪

修改题目入参改为paperid

parent fdfd1a8a
...@@ -47,8 +47,8 @@ public class AnswerController { ...@@ -47,8 +47,8 @@ public class AnswerController {
} }
@GetMapping("/answersPhoto/{questionid}/{tablename}/{paperid}") @GetMapping("/answersPhoto/{questionid}/{tablename}/{paperid}")
public ApiResult answersPhoto(@PathVariable("paperid") String paperid, @PathVariable("tablename") String tablename, @PathVariable("subject") String subject){ public ApiResult answersPhoto(@PathVariable("questionid") String questionid, @PathVariable("tablename") String tablename, @PathVariable("paperid") String paperid){
return ApiResultHandler.buildApiResult(200,"查询题库照片",answerService.answersPhoto(paperid,tablename,subject)); return ApiResultHandler.buildApiResult(200,"查询题库照片",answerService.answersPhoto(questionid,tablename,paperid));
} }
@PostMapping("/updateAnswersPhoto") @PostMapping("/updateAnswersPhoto")
......
...@@ -55,8 +55,8 @@ public class AnswerServiceImpl implements AnswerService { ...@@ -55,8 +55,8 @@ public class AnswerServiceImpl implements AnswerService {
} }
@Override @Override
public List<PaperPhoto> answersPhoto(String paperid, String tablename, String subject) { public List<PaperPhoto> answersPhoto(String questionid, String tablename, String paperid) {
return answerMapper.answersPhoto(paperid,getQuestionType(tablename),subject); return answerMapper.answersPhoto(questionid,getQuestionType(tablename),paperid);
} }
@Override @Override
......
...@@ -25,7 +25,7 @@ public class JudgeQuestionServiceImpl implements JudgeQuestionService { ...@@ -25,7 +25,7 @@ public class JudgeQuestionServiceImpl implements JudgeQuestionService {
public List<JudgeQuestion> findByIdAndType(Integer paperId) { public List<JudgeQuestion> findByIdAndType(Integer paperId) {
List<JudgeQuestion> list = judgeQuestionMapper.findByIdAndType(paperId); List<JudgeQuestion> list = judgeQuestionMapper.findByIdAndType(paperId);
list.stream().forEach(p->{ 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() p.setImg(listPhoto.stream()
.map(PaperPhoto::getImg) .map(PaperPhoto::getImg)
.distinct() .distinct()
......
...@@ -25,7 +25,7 @@ public class MultiQuestionServiceImpl implements MultiQuestionService { ...@@ -25,7 +25,7 @@ public class MultiQuestionServiceImpl implements MultiQuestionService {
public List<MultiQuestion> findByIdAndType(Integer PaperId) { public List<MultiQuestion> findByIdAndType(Integer PaperId) {
List<MultiQuestion> list = multiQuestionMapper.findByIdAndType(PaperId); List<MultiQuestion> list = multiQuestionMapper.findByIdAndType(PaperId);
list.stream().forEach(p->{ 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() p.setImg(listPhoto.stream()
.map(PaperPhoto::getImg) .map(PaperPhoto::getImg)
.distinct() .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