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

import com.yd.common.result.Result;
import com.yd.csf.feign.client.salary.ApiSalaryFeignClient;
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 lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * 香港保险服务-薪资单信息Feign降级处理
 */
@Slf4j
@Component
public class ApiSalaryFeignFallbackFactory implements FallbackFactory<ApiSalaryFeignClient> {
    @Override
    public ApiSalaryFeignClient create(Throwable cause) {
        return new ApiSalaryFeignClient() {
            @Override
            public Result page(ApiSalaryPageRequest request) {
                return null;
            }

            @Override
            public Result add(ApiSalaryAddRequest request) {
                return null;
            }

            @Override
            public Result edit(ApiSalaryEditRequest request) {
                return null;
            }
        };
    }
}
