package top.tqx.demo_1.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import top.tqx.demo_1.entity.Question;

import java.util.List;

public interface QuestionMapper extends BaseMapper<Question> {

    /**
     * 根据文档ID查询已有的题目题干，用于去重
     */
    @Select("SELECT exclude_stems AS stem FROM question WHERE document_id = #{documentId} AND exclude_stems IS NOT NULL AND is_deleted = 0")
    List<String> selectStemsByDocumentId(String documentId);
}
