package com.fs.fastGpt.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fs.fastGpt.domain.FastGptChatReplaceText;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 易错词语Mapper接口
 *
 * @author fs
 * @date 2025-01-18
 */
public interface FastGptChatReplaceTextMapper extends BaseMapper<FastGptChatReplaceText>{
    /**
     * 查询易错词语
     *
     * @param id 易错词语主键
     * @return 易错词语
     */
    FastGptChatReplaceText selectFastGptChatReplaceTextById(Long id);

    /**
     * 查询易错词语列表
     *
     * @param fastGptChatReplaceText 易错词语
     * @return 易错词语集合
     */
    List<FastGptChatReplaceText> selectFastGptChatReplaceTextList(FastGptChatReplaceText fastGptChatReplaceText);

    /**
     * 新增易错词语
     *
     * @param fastGptChatReplaceText 易错词语
     * @return 结果
     */
    int insertFastGptChatReplaceText(FastGptChatReplaceText fastGptChatReplaceText);

    /**
     * 修改易错词语
     *
     * @param fastGptChatReplaceText 易错词语
     * @return 结果
     */
    int updateFastGptChatReplaceText(FastGptChatReplaceText fastGptChatReplaceText);

    /**
     * 删除易错词语
     *
     * @param id 易错词语主键
     * @return 结果
     */
    int deleteFastGptChatReplaceTextById(Long id);

    /**
     * 批量删除易错词语
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    int deleteFastGptChatReplaceTextByIds(Long[] ids);


    @Select("select * from fastgpt_chat_replace_words where `status`=1" )
    List<FastGptChatReplaceText> selectAllFastGptChatReplaceText();

}
