| | |
| | | package com.ruoyi.account.api.factory; |
| | | |
| | | import com.ruoyi.account.api.feignClient.AppUserClient; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.cloud.openfeign.FallbackFactory; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 门店服务降级处理 |
| | |
| | | public AppUserClient create(Throwable throwable) { |
| | | log.error("账户服务调用失败:{}", throwable.getMessage()); |
| | | return new AppUserClient() { |
| | | |
| | | |
| | | @Override |
| | | public R<List<Long>> getUserIdsByPhone(String phone) { |
| | | return R.fail("根据手机号查询用户ids失败:"+throwable.getMessage()); |
| | | } |
| | | }; |
| | | } |
| | | } |