package com.ruoyi.learn.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.learn.mapper.LearnWrongDetailMapper;
import com.ruoyi.learn.domain.LearnWrongDetail;
import com.ruoyi.learn.service.ILearnWrongDetailService;

/**
 * 学生错题流水Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-25
 */
@Service
public class LearnWrongDetailServiceImpl implements ILearnWrongDetailService 
{
    @Autowired
    private LearnWrongDetailMapper learnWrongDetailMapper;

    /**
     * 查询学生错题流水
     * 
     * @param wrongDetailId 学生错题流水主键
     * @return 学生错题流水
     */
    @Override
    public LearnWrongDetail selectLearnWrongDetailByWrongDetailId(Long wrongDetailId)
    {
        return learnWrongDetailMapper.selectLearnWrongDetailByWrongDetailId(wrongDetailId);
    }

    /**
     * 查询学生错题流水列表
     * 
     * @param learnWrongDetail 学生错题流水
     * @return 学生错题流水
     */
    @Override
    public List<LearnWrongDetail> selectLearnWrongDetailList(LearnWrongDetail learnWrongDetail)
    {
        return learnWrongDetailMapper.selectLearnWrongDetailList(learnWrongDetail);
    }

    /**
     * 新增学生错题流水
     * 
     * @param learnWrongDetail 学生错题流水
     * @return 结果
     */
    @Override
    public int insertLearnWrongDetail(LearnWrongDetail learnWrongDetail)
    {
        return learnWrongDetailMapper.insertLearnWrongDetail(learnWrongDetail);
    }

    /**
     * 修改学生错题流水
     * 
     * @param learnWrongDetail 学生错题流水
     * @return 结果
     */
    @Override
    public int updateLearnWrongDetail(LearnWrongDetail learnWrongDetail)
    {
        return learnWrongDetailMapper.updateLearnWrongDetail(learnWrongDetail);
    }

    /**
     * 批量删除学生错题流水
     * 
     * @param wrongDetailIds 需要删除的学生错题流水主键
     * @return 结果
     */
    @Override
    public int deleteLearnWrongDetailByWrongDetailIds(Long[] wrongDetailIds)
    {
        return learnWrongDetailMapper.deleteLearnWrongDetailByWrongDetailIds(wrongDetailIds);
    }

    /**
     * 删除学生错题流水信息
     * 
     * @param wrongDetailId 学生错题流水主键
     * @return 结果
     */
    @Override
    public int deleteLearnWrongDetailByWrongDetailId(Long wrongDetailId)
    {
        return learnWrongDetailMapper.deleteLearnWrongDetailByWrongDetailId(wrongDetailId);
    }
}
