package com.miaxis.question.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.miaxis.question.domain.QuestionInfo;
import com.miaxis.question.dto.QuestionInfoDto;
import com.miaxis.question.dto.QuestionInfoRandDto;
import com.miaxis.question.mapper.QuestionInfoMapper;
import com.miaxis.question.service.IQuestionInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 题库Service业务层处理
 *
 * @author miaxis
 * @date 2021-03-12
 */
@Service
public class QuestionInfoServiceImpl extends ServiceImpl<QuestionInfoMapper, QuestionInfo> implements IQuestionInfoService {
    @Autowired
    private QuestionInfoMapper questionInfoMapper;

//    /**
//     * 查询题库列表
//     *
//     * @param questionInfo 题库
//     * @return 题库
//     */
//    @Override
//    public List<QuestionInfo> selectQuestionInfoList(QuestionInfo questionInfo){
//        return questionInfoMapper.selectQuestionInfoList(questionInfo);
//    }

    @Override
    public List<QuestionInfo> getQuestionInfoList(QuestionInfoDto questionInfoDto) {
        return questionInfoMapper.getQuestionInfoList(questionInfoDto);
    }

    @Override
    public List<QuestionInfo> getRandQuestionInfoList(QuestionInfoRandDto questionInfoRandDto) {
        return questionInfoMapper.getRandQuestionInfoList(questionInfoRandDto);
    }
}
