@Service
public class QuestionServiceImpl implements QuestionService {
@Autowired
private QuestionMapper questionMapper;
@Override
public List<Question> getRandomQuestions() {
List<Question> randomQuestions = new ArrayList<>();
randomQuestions.addAll(questionMapper.selectRandomSingleChoiceQuestions());
randomQuestions.addAll(questionMapper.selectRandomMultipleChoiceQuestions());
randomQuestions.addAll(questionMapper.selectRandomJudgeQuestions());
return randomQuestions;
}
}