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

import com.yd.common.result.Result;
import com.yd.csf.feign.client.csfclientuser.ApiCsfClientUserFeignClient;
import com.yd.csf.feign.request.csfclientuser.ApiCsfClientUserAddRequest;
import com.yd.csf.feign.request.csfclientuser.ApiCsfClientUserPageRequest;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * 香港保险服务-CSF客户端用户信息Feign降级处理
 */
@Slf4j
@Component
public class ApiCsfClientUserFeignFallbackFactory implements FallbackFactory<ApiCsfClientUserFeignClient> {
    @Override
    public ApiCsfClientUserFeignClient create(Throwable cause) {
        return new ApiCsfClientUserFeignClient() {
            @Override
            public Result page(ApiCsfClientUserPageRequest request) {
                return null;
            }

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