| | |
| | | package com.ruoyi.order.api.factory; |
| | | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.order.api.feignClient.ChargingOrderClient; |
| | | import com.ruoyi.order.api.model.TChargingOrder; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.cloud.openfeign.FallbackFactory; |
| | |
| | | public ChargingOrderClient create(Throwable throwable) { |
| | | log.error("充电订单调用失败:{}", throwable.getMessage()); |
| | | return new ChargingOrderClient() { |
| | | |
| | | |
| | | @Override |
| | | public R<Long> useOrderCount(Long userId) { |
| | | return R.fail("订单计数:" + throwable.getMessage()); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public R<TChargingOrder> orderDetail(Long orderId) { |
| | | return R.fail("订单详情:" + throwable.getMessage()); |
| | | } |
| | | }; |
| | | } |
| | | } |