package com.sundot.airport.exam.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sundot.airport.exam.domain.QuesOpt;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;


/**
 * <b>功能名：</b>QuesOptMapper<br>
 * <b>说明：</b> 题目选项表 <br>
 * <b>著作权：</b> Copyright (C) 2021 HUIFANEDU  CORPORATION<br>
 * <b>修改履历：
 *
 * @author 2021-06-18 liangxiao
 */
@Mapper
public interface QuesOptMapper extends BaseMapper<QuesOpt> {

    /**
     * 根据题目ID列表查询选项（忽略逻辑删除）
     */
    @Select("<script>" +
            "SELECT * FROM edu_cs_ques_opt WHERE qu_id IN " +
            "<foreach collection='quesIds' item='id' open='(' separator=',' close=')'>" +
            "#{id}" +
            "</foreach>" +
            " ORDER BY sort" +
            "</script>")
    List<QuesOpt> selectByQuesIds(@Param("quesIds") List<String> quesIds);

}
