package com.ruoyi.other.api.factory; import com.ruoyi.common.core.domain.R; import com.ruoyi.other.api.domain.GoodsArea; import com.ruoyi.other.api.feignClient.GoodsAreaClient; import org.springframework.cloud.openfeign.FallbackFactory; /** * @author zhibing.pu * @Date 2024/11/27 20:29 */ public class GoodsAreaClientFallbackFactory implements FallbackFactory { @Override public GoodsAreaClient create(Throwable cause) { return new GoodsAreaClient() { @Override public R getGoodsArea(GoodsArea area) { return R.fail("根据省市区获取地区价格配置失败:" + cause.getMessage()); } }; } }