package com.ruoyi.project.training.elearn.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.training.elearn.mapper.TElQuAnswerMapper;
import com.ruoyi.project.training.elearn.domain.TElQuAnswer;
import com.ruoyi.project.training.elearn.service.ITElQuAnswerService;

/**
 * 试题选项答案Service业务层处理
 *
 * @author ssy
 * @date 2024-05-28
 */
@Service
public class TElQuAnswerServiceImpl implements ITElQuAnswerService
{
    @Autowired
    private TElQuAnswerMapper tElQuAnswerMapper;

    /**
     * 查询试题选项答案
     *
     * @param answerId 试题选项答案ID
     * @return 试题选项答案
     */
    @Override
    public TElQuAnswer selectTElQuAnswerById(Long answerId)
    {
        return tElQuAnswerMapper.selectTElQuAnswerById(answerId);
    }

    /**
     * 查询试题选项答案列表
     *
     * @param tElQuAnswer 试题选项答案
     * @return 试题选项答案
     */
    @Override
    public List<TElQuAnswer> selectTElQuAnswerList(TElQuAnswer tElQuAnswer)
    {
        return tElQuAnswerMapper.selectTElQuAnswerList(tElQuAnswer);
    }

    /**
     * 新增试题选项答案
     *
     * @param tElQuAnswer 试题选项答案
     * @return 结果
     */
    @Override
    public int insertTElQuAnswer(TElQuAnswer tElQuAnswer)
    {
        return tElQuAnswerMapper.insertTElQuAnswer(tElQuAnswer);
    }

    /**
     * 修改试题选项答案
     *
     * @param tElQuAnswer 试题选项答案
     * @return 结果
     */
    @Override
    public int updateTElQuAnswer(TElQuAnswer tElQuAnswer)
    {
        return tElQuAnswerMapper.updateTElQuAnswer(tElQuAnswer);
    }

    /**
     * 批量删除试题选项答案
     *
     * @param answerIds 需要删除的试题选项答案ID
     * @return 结果
     */
    @Override
    public int deleteTElQuAnswerByIds(Long[] answerIds)
    {
        return tElQuAnswerMapper.deleteTElQuAnswerByIds(answerIds);
    }

    /**
     * 删除试题选项答案信息
     *
     * @param answerId 试题选项答案ID
     * @return 结果
     */
    @Override
    public int deleteTElQuAnswerById(Long answerId)
    {
        return tElQuAnswerMapper.deleteTElQuAnswerById(answerId);
    }
}
