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

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.position.PositionDTO;
import ink.wgink.pojo.pos.PositionPO;
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: IPositionRemoteService
 * @Description: 职位调用
 * @Author: wanggeng
 * @Date: 2021/9/22 10:43 下午
 * @Version: 1.0
 */
@RemoteService("/resource/position")
public interface IPositionRemoteService {

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

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

    @RemoteGetMethod("/get/id/{positionId}")
    PositionDTO getById(@RemoteServerParams String userCenter, @RemotePathParams("positionId") String positionId, @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<PositionDTO>> listPage(@RemoteServerParams String userCenter, @RemoteQueryParams("access_token") String accessToken, @RemoteQueryParams("page") int page, @RemotePathParams("rows") int rows, @RemoteQueryParamsMap Map<String, Object> params);

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

    @RemotePostMethod("/list/position-ids")
    List<PositionDTO> listByPositionIds(@RemoteServerParams String userCenter, @RemoteQueryParams("access_token") String accessToken, @RemoteJsonBodyParams IdsVO idsVO);

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

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

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

    @RemoteGetMethod("/get-parent/position-id/{positionId}")
    PositionDTO getParentByPositionId(@RemoteServerParams String userCenter, @RemotePathParams("positionId") String positionId, @RemoteQueryParams("access_token") String accessToken);

    @RemotePostMethod("/list-parent/position-ids")
    List<PositionDTO> listParentByPositionIds(@RemoteServerParams String userCenter, @RemoteQueryParams("access_token") String accessToken, @RemoteJsonBodyParams IdsVO idsVO);

    @RemotePostMethod("/list/position-parent-ids")
    List<PositionDTO> listByPositionParentIds(@RemoteServerParams String userCenter, @RemoteQueryParams("access_token") String accessToken, @RemoteJsonBodyParams IdsVO idsVO);
}
