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.TElUserBookMapper;
import com.ruoyi.project.training.elearn.domain.TElUserBook;
import com.ruoyi.project.training.elearn.service.ITElUserBookService;

/**
 * 错题本Service业务层处理
 *
 * @author ssy
 * @date 2024-05-31
 */
@Service
public class TElUserBookServiceImpl implements ITElUserBookService
{
    @Autowired
    private TElUserBookMapper tElUserBookMapper;

    /**
     * 查询错题本
     *
     * @param id 错题本ID
     * @return 错题本
     */
    @Override
    public TElUserBook selectTElUserBookById(Long id)
    {
        return tElUserBookMapper.selectTElUserBookById(id);
    }

    /**
     * 查询错题本列表
     *
     * @param tElUserBook 错题本
     * @return 错题本
     */
    @Override
    public List<TElUserBook> selectTElUserBookList(TElUserBook tElUserBook)
    {
        return tElUserBookMapper.selectTElUserBookList(tElUserBook);
    }

    /**
     * 新增错题本
     *
     * @param tElUserBook 错题本
     * @return 结果
     */
    @Override
    public int insertTElUserBook(TElUserBook tElUserBook)
    {
        return tElUserBookMapper.insertTElUserBook(tElUserBook);
    }

    /**
     * 修改错题本
     *
     * @param tElUserBook 错题本
     * @return 结果
     */
    @Override
    public int updateTElUserBook(TElUserBook tElUserBook)
    {
        return tElUserBookMapper.updateTElUserBook(tElUserBook);
    }

    /**
     * 批量删除错题本
     *
     * @param ids 需要删除的错题本ID
     * @return 结果
     */
    @Override
    public int deleteTElUserBookByIds(Long[] ids)
    {
        return tElUserBookMapper.deleteTElUserBookByIds(ids);
    }

    /**
     * 删除错题本信息
     *
     * @param id 错题本ID
     * @return 结果
     */
    @Override
    public int deleteTElUserBookById(Long id)
    {
        return tElUserBookMapper.deleteTElUserBookById(id);
    }
}
