huliguo
17 小时以前 8115295a64e0809246897fefb8c45de06dce0799
ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/factory/ChargingGunFallbackFactory.java
@@ -5,12 +5,14 @@
import com.ruoyi.chargingPile.api.model.TChargingGun;
import com.ruoyi.chargingPile.api.model.TChargingPile;
import com.ruoyi.chargingPile.api.model.TFaultMessage;
import com.ruoyi.chargingPile.api.vo.GetChargingGunByCode;
import com.ruoyi.chargingPile.api.vo.SiteNameVO;
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 org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
@@ -28,7 +30,17 @@
    public ChargingGunClient create(Throwable throwable) {
        log.error("充电枪调用失败:{}", throwable.getMessage());
        return new ChargingGunClient() {
            @Override
            public R<List<TChargingGun>> getAllGun() {
                return R.fail("获取数据失败:" + throwable.getMessage());
            }
            @Override
            public R<List<TChargingPile>> getAllPile() {
                return R.fail("获取所有桩失败:" + throwable.getMessage());
            }
            @Override
            public R<String> getAllName(Integer id) {
                return R.fail("根据id获取充电枪完整名称失败:" + throwable.getMessage());
@@ -45,7 +57,7 @@
            }
            @Override
            public R<TChargingGun> getChargingGunByCode(String code) {
            public R<TChargingGun> getChargingGunByCode(GetChargingGunByCode code) {
                return R.fail("根据枪编号获取充电枪失败:" + throwable.getMessage());
            }
@@ -53,6 +65,30 @@
            public R<String> updateChargingGunById(TChargingGun chargingGun) {
                return R.fail("编辑充电枪失败:" + throwable.getMessage());
            }
            @Override
            public R<List<TChargingGun>> getChargingGunByChargingPileId(Integer chargingPileId) {
                return R.fail("根据充电桩id获取枪失败:" + throwable.getMessage());
            }
            @Override
            public R<List<TChargingGun>> getChargingGunByChargingPileIds(List<Integer> chargingPileIds) {
                return R.fail("根据充电桩ids获取枪失败:" + throwable.getMessage());
            }
            @Override
            public R pushChargingGunStatus(Integer id, Integer status) {
                return R.fail("接口状态变化后推送给第三方失败:" + throwable.getMessage());
            }
            @Override
            public R<TChargingGun> getChargingGunByFullNumber(String fullNumber) {
                return R.fail("根据枪唯一码查询信息失败:" + throwable.getMessage());
            }
            @Override
            public R<List<Integer>> getGunIdsBySiteIdsAndChargeModels(List<Integer> siteIds, List<Integer> chargeModels){
                return R.fail("根据站点ids和充电模式集合查询充电枪集合失败:" + throwable.getMessage());
            }
        };
    }