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);
|
|
}
|