package com.zd.exam.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zd.exam.mapper.ElCourseChapterQuAnswerMapper;
import com.zd.exam.domain.ElCourseChapterQuAnswer;
import com.zd.exam.service.IElCourseChapterQuAnswerService;

/**
 * 考试考题题备选答案Service业务层处理
 *
 * @author liubo
 * @date 2022-01-05
 */
@Service
public class ElCourseChapterQuAnswerServiceImpl implements IElCourseChapterQuAnswerService {
    @Autowired
    private ElCourseChapterQuAnswerMapper elCourseChapterQuAnswerMapper;

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

    /**
     * 查询考试考题题备选答案列表
     *
     * @param elCourseChapterQuAnswer 考试考题题备选答案
     * @return 考试考题题备选答案
     */
    @Override
    public List<ElCourseChapterQuAnswer> selectElCourseChapterQuAnswerList(ElCourseChapterQuAnswer elCourseChapterQuAnswer) {
        return elCourseChapterQuAnswerMapper.selectElCourseChapterQuAnswerList(elCourseChapterQuAnswer);
    }

    /**
     * 新增考试考题题备选答案
     *
     * @param elCourseChapterQuAnswer 考试考题题备选答案
     * @return 结果
     */
    @Override
    public int insertElCourseChapterQuAnswer(ElCourseChapterQuAnswer elCourseChapterQuAnswer) {
        return elCourseChapterQuAnswerMapper.insertElCourseChapterQuAnswer(elCourseChapterQuAnswer);
    }

    /**
     * 修改考试考题题备选答案
     *
     * @param elCourseChapterQuAnswer 考试考题题备选答案
     * @return 结果
     */
    @Override
    public int updateElCourseChapterQuAnswer(ElCourseChapterQuAnswer elCourseChapterQuAnswer) {
        return elCourseChapterQuAnswerMapper.updateElCourseChapterQuAnswer(elCourseChapterQuAnswer);
    }

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

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