| | |
| | | package com.ruoyi.user.api.factory; |
| | | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.vo.AddressDto; |
| | | import com.ruoyi.common.core.vo.UserDto; |
| | | import com.ruoyi.user.api.feignClient.UserClient; |
| | | import org.springframework.cloud.openfeign.FallbackFactory; |
| | | import org.springframework.stereotype.Component; |
| | |
| | | |
| | | @Override |
| | | public UserClient create(Throwable cause) { |
| | | return null; |
| | | return new UserClient() { |
| | | |
| | | @Override |
| | | public R<UserDto> getUser(Integer userId) { |
| | | return R.fail(cause.getMessage()); |
| | | } |
| | | |
| | | @Override |
| | | public R<AddressDto> getCityCode(Integer addressId) { |
| | | return R.fail(cause.getMessage()); |
| | | } |
| | | }; |
| | | } |
| | | |
| | | |
| | | |
| | | } |