package com.xhpc.common.api.factory;

import com.xhpc.common.api.SettingConfigService;
import com.xhpc.common.core.constant.ServiceNameConstants;
import com.xhpc.common.core.domain.R;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;

/**
 * @author yuyang
 * @date 2022/2/8 13:56
 */
@Component
public class SettingConfigFactory implements FallbackFactory<SettingConfigService> {
    @Override
    public SettingConfigService create(Throwable cause) {
        return new SettingConfigService() {
            @Override
            public R settingConfig(Integer status, String tenantId) {
                return R.fail(3886,"获取支付配置信息失败:" + cause.getMessage());
            }
        };
    }
}
