package ink.wgink.module.oauth.client.dao;

import ink.wgink.exceptions.RemoveException;
import ink.wgink.exceptions.SaveException;
import ink.wgink.exceptions.SearchException;
import ink.wgink.exceptions.UpdateException;
import ink.wgink.pojo.dtos.oauth.client.OauthClientDTO;
import ink.wgink.pojo.dtos.oauth.client.OauthClientSimpleDTO;
import org.springframework.stereotype.Repository;

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

/**
 * @ClassName: IOauthClientDao
 * @Description: Oauth客户端
 * @Author: WangGeng
 * @Date: 2019/3/12 11:42 AM
 * @Version: 1.0
 **/
@Repository
public interface IOauthClientDao {

    /**
     * Oauth客户端新增
     *
     * @param params
     * @throws SaveException
     */
    void save(Map<String, Object> params) throws SaveException;

    /**
     * Oauth客户端删除
     *
     * @param params
     * @throws RemoveException
     */
    void remove(Map<String, Object> params) throws RemoveException;

    /**
     * Oauth客户端修改
     *
     * @param params
     * @throws UpdateException
     */
    void update(Map<String, Object> params) throws UpdateException;

    /**
     * OauthClient列表
     *
     * @param params
     * @return
     * @throws SearchException
     */
    List<OauthClientDTO> list(Map<String, Object> params) throws SearchException;

    /**
     * Oauth客户端列表（简单）
     *
     * @param params
     * @return
     * @throws SearchException
     */
    List<OauthClientSimpleDTO> listSimple(Map<String, Object> params) throws SearchException;

    /**
     * OauthClient详情
     *
     * @param params
     * @return
     * @throws SearchException
     */
    OauthClientDTO get(Map<String, Object> params) throws SearchException;

    /**
     * Oauth客户端统计
     *
     * @param params
     * @return
     * @throws SearchException
     */
    Integer count(Map<String, Object> params) throws SearchException;

    /**
     * 清除Oauth客户端菜单
     *
     * @param params
     * @throws UpdateException
     */
    void updateMenuEmpty(Map<String, Object> params) throws UpdateException;

    /**
     * 获取Oauth客户端（单表）
     * @param params
     * @return
     * @throws SearchException
     */
    OauthClientDTO getSimple(Map<String, Object> params) throws SearchException;
}
