package ink.wgink.login.oauth2.client.remote.department;

import ink.wgink.annotation.rpc.rest.RemoteService;
import ink.wgink.annotation.rpc.rest.method.RemoteGetMethod;
import ink.wgink.annotation.rpc.rest.method.RemotePostMethod;
import ink.wgink.annotation.rpc.rest.params.*;
import ink.wgink.pojo.dtos.department.DepartmentContainUserDTO;
import ink.wgink.pojo.dtos.department.DepartmentDTO;
import ink.wgink.pojo.dtos.department.DepartmentUserDTO;
import ink.wgink.pojo.dtos.user.UserDTO;
import ink.wgink.pojo.result.SuccessResultList;
import ink.wgink.pojo.vos.IdsVO;

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

/**
 * @ClassName: IDepartmentUserRemoteService
 * @Description: 组织部门用户调用
 * @Author: wanggeng
 * @Date: 2021/9/22 10:42 下午
 * @Version: 1.0
 */
@RemoteService("/resource/department/user")
public interface IDepartmentUserRemoteService {

    @RemoteGetMethod("/list")
    List<DepartmentUserDTO> list(@RemoteServerParams String userCenter, @RemoteQueryParams("access_token") String accessToken, @RemoteQueryParamsMap Map<String, Object> params);

    @RemoteGetMethod("/list/{departmentId}")
    List<DepartmentUserDTO> listByDepartmentId(@RemoteServerParams String userCenter, @RemotePathParams("departmentId") String departmentId, @RemoteQueryParams("access_token") String accessToken);

    @RemotePostMethod("/list/department-ids")
    List<DepartmentUserDTO> listByDepartmentIds(@RemoteServerParams String userCenter, @RemoteQueryParams("access_token") String accessToken, @RemoteJsonBodyParams IdsVO idsVO);

    @RemotePostMethod("list/user-ids")
    List<DepartmentUserDTO> listByUserIds(@RemoteServerParams String userCenter, @RemoteQueryParams("access_token") String accessToken, @RemoteJsonBodyParams IdsVO idsVO);

    @RemoteGetMethod("/list-user-id/{departmentId}")
    List<String> listUserId(@RemoteServerParams String userCenter, @RemotePathParams("departmentId") String departmentId, @RemoteQueryParams("access_token") String accessToken);

    @RemotePostMethod("/list-user-id/department-ids")
    List<String> listUserIdByDepartmentIds(@RemoteServerParams String userCenter, @RemoteQueryParams("access_token") String accessToken, @RemoteJsonBodyParams IdsVO idsVO);

    @RemotePostMethod("/list-user-id/department-id/{departmentId}/user-ids")
    List<String> listUserIdByDepartmentIdAndUserIds(@RemoteServerParams String userCenter, @RemotePathParams("departmentId") String departmentId, @RemoteQueryParams("access_token") String accessToken, @RemoteJsonBodyParams IdsVO idsVO);

    @RemotePostMethod("/list-user-id/department-ids/user-ids")
    List<String> listUserIdByDepartmentIdsAndUserIds(@RemoteServerParams String userCenter, @RemoteQueryParams("access_token") String accessToken, @RemoteJsonBodyParams IdsVO idsVO);

    @RemoteGetMethod("/listpage/{departmentId}")
    SuccessResultList<List<DepartmentUserDTO>> listPage(@RemoteServerParams String userCenter, @RemotePathParams("departmentId") String departmentId, @RemoteQueryParams("access_token") String accessToken, @RemoteQueryParams("page") int page, @RemoteQueryParams("rows") int rows, @RemoteQueryParamsMap Map<String, Object> params);

    @RemoteGetMethod("/list/{departmentId}")
    List<DepartmentUserDTO> list(@RemoteServerParams String userCenter, @RemotePathParams("departmentId") String departmentId, @RemoteQueryParams("access_token") String accessToken, @RemoteQueryParamsMap Map<String, Object> params);

