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.ZTreeDTO;
import ink.wgink.pojo.dtos.role.RoleDTO;
import ink.wgink.pojo.pos.RolePO;
import ink.wgink.pojo.result.SuccessResultData;
import ink.wgink.pojo.result.SuccessResultList;
import ink.wgink.pojo.vos.IdsVO;

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

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

    @RemoteGetMethod("get")
    RoleDTO get(@RemoteServerParams String userCenter, @RemoteQueryParams("access_token") String accessToken, @RemoteQueryParamsMap Map<String, Object> params);

    @RemoteGetMethod("get/{roleId}")
    RoleDTO getByRoleId(@RemoteServerParams String userCenter, @RemotePathParams("roleId") String roleId, @RemoteQueryParams("access_token") String accessToken);

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

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

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

    @RemoteGetMethod("/list-all")
    List<RoleDTO> listAll(@RemoteServerParams String userCenter, @RemoteQueryParams("access_token") String accessToken);

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

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

    @RemoteGetMethod("/count")
    SuccessResultData<Integer> count(@RemoteServerParams String userCenter, @RemoteQueryParams("access_token") String accessToken, @RemoteQueryParamsMap Map<String, Object> params);

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