package com.ruoyi.learn.mapper;

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

import com.alibaba.fastjson2.JSONObject;
import com.ruoyi.learn.domain.LearnAnswer;
import org.apache.ibatis.annotations.Param;

/**
 * 答卷答案Mapper接口
 * 
 * @author ruoyi
 * @date 2025-09-25
 */
public interface LearnAnswerMapper 
{
    List<JSONObject> selectSimulatedKnowledgeStats(@Param("examineeId") Long examineeId);

    JSONObject selectClassKnowledgeHeader(Map cond);
    List<JSONObject> selectClassKnowledgeDetail(Map cond);

    List<JSONObject> selectKnowledgeStats(Map cond);
    List<JSONObject> selectPaperKnowledgeStats(Map cond);

    List<JSONObject> selectClassQuestionStats(Map cond);
    JSONObject selectQuestionStatsHeader(Map cond);
    List<JSONObject> selectQuestionStatsDetail(Map cond);

    /**
     * 查询答卷答案
     * 
     * @param answerId 答卷答案主键
     * @return 答卷答案
     */
    public LearnAnswer selectLearnAnswerByAnswerId(Long answerId);

    /**
     * 查询答卷答案列表
     * 
     * @param learnAnswer 答卷答案
     * @return 答卷答案集合
     */
    public List<LearnAnswer> selectLearnAnswerList(LearnAnswer learnAnswer);

    /**
     * 新增答卷答案
     * 
     * @param learnAnswer 答卷答案
     * @return 结果
     */
    public int insertLearnAnswer(LearnAnswer learnAnswer);

    /**
     * 修改答卷答案
     * 
     * @param learnAnswer 答卷答案
     * @return 结果
     */
    public int updateLearnAnswer(LearnAnswer learnAnswer);

    /**
     * 删除答卷答案
     * 
     * @param answerId 答卷答案主键
     * @return 结果
     */
    public int deleteLearnAnswerByAnswerId(Long answerId);

    /**
     * 批量删除答卷答案
     * 
     * @param answerIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteLearnAnswerByAnswerIds(Long[] answerIds);
}
