package com.yd.csf.feign.client.salarysplit;

import com.yd.common.result.Result;
import com.yd.csf.feign.fallback.salarysplit.ApiSalarySplitFeignFallbackFactory;
import com.yd.csf.feign.request.salarysplit.*;
import com.yd.csf.feign.response.salarysplit.ApiQueryRemainingResponse;
import com.yd.csf.feign.response.salarysplit.ApiSalarySplitQueryRateResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 香港保险服务-薪资拆分应发信息Feign客户端
 */
@FeignClient(name = "yd-csf-api", fallbackFactory = ApiSalarySplitFeignFallbackFactory.class)
public interface ApiSalarySplitFeignClient {

    /**
     * 分页查询-薪资拆分应发信息汇总列表
     * @param request
     * @return
     */
    @PostMapping("/summary/page")
    Result summaryPage(@Validated @RequestBody ApiSalarySplitSummaryPageRequest request);

    /**
     * 分页查询-薪资拆分应发信息列表
     * @param request
     * @return
     */
    @PostMapping("/page")
    Result page(@Validated @RequestBody ApiSalarySplitPageRequest request);

    /**
     * 批量保存-薪资拆分应发信息列表
     * @param request
     * @return
     */
    @PostMapping("/batch/save")
    Result batchSave(@Validated @RequestBody ApiSalarySplitBatchSaveRequest request);

    /**
     * 查询-原币种剩余总金额和原币种
     * @param request
     * @return
     */
    @PostMapping("/query/remaining")
    Result<ApiQueryRemainingResponse> queryRemaining(@Validated @RequestBody ApiQueryRemainingRequest request);

    /**
     * 查询-原币种和原币种金额——>目标币种即时汇率和目标币种金额
     * @param request
     * @return
     */
    @PostMapping("/query/rate")
    Result<ApiSalarySplitQueryRateResponse> queryRate(@Validated @RequestBody ApiSalarySplitQueryRateRequest request);
}