    @RemoteGetMethod("/list-department/user-id/{userId}")
    List<DepartmentDTO> listDepartmentByUserId(@RemoteServerParams String userCenter, @RemoteQueryParams("access_token") String accessToken, @RemotePathParams("userId") String userId);

    @RemoteGetMethod("/list-user/department-id/{departmentId}")
    List<UserDTO> listUserByDepartmentId(@RemoteServerParams String userCenter, @RemoteQueryParams("access_token") String accessToken, @RemotePathParams("departmentId") String departmentId);

    @RemoteGetMethod("/listpage-user/department-id/{departmentId}")
    SuccessResultList<List<UserDTO>> listPageUserByDepartmentId(@RemoteServerParams String userCenter, @RemotePathParams("departmentId") String departmentId, @RemoteQueryParams("access_token") String accessToken, @RemoteQueryParams("page") int page, @RemoteQueryParams("rows") int rows, @RemoteQueryParamsMap Map<String, Object> params);

    @RemoteGetMethod("/list-department-id/user-id/{userId}")
    List<String> listDepartmentIdByUserId(@RemoteServerParams String userCenter, @RemotePathParams("userId") String userId, @RemoteQueryParams("access_token") String accessToken);

    @RemotePostMethod("/list-department-id/user-ids")
    List<String> listDepartmentIdByUserIds(@RemoteServerParams String userCenter, @RemoteQueryParams("access_token") String accessToken, @RemoteJsonBodyParams IdsVO idsVO);

    @RemotePostMethod("/list-save-department-user-id/user-id/{userId}")
    List<String> listSameDepartmentUserIdByUserId(@RemoteServerParams String userCenter, @RemotePathParams("userId") String userId, @RemoteQueryParams("access_token") String accessToken);

    @RemotePostMethod("/list-save-department-user-ids/user-ids")
    List<String> listSameDepartmentUserIdByUserIds(@RemoteServerParams String userCenter, @RemoteQueryParams("access_token") String accessToken, @RemoteJsonBodyParams IdsVO idsVO);

    @RemotePostMethod("/list-user/exclude-department-id/{departmentId}")
    List<UserDTO> listUserByExcludeDepartmentId(@RemoteServerParams String userCenter, @RemoteQueryParams("access_token") String accessToken, @RemotePathParams("departmentId") String departmentId);

    @RemotePostMethod("/list-user/exclude-department-ids")
    List<UserDTO> listUserByExcludeDepartmentIds(@RemoteServerParams String userCenter, @RemoteQueryParams("access_token") String accessToken, @RemoteJsonBodyParams IdsVO idsVO);

    @RemotePostMethod("/listpage-user/exclude-department-id/{departmentId}")
    SuccessResultList<List<UserDTO>> listPageUserByExcludeDepartmentId(@RemoteServerParams String userCenter, @RemoteQueryParams("access_token") String accessToken, @RemotePathParams("departmentId") String departmentId, @RemoteQueryParams("page") int page, @RemoteQueryParams("rows") int rows, @RemoteQueryParamsMap Map<String, Object> params);

    @RemotePostMethod("/listpage-user/exclude-department-ids")
    SuccessResultList<List<UserDTO>> listPageUserByExcludeDepartmentIds(@RemoteServerParams String userCenter, @RemoteQueryParams("access_token") String accessToken, @RemoteJsonBodyParams IdsVO idsVO, @RemoteQueryParams("page") int page, @RemoteQueryParams("rows") int rows, @RemoteQueryParamsMap Map<String, Object> params);

    @RemotePostMethod("/get-department-contain-user-and-sub/department-id/{departmentId}")
    DepartmentContainUserDTO getDepartmentContainUserAndSubByDepartmentId(@RemoteServerParams String userCenter, @RemoteQueryParams("access_token") String accessToken, @RemotePathParams("departmentId") String departmentId);

}
