lbq
昨天 076cd7a73eb60c86d43eda67c5625704576d44cc
rsf-open-api/src/main/java/com/vincent/rsf/openApi/feign/wms/fallback/WmsServerFeignClientFallback.java
@@ -1,5 +1,6 @@
package com.vincent.rsf.openApi.feign.wms.fallback;
import com.alibaba.fastjson.JSONObject;
import com.vincent.rsf.framework.common.R;
import com.vincent.rsf.openApi.entity.phyz.InventoryQueryCondition;
import com.vincent.rsf.openApi.feign.wms.WmsServerFeignClient;
@@ -47,6 +48,50 @@
        return R.error(errorMessage);
    }
    @Override
    public R callForEmptyContainers(JSONObject condition) {
        return callForEmptyContainers(condition, null);
    }
    public R callForEmptyContainers(JSONObject condition, Throwable throwable) {
        log.error("调用WMS Server空托出库接口失败,触发降级处理", throwable);
        String errorMessage = filterErrorMessage(throwable);
        return R.error(errorMessage);
    }
    @Override
    public R emptyContainerWarehousing(JSONObject condition) {
        return emptyContainerWarehousing(condition, null);
    }
    public R emptyContainerWarehousing(JSONObject condition, Throwable throwable) {
        log.error("调用WMS Server空托入库接口失败,触发降级处理", throwable);
        String errorMessage = filterErrorMessage(throwable);
        return R.error(errorMessage);
    }
    @Override
    public R mesAddTask(JSONObject condition) {
        return mesAddTask(condition, null);
    }
    public R mesAddTask(JSONObject condition, Throwable throwable) {
        log.error("调用WMS Servermes下发agv运输任务接口失败,触发降级处理", throwable);
        String errorMessage = filterErrorMessage(throwable);
        return R.error(errorMessage);
    }
    @Override
    public R mesCancelTask(JSONObject condition) {
        return mesCancelTask(condition, null);
    }
    public R mesCancelTask(JSONObject condition, Throwable throwable) {
        log.error("调用WMS Servermes取消agv运输任务接口失败,触发降级处理", throwable);
        String errorMessage = filterErrorMessage(throwable);
        return R.error(errorMessage);
    }
    /**
     * 过滤错误消息中的URL,只保留错误类型
     * @param throwable 异常对象(可选)