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

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.role.RoleUserDTO;
import ink.wgink.pojo.dtos.user.UserDTO;
import ink.wgink.pojo.pos.RolePO;
import ink.wgink.pojo.result.SuccessResultList;
import ink.wgink.pojo.vos.IdsVO;

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

/**
 * @ClassName: IRoleUserRemoteService
 * @Description: 角色用户调用
 * @Author: wanggeng
 * @Date: 2021/9/22 10:45 下午
 * @Version: 1.0
 */
@RemoteService("/resource/role/user")
public interface IRoleUserRemoteService {

    @RemoteGetMethod("/list-userid/role-id/{roleId}")
    List<String> listUserIdByRoleId(@RemoteServerParams String userCenter, @RemotePathParams("roleId") String roleId, @RemoteQueryParams("access_token") String accessToken);

    @RemotePostMethod("/list-userid/role-ids")
    List<String> listUserIdByRoleIds(@RemoteServerParams String userCenter, @RemoteQueryParams("access_token") String accessToken, @RemoteJsonBodyParams IdsVO idsVO);

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

    @RemoteGetMethod("/list-role-po/userid/{userId}")
    List<RolePO> listRolePOByUserId(@RemoteServerParams String userCenter, @RemotePathParams("userId") String userId, @RemoteQueryParams("access_token") String accessToken);

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

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

    @RemotePostMethod("/list-role-po/role-ids")
    List<RolePO> listRolePOByRoleIds(@RemoteServerParams String userCenter, @RemoteQueryParams("access_token") String accessToken, @RemoteJsonBodyParams IdsVO idsVO);

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

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

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

    @RemoteGetMethod("/list-user/no-department/no-role")
    List<UserDTO> listUserNoDepartmentAndNoRole(@RemoteServerParams String userCenter, @RemoteQueryParams("access_token") String accessToken, @RemoteQueryParamsMap Map<String, Object> params);

    @RemoteGetMethod("/listpage-user/no-department/no-role")
    SuccessResultList<List<UserDTO>> listPageUserNoDepartmentAndNoRole(@RemoteServerParams String userCenter, @RemoteQueryParams("access_token") String accessToken, @RemoteQueryParams("page") int page, @RemoteQueryParams("rows") int rows, @RemoteQueryParamsMap Map<String, Object> params);


}
