package ink.wgink.service.group.dao;

import ink.wgink.exceptions.RemoveException;
import ink.wgink.exceptions.SaveException;
import ink.wgink.exceptions.SearchException;
import ink.wgink.interfaces.init.IInitBaseTable;
import ink.wgink.pojo.dtos.user.UserDTO;
import org.springframework.stereotype.Repository;

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

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: IGroupUserDao
 * @Description: 用户组用户
 * @Author: wanggeng
 * @Date: 2021/2/16 12:07 下午
 * @Version: 1.0
 */
@Repository
public interface IGroupUserDao extends IInitBaseTable {

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

    /**
     * 删除
     *
     * @param params
     * @throws RemoveException
     */
    void delete(Map<String, Object> params) throws RemoveException;

    /**
     * 用户ID列表
     *
     * @param params
     * @return
     * @throws SearchException
     */
    List<String> listUserId(Map<String, Object> params) throws SearchException;

    /**
     * 用户ID列表
     *
     * @param params
     * @return
     * @throws SearchException
     */
    List<String> listGroupUserId(Map<String, Object> params) throws SearchException;

    /**
     * 组ID列表
     *
     * @param params
     * @return
     * @throws SearchException
     */
    List<String> listGroupId(Map<String, Object> params) throws SearchException;

    /**
     * 用户列表
     *
     * @param requestParams
     * @return
     * @throws SearchException
     */
    List<UserDTO> listUser(Map<String, Object> requestParams) throws SearchException;
}
