xiangpei
2024-09-23 d4daa1ea31db6fd421c0e86bab178a9f3b512141
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
package com.mindskip.xzs.service;
 
import com.github.pagehelper.PageInfo;
import com.mindskip.xzs.base.RestResponse;
import com.mindskip.xzs.domain.Question;
import com.mindskip.xzs.viewmodel.admin.question.ExamQuestionVO;
import com.mindskip.xzs.viewmodel.admin.question.QuestionEditRequestVM;
import com.mindskip.xzs.viewmodel.admin.question.QuestionPageRequestVM;
import com.mindskip.xzs.viewmodel.student.question.answer.QuestionAnswerVO;
import com.mindskip.xzs.viewmodel.student.question.answer.QuestionPageStudentRequestVM;
import com.mindskip.xzs.viewmodel.student.question.answer.QuestionPageStudentResponseVM;
import com.mindskip.xzs.vo.QuestionExportData;
import com.mindskip.xzs.vo.QuestionExportVO;
import com.mindskip.xzs.vo.QuestionImportVO;
import com.mindskip.xzs.vo.QuestionSubjectVO;
import org.apache.ibatis.annotations.Param;
 
import java.util.List;
 
public interface QuestionService extends BaseService<Question> {
 
    PageInfo<Question> page(QuestionPageRequestVM requestVM);
 
    Question insertFullQuestion(QuestionEditRequestVM model, Integer userId);
 
    Question updateFullQuestion(QuestionEditRequestVM model);
 
    ExamQuestionVO getQuestionEditRequestVM(Integer questionId);
 
    ExamQuestionVO getQuestionEditRequestVM(Question question);
 
    Integer selectAllCount();
 
    List<Integer> selectMothCount();
 
    Integer remove(Integer id);
 
    List<Question> getAll();
 
    List<Question> selectByIds(@Param("ids") List<Integer> ids);
 
    /**
     * 题目导出数据
     * @param query
     * @return
     */
    List<QuestionImportVO> export(QuestionExportVO query);
 
    /**
     * 题目导出数据
     *
     * @param query
     * @return
     */
    List<QuestionImportVO> exportData(QuestionExportVO query);
 
    PageInfo<QuestionPageStudentResponseVM> selectQuestion(QuestionPageStudentRequestVM model);
 
    /** 查出题目主体内容 */
    RestResponse selectContentById(Integer id);
 
    /** 获取题目答案、解析 */
    RestResponse getAnswer(Integer id);
 
    /**
     * 查找是否已经存在题干相同的题
     *
     * @param title
     * @return
     */
    Integer countQuestionByTitle(String title);
 
    /**
     * 根据题干和课目查找是否存在该题
     *
     * @param title
     * @param subjectId
     * @return
     */
    List<QuestionSubjectVO> countQuestionByTitleAndSubject(String title, Integer subjectId);
}