package com.fs.fastGpt.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fs.common.utils.DateUtils;
import org.springframework.stereotype.Service;
import com.fs.fastGpt.mapper.FastGptChatReplaceWordsMapper;
import com.fs.fastGpt.domain.FastGptChatReplaceWords;
import com.fs.fastGpt.service.IFastGptChatReplaceWordsService;

/**
 * 违规词语Service业务层处理
 *
 * @author fs
 * @date 2025-01-18
 */
@Service
public class FastGptChatReplaceWordsServiceImpl extends ServiceImpl<FastGptChatReplaceWordsMapper, FastGptChatReplaceWords> implements IFastGptChatReplaceWordsService {

    /**
     * 查询违规词语
     *
     * @param id 违规词语主键
     * @return 违规词语
     */
    @Override
    public FastGptChatReplaceWords selectFastGptChatReplaceWordsById(Long id)
    {
        return baseMapper.selectFastGptChatReplaceWordsById(id);
    }

    /**
     * 查询违规词语列表
     *
     * @param fastGptChatReplaceWords 违规词语
     * @return 违规词语
     */
    @Override
    public List<FastGptChatReplaceWords> selectFastGptChatReplaceWordsList(FastGptChatReplaceWords fastGptChatReplaceWords)
    {
        return baseMapper.selectFastGptChatReplaceWordsList(fastGptChatReplaceWords);
    }

    /**
     * 新增违规词语
     *
     * @param fastGptChatReplaceWords 违规词语
     * @return 结果
     */
    @Override
    public int insertFastGptChatReplaceWords(FastGptChatReplaceWords fastGptChatReplaceWords)
    {
        fastGptChatReplaceWords.setCreateTime(DateUtils.getNowDate());
        return baseMapper.insertFastGptChatReplaceWords(fastGptChatReplaceWords);
    }

    /**
     * 修改违规词语
     *
     * @param fastGptChatReplaceWords 违规词语
     * @return 结果
     */
    @Override
    public int updateFastGptChatReplaceWords(FastGptChatReplaceWords fastGptChatReplaceWords)
    {
        return baseMapper.updateFastGptChatReplaceWords(fastGptChatReplaceWords);
    }

    /**
     * 批量删除违规词语
     *
     * @param ids 需要删除的违规词语主键
     * @return 结果
     */
    @Override
    public int deleteFastGptChatReplaceWordsByIds(Long[] ids)
    {
        return baseMapper.deleteFastGptChatReplaceWordsByIds(ids);
    }

    /**
     * 删除违规词语信息
     *
     * @param id 违规词语主键
     * @return 结果
     */
    @Override
    public int deleteFastGptChatReplaceWordsById(Long id)
    {
        return baseMapper.deleteFastGptChatReplaceWordsById(id);
    }
}
