From aece26a19887023fee703b6dbbcc398043fcebe5 Mon Sep 17 00:00:00 2001 From: liubozhi Date: Thu, 17 Apr 2025 15:45:37 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BA=BF=E4=B8=8A=E5=8F=91=E8=B4=A7=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=B5=8B=E8=AF=95=E7=94=A8mock?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tmerclub/cloud/common/bean/Quick100.java | 63 +++---------------- .../manager/DeliveryPrintManager.java | 13 +++- 2 files changed, 21 insertions(+), 55 deletions(-) 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)) {