| | |
| | | package com.ruoyi.chargingPile.api.factory; |
| | | |
| | | import com.ruoyi.chargingPile.api.feignClient.ChargingPileClient; |
| | | import com.ruoyi.chargingPile.api.model.TChargingPile; |
| | | 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 ChargingPileClient create(Throwable throwable) { |
| | | log.error("充电桩调用失败:{}", throwable.getMessage()); |
| | | return new ChargingPileClient() { |
| | | |
| | | |
| | | @Override |
| | | public R<List<TChargingPile>> getChargingPileBySiteId(Integer siteId) { |
| | | return R.fail("通过站点id获取充电桩列表失败:"+throwable.getMessage()); |
| | | } |
| | | }; |
| | | } |
| | | } |