| | |
| | | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.goods.api.domain.TGoods; |
| | | import com.ruoyi.goods.api.domain.TGoodsType; |
| | | import com.ruoyi.goods.api.feignClient.GoodsClient; |
| | | import com.ruoyi.goods.api.model.GoodsTypeQuery; |
| | | import com.ruoyi.goods.api.model.TGoodsVO; |
| | | import org.springframework.cloud.openfeign.FallbackFactory; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Component |
| | | public class GoodsFallbackFactory implements FallbackFactory<GoodsClient> { |
| | |
| | | public R<PageInfo<TGoodsType>> listType(GoodsTypeQuery query) { |
| | | return R.fail("获取商品类型列表失败" + cause.getMessage()); |
| | | } |
| | | |
| | | @Override |
| | | public R addGoodsType(TGoodsType dto) { |
| | | return R.fail("添加商品类型失败" + cause.getMessage()); |
| | | } |
| | | |
| | | @Override |
| | | public R updateGoodsType(TGoodsType dto) { |
| | | return R.fail("修改商品类型失败" + cause.getMessage()); |
| | | } |
| | | |
| | | @Override |
| | | public R deleteGoodsType(Integer id) { |
| | | return R.fail("删除商品类型失败" + cause.getMessage()); |
| | | } |
| | | |
| | | @Override |
| | | public R<PageInfo<TGoods>> listAll(GoodsTypeQuery query) { |
| | | return R.fail("获取商品列表失败" + cause.getMessage()); |
| | | } |
| | | |
| | | @Override |
| | | public R addGoods(TGoods dto) { |
| | | return R.fail("添加商品失败" + cause.getMessage()); |
| | | } |
| | | |
| | | @Override |
| | | public R deleteGoods(Integer id) { |
| | | return R.fail("删除商品失败" + cause.getMessage()); |
| | | } |
| | | |
| | | @Override |
| | | public R updateGoods(TGoods dto) { |
| | | return R.fail("修改商品失败" + cause.getMessage()); |
| | | } |
| | | |
| | | @Override |
| | | public R<TGoodsVO> getGoodsInfo(Integer id) { |
| | | return R.fail("获取商品详情失败" + cause.getMessage()); |
| | | } |
| | | |
| | | @Override |
| | | public R<List<TGoodsType>> getGoodsInfo() { |
| | | return R.fail("获取商品类型列表" + cause.getMessage()); |
| | | } |
| | | }; |
| | | } |
| | | } |