diff --git a/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/api/impl/BaseWxMaServiceImpl.java b/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/api/impl/BaseWxMaServiceImpl.java index 9385cad46..8af0626b9 100644 --- a/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/api/impl/BaseWxMaServiceImpl.java +++ b/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/api/impl/BaseWxMaServiceImpl.java @@ -882,6 +882,7 @@ public String postWithSignature(String url, JsonObject jsonObject) throws WxErro jsonObject.addProperty("_timestamp", timestamp); String plainText = jsonObject.toString(); + log.debug("URL:{}加密前请求数据:{}", url, plainText); String urlPath; if (url.contains("?")) { urlPath = url.substring(0, url.indexOf("?")); diff --git a/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/bean/intractiy/BasicWxMaOrder.java b/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/bean/intractiy/BasicWxMaOrder.java index 868cf5e5c..e0bbeccf2 100644 --- a/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/bean/intractiy/BasicWxMaOrder.java +++ b/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/bean/intractiy/BasicWxMaOrder.java @@ -1,16 +1,19 @@ package cn.binarywang.wx.miniapp.bean.intractiy; +import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.builder.ToStringBuilder; +@Slf4j class BasicWxMaOrder { - private String wxStoreId; private String userName; private String userPhone; private double userLng; private double userLat; private String userAddress; - private int useSandbox; + + /** 如果不用沙盒测试环境,传NULL(不是0),用沙盒传1 */ + private Integer useSandbox; public String getWxStoreId() { return wxStoreId; @@ -60,11 +63,16 @@ public void setUserAddress(String userAddress) { this.userAddress = userAddress; } - public int isUseSandbox() { + public Integer getUseSandbox() { return useSandbox; } - public void setUseSandbox(int useSandbox) { + public void setUseSandbox(Integer useSandbox) { + if (useSandbox != null && useSandbox != 1) { + log.warn( + "目前(2024.11)useSandbox只有2个合法值:" + " 1:使用沙盒环境; null:不使用沙盒环境。建议查询微信文档确认下值「{}」是否合法。", + useSandbox); + } this.useSandbox = useSandbox; } diff --git a/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/bean/intractiy/WxMaOrder.java b/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/bean/intractiy/WxMaOrder.java index fbec5c8c6..0a752d9f9 100644 --- a/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/bean/intractiy/WxMaOrder.java +++ b/weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/bean/intractiy/WxMaOrder.java @@ -11,6 +11,7 @@ public class WxMaOrder extends WxMaAddOrderRequest { private String deliveryNo; private int actualfee; private int deductfee; + private int distance; private long createTime; private long acceptTime; private long fetchTime; @@ -196,6 +197,14 @@ public Date getCancelDate() { return cancelTime == 0 ? null : new Date(cancelTime * 1000); } + public int getDistance() { + return distance; + } + + public void setDistance(int distance) { + this.distance = distance; + } + @Override public String toString() { return ToStringBuilder.reflectionToString(this);