package com.zd.exam.service.impl;

import com.zd.exam.domain.ElPractiseQuAnswer;
import com.zd.exam.mapper.ElPractiseQuAnswerMapper;
import com.zd.exam.service.IElPractiseQuAnswerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 试卷考题备选答案Service业务层处理
 *
 * @author liubo
 * @date 2021-12-14
 */
@Service
public class ElPractiseQuAnswerServiceImpl implements IElPractiseQuAnswerService {
    @Autowired
    private ElPractiseQuAnswerMapper elPractiseQuAnswerMapper;

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

    /**
     * 查询试卷考题备选答案列表
     *
     * @param elPractiseQuAnswer 试卷考题备选答案
     * @return 试卷考题备选答案
     */
    @Override
    public List<ElPractiseQuAnswer> selectElPractiseQuAnswerList(ElPractiseQuAnswer elPractiseQuAnswer) {
        return elPractiseQuAnswerMapper.selectElPractiseQuAnswerList(elPractiseQuAnswer);
    }

    /**
     * 新增试卷考题备选答案
     *
     * @param elPractiseQuAnswer 试卷考题备选答案
     * @return 结果
     */
    @Override
    public int insertElPractiseQuAnswer(ElPractiseQuAnswer elPractiseQuAnswer) {
        return elPractiseQuAnswerMapper.insertElPractiseQuAnswer(elPractiseQuAnswer);
    }

    /**
     * 修改试卷考题备选答案
     *
     * @param elPractiseQuAnswer 试卷考题备选答案
     * @return 结果
     */
    @Override
    public int updateElPractiseQuAnswer(ElPractiseQuAnswer elPractiseQuAnswer) {
        return elPractiseQuAnswerMapper.updateElPractiseQuAnswer(elPractiseQuAnswer);
    }

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

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