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.TElRepoMapper;
import com.ruoyi.project.training.elearn.domain.TElRepo;
import com.ruoyi.project.training.elearn.service.ITElRepoService;

/**
 * 题库Service业务层处理
 *
 * @author ssy
 * @date 2024-05-27
 */
@Service
public class TElRepoServiceImpl implements ITElRepoService
{
    @Autowired
    private TElRepoMapper tElRepoMapper;

    /**
     * 查询题库
     *
     * @param repoId 题库ID
     * @return 题库
     */
    @Override
    public TElRepo selectTElRepoById(Long repoId)
    {
        return tElRepoMapper.selectTElRepoById(repoId);
    }

    /**
     * 查询题库列表
     *
     * @param tElRepo 题库
     * @return 题库
     */
    @Override
    public List<TElRepo> selectTElRepoList(TElRepo tElRepo)
    {
        return tElRepoMapper.selectTElRepoList(tElRepo);
    }

    /**
     * 新增题库
     *
     * @param tElRepo 题库
     * @return 结果
     */
    @Override
    public int insertTElRepo(TElRepo tElRepo)
    {
        return tElRepoMapper.insertTElRepo(tElRepo);
    }

    /**
     * 修改题库
     *
     * @param tElRepo 题库
     * @return 结果
     */
    @Override
    public int updateTElRepo(TElRepo tElRepo)
    {
        return tElRepoMapper.updateTElRepo(tElRepo);
    }

    /**
     * 批量删除题库
     *
     * @param repoIds 需要删除的题库ID
     * @return 结果
     */
    @Override
    public int deleteTElRepoByIds(Long[] repoIds)
    {
        return tElRepoMapper.deleteTElRepoByIds(repoIds);
    }

    /**
     * 删除题库信息
     *
     * @param repoId 题库ID
     * @return 结果
     */
    @Override
    public int deleteTElRepoById(Long repoId)
    {
        return tElRepoMapper.deleteTElRepoById(repoId);
    }
}
