Pu Zhibing
2024-10-16 c4664502dfdaffff555b532e65b51a57ac8b29c2
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/factory/ChargingOrderFallbackFactory.java
@@ -9,12 +9,12 @@
import com.ruoyi.order.api.model.TSettlementConfirm;
import com.ruoyi.order.api.query.TChargingCountQuery;
import com.ruoyi.order.api.query.UploadRealTimeMonitoringDataQuery;
import com.ruoyi.order.api.vo.ChargingBillVO;
import com.ruoyi.order.api.vo.GetChargingOrderByLicensePlate;
import com.ruoyi.order.api.vo.*;
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.PathVariable;
import java.util.List;
@@ -32,6 +32,11 @@
    public ChargingOrderClient create(Throwable throwable) {
        log.error("充电订单调用失败:{}", throwable.getMessage());
        return new ChargingOrderClient() {
            @Override
            public R<String> queryOrderByGunId(String id) {
                return R.fail("远程调用根据枪id 查询最新的订单id 用户后台结束充电" + throwable.getMessage());
            }
            @Override
            public R<Long> useOrderCount(Long userId) {
@@ -70,7 +75,7 @@
            }
            @Override
            public R<Long> getCar() {
            public R<Long> getCar(@PathVariable("id")String id) {
                return R.fail("获取用户最近使用车辆充电的车辆id:" + throwable.getMessage());
            }
    
@@ -102,6 +107,57 @@
            public R<TSettlementConfirm> downloadSettlement(String uid) {
                return R.fail("通过id查询结算确认失败:" + throwable.getMessage());
            }
            @Override
            public R<SettlementTotalVO> settlementTotalR(String time) {
                return R.fail("查询结算汇总表导出列表失败:" + throwable.getMessage());
            }
            @Override
            public R<String> updateChargingOrder(TChargingOrder chargingOrder) {
                return R.fail("修改充电订单失败:" + throwable.getMessage());
            }
            @Override
            public R<String> stopCharging(String id) {
                return R.fail("手动停止充电失败:" + throwable.getMessage());
            }
            @Override
            public void chargingOrderWXCallback(String out_trade_no, String transaction_id, String attach) {
                log.error("充电支付成功回调通知失败:" + throwable.getMessage());
            }
            @Override
            public void chargingOrderStartupFailureWxRefund(String out_refund_no, String refund_id, String tradeState, String success_time) {
                log.error("远程启动失败后退款通知失败:" + throwable.getMessage());
            }
            @Override
            public void shoppingOrderWxRefund(String out_refund_no, String refund_id, String tradeState, String success_time) {
                log.error("购物订单退款回调通知失败:" + throwable.getMessage());
            }
            @Override
            public void securityDetection(SecurityDetectionVO securityDetection) {
                log.error("修改安全检测数据失败:" + throwable.getMessage());
            }
            @Override
            public void startChargeSuccessfully(PlatformStartChargingReplyMessageVO message) {
                log.error("远程启动充电应答失败:" + throwable.getMessage());
            }
            @Override
            public void terminateSuccessfulResponse(PlatformStopChargingReplyVO platformStopChargingReply) {
                log.error("停止充电应答处理失败:" + throwable.getMessage());
            }
            @Override
            public void endChargeBillingCharge(TransactionRecordMessageVO vo) {
                log.error("停止充电返回账单后计算费用处理失败:" + throwable.getMessage());
            }
        };
    }
}