package com.ruoyi.mxjb.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mxjb.mapper.MxjbWrongBookMapper;
import com.ruoyi.mxjb.domain.MxjbWrongBook;
import com.ruoyi.mxjb.service.IMxjbWrongBookService;

/**
 * 学生错题本Service业务层处理
 * 
 * @author mingxue
 * @date 2021-06-12
 */
@Service
public class MxjbWrongBookServiceImpl implements IMxjbWrongBookService 
{
    @Autowired
    private MxjbWrongBookMapper mxjbWrongBookMapper;

    /**
     * 查询学生错题本
     * 
     * @param wrongId 学生错题本ID
     * @return 学生错题本
     */
    @Override
    public MxjbWrongBook selectMxjbWrongBookById(Long wrongId)
    {
        return mxjbWrongBookMapper.selectMxjbWrongBookById(wrongId);
    }

    /**
     * 查询学生错题本列表
     * 
     * @param mxjbWrongBook 学生错题本
     * @return 学生错题本
     */
    @Override
    public List<MxjbWrongBook> selectMxjbWrongBookList(MxjbWrongBook mxjbWrongBook)
    {
        return mxjbWrongBookMapper.selectMxjbWrongBookList(mxjbWrongBook);
    }

    /**
     * 新增学生错题本
     * 
     * @param mxjbWrongBook 学生错题本
     * @return 结果
     */
    @Override
    public int insertMxjbWrongBook(MxjbWrongBook mxjbWrongBook)
    {
        return mxjbWrongBookMapper.insertMxjbWrongBook(mxjbWrongBook);
    }

    /**
     * 修改学生错题本
     * 
     * @param mxjbWrongBook 学生错题本
     * @return 结果
     */
    @Override
    public int updateMxjbWrongBook(MxjbWrongBook mxjbWrongBook)
    {
        return mxjbWrongBookMapper.updateMxjbWrongBook(mxjbWrongBook);
    }

    /**
     * 批量删除学生错题本
     * 
     * @param wrongIds 需要删除的学生错题本ID
     * @return 结果
     */
    @Override
    public int deleteMxjbWrongBookByIds(Long[] wrongIds)
    {
        return mxjbWrongBookMapper.deleteMxjbWrongBookByIds(wrongIds);
    }

    /**
     * 删除学生错题本信息
     * 
     * @param wrongId 学生错题本ID
     * @return 结果
     */
    @Override
    public int deleteMxjbWrongBookById(Long wrongId)
    {
        return mxjbWrongBookMapper.deleteMxjbWrongBookById(wrongId);
    }
}
