package com.vctgo.system.api.factory;

import com.vctgo.common.core.domain.R;
import com.vctgo.system.api.RemoteReLocationService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

/**
 * 用户服务降级处理
 *
 * @author vctgo
 */
@Component
public class RemoteReLocationFallbackFactory implements FallbackFactory<RemoteReLocationService> {
    private static final Logger log = LoggerFactory.getLogger(RemoteReLocationFallbackFactory.class);

    @Override
    public RemoteReLocationService create(Throwable throwable) {
        return reLocationDto -> R.fail("获取位置id列表数据失败:" + throwable.getMessage());
    }
}
