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

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.training.spec.mapper.TStQuestionBankMapper;
import com.ruoyi.project.training.spec.domain.TStQuestionBank;
import com.ruoyi.project.training.spec.service.ITStQuestionBankService;

/**
 * 专项培训题库Service业务层处理
 *
 * @author ruoyi
 * @date 2022-04-28
 */
@Service
public class TStQuestionBankServiceImpl implements ITStQuestionBankService
{
    @Autowired
    private TStQuestionBankMapper tStQuestionBankMapper;

    /**
     * 查询专项培训题库
     *
     * @param id 专项培训题库ID
     * @return 专项培训题库
     */
    @Override
    public TStQuestionBank selectTStQuestionBankById(Long id)
    {
        return tStQuestionBankMapper.selectTStQuestionBankById(id);
    }

    /**
     * 查询专项培训题库列表
     *
     * @param tStQuestionBank 专项培训题库
     * @return 专项培训题库
     */
    @Override
    public List<TStQuestionBank> selectTStQuestionBankList(TStQuestionBank tStQuestionBank)
    {
        return tStQuestionBankMapper.selectTStQuestionBankList(tStQuestionBank);
    }

    /**
     * 新增专项培训题库
     *
     * @param tStQuestionBank 专项培训题库
     * @return 结果
     */
    @Override
    public int insertTStQuestionBank(TStQuestionBank tStQuestionBank)
    {
        return tStQuestionBankMapper.insertTStQuestionBank(tStQuestionBank);
    }

    /**
     * 修改专项培训题库
     *
     * @param tStQuestionBank 专项培训题库
     * @return 结果
     */
    @Override
    public int updateTStQuestionBank(TStQuestionBank tStQuestionBank)
    {
        return tStQuestionBankMapper.updateTStQuestionBank(tStQuestionBank);
    }

    /**
     * 批量删除专项培训题库
     *
     * @param ids 需要删除的专项培训题库ID
     * @return 结果
     */
    @Override
    public int deleteTStQuestionBankByIds(Long[] ids)
    {
        return tStQuestionBankMapper.deleteTStQuestionBankByIds(ids);
    }

    /**
     * 删除专项培训题库信息
     *
     * @param id 专项培训题库ID
     * @return 结果
     */
    @Override
    public int deleteTStQuestionBankById(Long id)
    {
        return tStQuestionBankMapper.deleteTStQuestionBankById(id);
    }
}
