package com.zd.exam.service.impl;

import com.zd.exam.domain.ElExamQuAnswer;
import com.zd.exam.mapper.ElExamQuAnswerMapper;
import com.zd.exam.service.IElExamQuAnswerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 考试考题题备选答案Service业务层处理
 *
 * @author liubo
 * @date 2021-12-13
 */
@Service
public class ElExamQuAnswerServiceImpl implements IElExamQuAnswerService {
    @Autowired
    private ElExamQuAnswerMapper elExamQuAnswerMapper;

    /**
     * 查询考试考题题备选答案
     *
     * @param id 考试考题题备选答案主键
     * @return 考试考题题备选答案
     */
    @Override
    public ElExamQuAnswer selectElExamQuAnswerById(Long id) {
        return elExamQuAnswerMapper.selectElExamQuAnswerById(id);
    }

    /**
     * 查询考试考题题备选答案列表
     *
     * @param elExamQuAnswer 考试考题题备选答案
     * @return 考试考题题备选答案
     */
    @Override
    public List<ElExamQuAnswer> selectElExamQuAnswerList(ElExamQuAnswer elExamQuAnswer) {
        return elExamQuAnswerMapper.selectElExamQuAnswerList(elExamQuAnswer);
    }

    /**
     * 新增考试考题题备选答案
     *
     * @param elExamQuAnswer 考试考题题备选答案
     * @return 结果
     */
    @Override
    public int insertElExamQuAnswer(ElExamQuAnswer elExamQuAnswer) {
        return elExamQuAnswerMapper.insertElExamQuAnswer(elExamQuAnswer);
    }

    /**
     * 修改考试考题题备选答案
     *
     * @param elExamQuAnswer 考试考题题备选答案
     * @return 结果
     */
    @Override
    public int updateElExamQuAnswer(ElExamQuAnswer elExamQuAnswer) {
        return elExamQuAnswerMapper.updateElExamQuAnswer(elExamQuAnswer);
    }

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

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