package ink.wgink.service.department.dao;

import ink.wgink.exceptions.RemoveException;
import ink.wgink.exceptions.SaveException;
import ink.wgink.exceptions.SearchException;
import ink.wgink.exceptions.UpdateException;
import ink.wgink.interfaces.init.IInitBaseTable;
import ink.wgink.pojo.dtos.department.DepartmentUserDTO;
import ink.wgink.pojo.dtos.user.UserDTO;
import ink.wgink.service.user.pojo.pos.UserPO;
import org.springframework.stereotype.Repository;

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

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: IDepartmentUserDao
 * @Description: 组织部门用户
 * @Author: wanggeng
 * @Date: 2021/1/28 4:28 下午
 * @Version: 1.0
 */
@Repository
public interface IDepartmentUserDao 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;

    /**
     * 更新组织用户排序
     *
     * @param params
     * @throws UpdateException
     */
    void updateSort(Map<String, Object> params) throws UpdateException;

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

    /**
     * 用户ID列表
     *
     * @param params 参数
     * @return
     */
    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> listDepartmentId(Map<String, Object> params) throws SearchException;

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

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

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

    /**
     * 部门用户列表
     *
     * @param params
     * @return
     * @throws SearchException
     */
    List<DepartmentUserDTO> listDepartmentUser(Map<String, Object> params) throws SearchException;
}
