diff --git a/tmerclub-common/tmerclub-common-core/src/main/java/com/tmerclub/cloud/common/bean/Quick100.java b/tmerclub-common/tmerclub-common-core/src/main/java/com/tmerclub/cloud/common/bean/Quick100.java index a71d8ad..5e38765 100644 --- a/tmerclub-common/tmerclub-common-core/src/main/java/com/tmerclub/cloud/common/bean/Quick100.java +++ b/tmerclub-common/tmerclub-common-core/src/main/java/com/tmerclub/cloud/common/bean/Quick100.java @@ -2,11 +2,15 @@ package com.tmerclub.cloud.common.bean; import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; +import lombok.ToString; /** * 快递鸟物流详情查询 * @author SJL */ +@Data +@ToString public class Quick100 extends SwitchBaseModel { /** @@ -38,59 +42,10 @@ public class Quick100 extends SwitchBaseModel { */ private Boolean mock; - public String getCustomer() { - return customer; - } + /** + * C端下单接口 + * + */ + private String cOrder; - public void setCustomer(String customer) { - this.customer = customer; - } - - public String getKey() { - return key; - } - - public void setKey(String key) { - this.key = key; - } - - public String getSecret() { - return secret; - } - - public void setSecret(String secret) { - this.secret = secret; - } - - public String getReqUrl() { - return reqUrl; - } - - public void setReqUrl(String reqUrl) { - this.reqUrl = reqUrl; - } - - public Boolean getIsPrint() { - return isPrint; - } - - public void setIsPrint(Boolean print) { - isPrint = print; - } - - public String getPrintReqUrl() { - return printReqUrl; - } - - public void setPrintReqUrl(String printReqUrl) { - this.printReqUrl = printReqUrl; - } - - public Boolean getMock() { - return mock; - } - - public void setMock(Boolean mock) { - this.mock = mock; - } } diff --git a/tmerclub-order/src/main/java/com/tmerclub/cloud/delivery/manager/DeliveryPrintManager.java b/tmerclub-order/src/main/java/com/tmerclub/cloud/delivery/manager/DeliveryPrintManager.java index 2da8236..c24f384 100644 --- a/tmerclub-order/src/main/java/com/tmerclub/cloud/delivery/manager/DeliveryPrintManager.java +++ b/tmerclub-order/src/main/java/com/tmerclub/cloud/delivery/manager/DeliveryPrintManager.java @@ -97,7 +97,18 @@ public class DeliveryPrintManager { printReq.put("param", param); String repJson = HttpUtil.post(quick100.getPrintReqUrl(), printReq); logger.info("电子面单请求返回:" + repJson); - DeliveryPrintInfoBO deliveryPrintInfoBO = Json.parseObject(repJson, DeliveryPrintInfoBO.class); + DeliveryPrintInfoBO deliveryPrintInfoBO = new DeliveryPrintInfoBO(); + // mock == true + if (quick100.getMock()) { + deliveryPrintInfoBO.setSuccess(true); + deliveryPrintInfoBO.setCode(SUCCESS_CODE); + DeliveryPrintDataInfoBO deliveryPrintDataInfoBO = new DeliveryPrintDataInfoBO(); + deliveryPrintDataInfoBO.setKuaidinum("666"); + deliveryPrintInfoBO.setData(deliveryPrintDataInfoBO); + }else { + deliveryPrintInfoBO = Json.parseObject(repJson, DeliveryPrintInfoBO.class); + } + if (Objects.isNull(deliveryPrintInfoBO)) { DeliveryPrintInfoErrorBO deliveryPrintInfoErrorBO = Json.parseObject(repJson, DeliveryPrintInfoErrorBO.class); if (Objects.isNull(deliveryPrintInfoErrorBO)) {