package com.xinelu.manage.mapper.questionsubjectoption;

import com.xinelu.manage.domain.questionsubjectoption.QuestionSubjectOption;
import com.xinelu.manage.vo.questionsubjectoption.QuestionSubjectOptionVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
 * 问卷题目选项答案Mapper接口
 *
 * @author xinelu
 * @date 2024-02-29
 */
public interface QuestionSubjectOptionMapper {
    /**
     * 查询问卷题目选项答案
     *
     * @param id 问卷题目选项答案主键
     * @return 问卷题目选项答案
     */
    QuestionSubjectOption selectQuestionSubjectOptionById(Long id);

    /**
     * 查询问卷题目选项答案列表
     *
     * @param questionSubjectOption 问卷题目选项答案
     * @return 问卷题目选项答案集合
     */
    List<QuestionSubjectOption> selectQuestionSubjectOptionList(QuestionSubjectOption questionSubjectOption);

    /**
     * 新增问卷题目选项答案
     *
     * @param questionSubjectOption 问卷题目选项答案
     * @return 结果
     */
    int insertQuestionSubjectOption(QuestionSubjectOption questionSubjectOption);

    /**
     * 修改问卷题目选项答案
     *
     * @param questionSubjectOption 问卷题目选项答案
     * @return 结果
     */
    int updateQuestionSubjectOption(QuestionSubjectOption questionSubjectOption);

    /**
     * 删除问卷题目选项答案
     *
     * @param id 问卷题目选项答案主键
     * @return 结果
     */
    int deleteQuestionSubjectOptionById(Long id);

    /**
     * 批量删除问卷题目选项答案
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    int deleteQuestionSubjectOptionByIds(Long[] ids);

    /**
     * 批量新增问卷题目信息表
     *
     * @param saveQuestionSubjectOptions 问卷题目信息
     * @return 数量
     */
    int insertQuestionSubjectOptionList(List<QuestionSubjectOption> saveQuestionSubjectOptions);

    /**
     * 根据题目表id查询选项表信息
     *
     * @param questionSubjectIds 题目表id
     * @return QuestionSubjectOptionVO
     */
    List<QuestionSubjectOptionVO> selectQuestionSubjectOptions(@Param("questionSubjectIds") List<Long> questionSubjectIds);

    /**
     * 根据题目表id删除选项表信息
     *
     * @param questionSubjectIds 题目表id
     * @return int
     */
    int deleteOptionByQuestionSubjectIds(@Param("questionSubjectIds") List<Long> questionSubjectIds);
}
