package com.cm.plugin.dao;

import com.cm.common.exception.RemoveException;
import com.cm.common.exception.SaveException;
import com.cm.common.exception.SearchException;
import com.cm.common.exception.UpdateException;
import com.cm.plugin.pojo.dtos.SensitiveWordsDTO;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @ClassName: ISensitiveWordsDao
 * @Description: 敏感词
 * @Author: WenG
 * @Date: 2020-03-13 23:16
 * @Version: 1.0
 **/
@Repository
public interface ISensitiveWordsDao {

    /**
     * 新增敏感词
     *
     * @param params
     * @throws SaveException
     */
    void saveSensitiveWords(Map<String, Object> params) throws SaveException;

    /**
     * 删除敏感词
     *
     * @param params
     * @throws RemoveException
     */
    void removeSensitiveWords(Map<String, Object> params) throws RemoveException;

    /**
     * 修改敏感词
     *
     * @param params
     * @throws UpdateException
     */
    void updateSensitiveWords(Map<String, Object> params) throws UpdateException;

    /**
     * 敏感词详情
     *
     * @param params
     * @return
     * @throws SearchException
     */
    SensitiveWordsDTO getSensitiveWords(Map<String, Object> params) throws SearchException;

    /**
     * 敏感词列表
     *
     * @param params
     * @return
     * @throws SearchException
     */
    List<SensitiveWordsDTO> listSensitiveWords(Map<String, Object> params) throws SearchException;

    /**
     * 敏感词列表
     *
     * @return
     * @throws SearchException
     */
    List<String> listSensitiveWordsForString() throws SearchException;
}
