Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

同城配送订单pojo usesanbox字段优化,增加distance字段;BaseWxMaServiceImpl加密路径增加明文日志方便调试 #3417

Merged
merged 13 commits into from
Nov 16, 2024
Merged
Original file line number Diff line number Diff line change
Expand Up @@ -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("?"));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
package cn.binarywang.wx.miniapp.bean.intractiy;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

class BasicWxMaOrder {

private static final Logger logger = LoggerFactory.getLogger(BasicWxMaOrder.class);
binarywang marked this conversation as resolved.
Show resolved Hide resolved
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;
Expand Down Expand Up @@ -60,11 +64,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) {
logger.warn(
"目前(2024.11)useSandbox只有2个合法值:" + " 1:使用沙盒环境; null:不使用沙盒环境。建议查询微信文档确认下值「{}」是否合法。",
useSandbox);
}
this.useSandbox = useSandbox;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down