baizonghao
2023-07-31 98b2f41e13c48219e054cf8b80c459298a01c910
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
82
83
84
85
86
87
88
89
90
package com.mindskip.xzs.service;
 
import com.mindskip.xzs.domain.Question;
import com.mindskip.xzs.domain.other.QuestionRandom;
import com.mindskip.xzs.viewmodel.admin.question.QuestionEditRequestVM;
import com.mindskip.xzs.viewmodel.admin.question.QuestionPageRequestVM;
import com.github.pagehelper.PageInfo;
 
import java.util.List;
 
/**
 * @version 2.2.0
 * @description: 题目
 * Copyright (C), 2020-2021, 武汉思维跳跃科技有限公司
 * @date 2021 /9/7 9:45
 */
public interface QuestionService extends BaseService<Question> {
 
    /**
     * 题目分页
     *
     * @param requestVM the request vm
     * @return the page info
     */
    PageInfo<Question> page(QuestionPageRequestVM requestVM);
 
    /**
     * 插入题目
     *
     * @param model  the model
     * @param userId the user id
     * @return the question
     */
    Question insertFullQuestion(QuestionEditRequestVM model, Integer userId);
 
    /**
     * 更新题目
     *
     * @param model the model
     * @return the question
     */
    Question updateFullQuestion(QuestionEditRequestVM model);
 
    /**
     * 获取题目信息
     *
     * @param questionId the question id
     * @return the question edit request vm
     */
    QuestionEditRequestVM getQuestionEditRequestVM(Integer questionId);
 
    /**
     * 获取题目信息
     *
     * @param question the question
     * @return the question edit request vm
     */
    QuestionEditRequestVM getQuestionEditRequestVM(Question question);
 
    /**
     * 获取所有题目数量
     *
     * @return the integer
     */
    Integer selectAllCount();
 
    /**
     * 获取月题目数量
     *
     * @return the list
     */
    List<Integer> selectMothCount();
 
    /**
     * 获取用户创建的题目
     *
     * @param userId the user id
     * @return the integer
     */
    Integer selectAllCountByCreate(Integer userId);
 
    /**
     * 随机抽取题目
     *
     * @param questionRandom the question random
     * @return the list
     */
    List<Integer> randomQuestion(QuestionRandom questionRandom);
 
}