package com.huijy.management.mapper;

import java.util.List;
import java.util.Set;

import com.huijy.management.domain.TSensitiveWords;
import org.apache.ibatis.annotations.Select;

/**
 * 敏感词Mapper接口
 *
 * @author huijy
 * @date 2021-08-30
 */
public interface TSensitiveWordsMapper
{
    /**
     * 查询敏感词
     *
     * @param sensitiveWordsId 敏感词主键
     * @return 敏感词
     */
    public TSensitiveWords selectTSensitiveWordsBySensitiveWordsId(Long sensitiveWordsId);

    /**
     * 查询敏感词列表
     *
     * @param tSensitiveWords 敏感词
     * @return 敏感词集合
     */
    public List<TSensitiveWords> selectTSensitiveWordsList(TSensitiveWords tSensitiveWords);

    /**
     * 新增敏感词
     *
     * @param tSensitiveWords 敏感词
     * @return 结果
     */
    public int insertTSensitiveWords(TSensitiveWords tSensitiveWords);

    /**
     * 修改敏感词
     *
     * @param tSensitiveWords 敏感词
     * @return 结果
     */
    public int updateTSensitiveWords(TSensitiveWords tSensitiveWords);

    /**
     * 删除敏感词
     *
     * @param sensitiveWordsId 敏感词主键
     * @return 结果
     */
    public int deleteTSensitiveWordsBySensitiveWordsId(Long sensitiveWordsId);

    /**
     * 批量删除敏感词
     *
     * @param sensitiveWordsIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteTSensitiveWordsBySensitiveWordsIds(Long[] sensitiveWordsIds);

    @Select("select keyword from t_sensitive_words where use_state = '1' ")
    Set<String> getSensitiveWordsSet();
}
