package com.xiaopeng.api.factory.account; import com.xiaopeng.api.dto.account.UserResourcesDto; import com.xiaopeng.api.feignClient.account.SSOClient; import com.xiaopeng.api.vo.account.WechatAccessTokenResVo; import lombok.extern.slf4j.Slf4j; import org.springframework.cloud.openfeign.FallbackFactory; import org.springframework.stereotype.Component; import org.springframework.web.bind.annotation.RequestParam; @Slf4j @Component public class SSOClientFallbackFactory implements FallbackFactory { @Override public SSOClient create(Throwable cause) { return new SSOClient() { @Override public WechatAccessTokenResVo getWechatAccessToken(String appId, String wxAppId, Boolean isRefresh) { log.info("调用小鹏获取微信全局token服务失败, 异常: {}", cause.getMessage()); return null; } }; } }