package com.ruoyi.learn.mapper;

import java.util.List;
import java.util.Map;

import com.ruoyi.dz.domain.DzSubject;
import com.ruoyi.learn.domain.LearnWrongBook;

/**
 * 学生错题本Mapper接口
 *
 * @author ruoyi
 * @date 2025-09-25
 */
public interface LearnWrongBookMapper
{
    /**
     * 查询学生错题本
     *
     * @param wrongId 学生错题本主键
     * @return 学生错题本
     */
    public LearnWrongBook selectLearnWrongBookByWrongId(Long wrongId);

    /**
     * 查询学生错题本列表
     *
     * @param learnWrongBook 学生错题本
     * @return 学生错题本集合
     */
    public List<LearnWrongBook> selectLearnWrongBookList(LearnWrongBook learnWrongBook);

    /**
     * 新增学生错题本
     *
     * @param learnWrongBook 学生错题本
     * @return 结果
     */
    public int insertLearnWrongBook(LearnWrongBook learnWrongBook);

    /**
     * 修改学生错题本
     *
     * @param learnWrongBook 学生错题本
     * @return 结果
     */
    public int updateLearnWrongBook(LearnWrongBook learnWrongBook);

    /**
     * 删除学生错题本
     *
     * @param wrongId 学生错题本主键
     * @return 结果
     */
    public int deleteLearnWrongBookByWrongId(Long wrongId);

    /**
     * 批量删除学生错题本
     *
     * @param wrongIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteLearnWrongBookByWrongIds(Long[] wrongIds);

    public int deleteByQuestion(LearnWrongBook wrongBook);

    public List<LearnWrongBook> findWrongQuestions(Map cond);

    public List<LearnWrongBook> findWrongExaminees(Long wrongId);

    public int deleteByQuestion(Long studentId, Long questionId);
}
