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

import com.yd.common.result.Result;
import com.yd.csf.feign.fallback.salary.ApiSalaryFeignFallbackFactory;
import com.yd.csf.feign.request.salary.ApiSalaryAddRequest;
import com.yd.csf.feign.request.salary.ApiSalaryEditRequest;
import com.yd.csf.feign.request.salary.ApiSalaryPageRequest;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * 香港保险服务-薪资单信息Feign客户端
 */
@FeignClient(name = "yd-csf-api", fallbackFactory = ApiSalaryFeignFallbackFactory.class)
public interface ApiSalaryFeignClient {

    /**
     * 分页查询-薪资单信息
     * @param request
     * @return
     */
    @PostMapping("/page")
    Result page(@Validated @RequestBody ApiSalaryPageRequest request);

    /**
     * 新增-薪资单信息
     * @param request
     * @return
     */
    @PostMapping("/add")
    Result add(@Validated @RequestBody ApiSalaryAddRequest request);

    /**
     * 修改-薪资单信息
     * @param request
     * @return
     */
    @PostMapping("/edit")
    Result edit(@Validated @RequestBody ApiSalaryEditRequest request);
}
