QuestionService.java 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. package nju.seec.helper.service;
  2. import nju.seec.helper.dto.user.LoginUser;
  3. import nju.seec.helper.entity.Quiz;
  4. import nju.seec.helper.vo.question.BaseQuestionVO;
  5. import org.springframework.data.domain.Page;
  6. import org.springframework.data.domain.Pageable;
  7. import java.util.List;
  8. /**
  9. * @author xst
  10. * <p>
  11. * updated by cst
  12. */
  13. public interface QuestionService {
  14. /**
  15. * 取得题目列表
  16. *
  17. * @param user
  18. * @param stem
  19. * @param pageable
  20. * @return
  21. */
  22. Page<BaseQuestionVO> getQuestions(LoginUser user, String stem, Pageable pageable);
  23. /**
  24. * 根据测试获取题目
  25. *
  26. * @param user
  27. * @param quizId
  28. * @return
  29. */
  30. List<BaseQuestionVO> getQuestionsByQuiz(LoginUser user, Long quizId);
  31. /**
  32. * 根据测试获取题目(无需权限检验)
  33. *
  34. * @param quiz
  35. * @return
  36. */
  37. List<BaseQuestionVO> getQuestionsByQuiz(Quiz quiz);
  38. /**
  39. * 获取某一题目
  40. *
  41. * @param user
  42. * @param questionId
  43. * @return
  44. */
  45. BaseQuestionVO getOneQuestion(LoginUser user, String questionId);
  46. }