package com.zd.exam.service.impl;

import java.util.List;

import com.zd.exam.domain.ElPaperQuAnswer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zd.exam.mapper.ElPaperQuAnswerMapper;
import com.zd.exam.service.IElPaperQuAnswerService;

/**
 * 试卷考题备选答案Service业务层处理
 *
 * @author zd
 * @date 2021-08-31
 */
@Service
public class ElPaperQuAnswerServiceImpl implements IElPaperQuAnswerService {
    @Autowired
    private ElPaperQuAnswerMapper elPaperQuAnswerMapper;

    /**
     * 查询试卷考题备选答案
     *
     * @param id 试卷考题备选答案主键
     * @return 试卷考题备选答案
     */
    @Override
    public ElPaperQuAnswer selectElPaperQuAnswerById(Long id) {
        return elPaperQuAnswerMapper.selectElPaperQuAnswerById(id);
    }

    /**
     * 查询试卷考题备选答案列表
     *
     * @param elPaperQuAnswer 试卷考题备选答案
     * @return 试卷考题备选答案
     */
    @Override
    public List<ElPaperQuAnswer> selectElPaperQuAnswerList(ElPaperQuAnswer elPaperQuAnswer) {
        return elPaperQuAnswerMapper.selectElPaperQuAnswerList(elPaperQuAnswer);
    }

    /**
     * 新增试卷考题备选答案
     *
     * @param elPaperQuAnswer 试卷考题备选答案
     * @return 结果
     */
    @Override
    public int insertElPaperQuAnswer(ElPaperQuAnswer elPaperQuAnswer) {
        return elPaperQuAnswerMapper.insertElPaperQuAnswer(elPaperQuAnswer);
    }

    /**
     * 修改试卷考题备选答案
     *
     * @param elPaperQuAnswer 试卷考题备选答案
     * @return 结果
     */
    @Override
    public int updateElPaperQuAnswer(ElPaperQuAnswer elPaperQuAnswer) {
        return elPaperQuAnswerMapper.updateElPaperQuAnswer(elPaperQuAnswer);
    }

    /**
     * 批量删除试卷考题备选答案
     *
     * @param ids 需要删除的试卷考题备选答案主键
     * @return 结果
     */
    @Override
    public int deleteElPaperQuAnswerByIds(Long[] ids) {
        return elPaperQuAnswerMapper.deleteElPaperQuAnswerByIds(ids);
    }

    /**
     * 删除试卷考题备选答案信息
     *
     * @param id 试卷考题备选答案主键
     * @return 结果
     */
    @Override
    public int deleteElPaperQuAnswerById(Long id) {
        return elPaperQuAnswerMapper.deleteElPaperQuAnswerById(id);
    }
}
