Skip to content

Commit

Permalink
🎨 #3417 【小程序】同城配送订单接口字段优化
Browse files Browse the repository at this point in the history
  • Loading branch information
gexiangdong authored Nov 16, 2024
1 parent 4976aa9 commit 3550d29
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
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,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;
Expand Down Expand Up @@ -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;
}

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

0 comments on commit 3550d29

Please sign in to comment.