🆕 #3083 【小程序】增加发货信息管理相关接口,【开放平台】增加第三方平台的购物订单管理等接口

This commit is contained in:
Molzx 2023-07-17 11:07:59 +08:00 committed by GitHub
parent 4423b3d638
commit b6b80a2dda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
41 changed files with 2161 additions and 12 deletions

View File

@ -0,0 +1,89 @@
package cn.binarywang.wx.miniapp.api;
import cn.binarywang.wx.miniapp.bean.shop.request.shipping.*;
import cn.binarywang.wx.miniapp.bean.shop.response.WxMaOrderShippingInfoBaseResponse;
import cn.binarywang.wx.miniapp.bean.shop.response.WxMaOrderShippingInfoGetListResponse;
import cn.binarywang.wx.miniapp.bean.shop.response.WxMaOrderShippingInfoGetResponse;
import cn.binarywang.wx.miniapp.bean.shop.response.WxMaOrderShippingIsTradeManagedResponse;
import me.chanjar.weixin.common.error.WxErrorException;
/**
* @author xzh
* created on 2023/5/17 16:49
*/
public interface WxMaOrderShippingService {
/**
* 查询小程序是否已开通发货信息管理服务
*
* @param appId 待查询小程序的 appid非服务商调用时仅能查询本账号
* @return WxMaOrderShippingInfoBaseResponse
* @throws WxErrorException e
*/
WxMaOrderShippingIsTradeManagedResponse isTradeManaged(String appId)
throws WxErrorException;
/**
* 发货信息录入接口
*
* @param request 请求
* @return WxMaOrderShippingInfoBaseResponse
* @throws WxErrorException e
*/
WxMaOrderShippingInfoBaseResponse upload(WxMaOrderShippingInfoUploadRequest request)
throws WxErrorException;
/**
* 发货信息合单录入接口
*
* @param request 请求
* @return WxMaOrderShippingInfoBaseResponse
* @throws WxErrorException e
*/
WxMaOrderShippingInfoBaseResponse upload(WxMaOrderCombinedShippingInfoUploadRequest request)
throws WxErrorException;
/**
* 查询订单发货状态
* 你可以通过交易单号或商户号+商户单号来查询该支付单的发货状态
*
* @param request 请求
* @return WxMaOrderShippingInfoGetResponse
* @throws WxErrorException e
*/
WxMaOrderShippingInfoGetResponse get(WxMaOrderShippingInfoGetRequest request)
throws WxErrorException;
/**
* 查询订单列表
* 你可以通过支付时间支付者openid或订单状态来查询订单列表
*
* @param request 请求
* @return WxMaOrderShippingInfoGetListResponse
* @throws WxErrorException e
*/
WxMaOrderShippingInfoGetListResponse getList(WxMaOrderShippingInfoGetListRequest request)
throws WxErrorException;
/**
* 确认收货提醒接口
* 如你已经从你的快递物流服务方获知到用户已经签收相关商品可以通过该接口提醒用户及时确认收货以提高资金结算效率每个订单仅可调用一次
*
* @param request 请求
* @return WxMaOrderShippingInfoBaseResponse
* @throws WxErrorException e
*/
WxMaOrderShippingInfoBaseResponse notifyConfirmReceive(WxMaOrderShippingInfoNotifyConfirmRequest request)
throws WxErrorException;
/**
* 消息跳转路径设置接口
* 如你已经在小程序内接入平台提供的确认收货组件可以通过该接口设置发货消息及确认收货消息的跳转动作用户点击发货消息时会直接进入你的小程序订单列表页面或详情页面进行确认收货进一步优化用户体验
*
* @param path 商户自定义跳转路径
* @return WxMaOrderShippingInfoBaseResponse
* @throws WxErrorException e
*/
WxMaOrderShippingInfoBaseResponse setMsgJumpPath(String path)
throws WxErrorException;
}

View File

@ -496,36 +496,49 @@ public interface WxMaService extends WxService {
/**
* 分享人接口
*
* @return WxMaShopSharerService
*/
WxMaShopSharerService getShopSharerService();
/**
* 标准交易组件接口
*
* @return WxMaProductService
*/
WxMaProductService getProductService();
/**
* 小商店-标准交易组件-订单服务
*
* @return getProductOrderService
*/
WxMaProductOrderService getProductOrderService();
/**
* 小商店-标准交易组件-优惠券
*
* @return getWxMaShopCouponService
*/
WxMaShopCouponService getWxMaShopCouponService();
/**
* 小程序支付管理-订单支付
*
* @return getWxMaShopPayService
*/
WxMaShopPayService getWxMaShopPayService();
/**
* 小程序发货信息管理服务
*
* @return getWxMaOrderShippingService
*/
WxMaOrderShippingService getWxMaOrderShippingService();
/**
* 小程序openApi管理
*
* @return getWxMaOpenApiService
*/
WxMaOpenApiService getWxMaOpenApiService();

View File

@ -85,7 +85,11 @@ public abstract class BaseWxMaServiceImpl<H, P> implements WxMaService, RequestH
private final WxMaProductOrderService productOrderService = new WxMaProductOrderServiceImpl(this);
private final WxMaShopCouponService wxMaShopCouponService = new WxMaShopCouponServiceImpl(this);
private final WxMaShopPayService wxMaShopPayService = new WxMaShopPayServiceImpl(this);
private final WxMaOrderShippingService wxMaOrderShippingService = new WxMaOrderShippingServiceImpl(this);
private final WxMaOpenApiService wxMaOpenApiService = new WxMaOpenApiServiceImpl(this);
private Map<String, WxMaConfig> configMap;
private int retrySleepMillis = 1000;
private int maxRetryTimes = 5;
@ -602,10 +606,14 @@ public abstract class BaseWxMaServiceImpl<H, P> implements WxMaService, RequestH
}
@Override
public WxMaDeviceSubscribeService getDeviceSubscribeService(){ return this.deviceSubscribeService; }
public WxMaDeviceSubscribeService getDeviceSubscribeService() {
return this.deviceSubscribeService;
}
@Override
public WxMaMarketingService getMarketingService() {return this.marketingService; }
public WxMaMarketingService getMarketingService() {
return this.marketingService;
}
@Override
public WxMaImmediateDeliveryService getWxMaImmediateDeliveryService() {
@ -613,13 +621,19 @@ public abstract class BaseWxMaServiceImpl<H, P> implements WxMaService, RequestH
}
@Override
public WxMaSafetyRiskControlService getSafetyRiskControlService(){ return this.safetyRiskControlService; }
public WxMaSafetyRiskControlService getSafetyRiskControlService() {
return this.safetyRiskControlService;
}
@Override
public WxMaShopSharerService getShopSharerService() {return this.shopSharerService; }
public WxMaShopSharerService getShopSharerService() {
return this.shopSharerService;
}
@Override
public WxMaProductService getProductService() { return this.productService; }
public WxMaProductService getProductService() {
return this.productService;
}
@Override
public WxMaProductOrderService getProductOrderService() {
@ -636,6 +650,16 @@ public abstract class BaseWxMaServiceImpl<H, P> implements WxMaService, RequestH
return this.wxMaShopPayService;
}
/**
* 小程序发货信息管理服务
*
* @return getWxMaOrderShippingService
*/
@Override
public WxMaOrderShippingService getWxMaOrderShippingService() {
return this.wxMaOrderShippingService;
}
@Override
public WxMaOpenApiService getWxMaOpenApiService() {
return this.wxMaOpenApiService;

View File

@ -0,0 +1,134 @@
package cn.binarywang.wx.miniapp.api.impl;
import cn.binarywang.wx.miniapp.api.WxMaOrderShippingService;
import cn.binarywang.wx.miniapp.api.WxMaService;
import cn.binarywang.wx.miniapp.bean.shop.request.WxMaOrderShippingIsTradeManagedRequest;
import cn.binarywang.wx.miniapp.bean.shop.request.shipping.*;
import cn.binarywang.wx.miniapp.bean.shop.response.WxMaOrderShippingInfoBaseResponse;
import cn.binarywang.wx.miniapp.bean.shop.response.WxMaOrderShippingInfoGetListResponse;
import cn.binarywang.wx.miniapp.bean.shop.response.WxMaOrderShippingInfoGetResponse;
import cn.binarywang.wx.miniapp.bean.shop.response.WxMaOrderShippingIsTradeManagedResponse;
import cn.binarywang.wx.miniapp.json.WxMaGsonBuilder;
import com.google.gson.JsonObject;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import me.chanjar.weixin.common.api.WxConsts;
import me.chanjar.weixin.common.enums.WxType;
import me.chanjar.weixin.common.error.WxError;
import me.chanjar.weixin.common.error.WxErrorException;
import me.chanjar.weixin.common.util.json.GsonHelper;
import me.chanjar.weixin.common.util.json.GsonParser;
import static cn.binarywang.wx.miniapp.constant.WxMaApiUrlConstants.OrderShipping.*;
import static cn.binarywang.wx.miniapp.constant.WxMaApiUrlConstants.Product.OTHER.GET_CATEGORY;
/**
* @author xzh
* created on 2023/5/17 17:44
*/
@Slf4j
@RequiredArgsConstructor
public class WxMaOrderShippingServiceImpl implements WxMaOrderShippingService {
private final WxMaService wxMaService;
/**
* 查询小程序是否已开通发货信息管理服务
*
* @param appId 待查询小程序的 appid非服务商调用时仅能查询本账号
* @return WxMaOrderShippingInfoBaseResponse
* @throws WxErrorException e
*/
@Override
public WxMaOrderShippingIsTradeManagedResponse isTradeManaged(String appId) throws WxErrorException {
WxMaOrderShippingIsTradeManagedRequest request = WxMaOrderShippingIsTradeManagedRequest.builder().appId(appId).build();
return request(IS_TRADE_MANAGED, request, WxMaOrderShippingIsTradeManagedResponse.class);
}
/**
* 发货信息录入接口
*
* @param request 请求
* @return WxMaOrderShippingInfoBaseResponse
* @throws WxErrorException e
*/
@Override
public WxMaOrderShippingInfoBaseResponse upload(WxMaOrderShippingInfoUploadRequest request) throws WxErrorException {
return request(UPLOAD_SHIPPING_INFO, request, WxMaOrderShippingInfoBaseResponse.class);
}
/**
* 发货信息合单录入接口
*
* @param request 请求
* @return WxMaOrderShippingInfoBaseResponse
* @throws WxErrorException e
*/
@Override
public WxMaOrderShippingInfoBaseResponse upload(WxMaOrderCombinedShippingInfoUploadRequest request) throws WxErrorException {
return request(UPLOAD_COMBINED_SHIPPING_INFO, request, WxMaOrderShippingInfoBaseResponse.class);
}
/**
* 查询订单发货状态
* 你可以通过交易单号或商户号+商户单号来查询该支付单的发货状态
*
* @param request 请求
* @return WxMaOrderShippingInfoGetResponse
* @throws WxErrorException e
*/
@Override
public WxMaOrderShippingInfoGetResponse get(WxMaOrderShippingInfoGetRequest request) throws WxErrorException {
return request(GET_SHIPPING_INFO, request, WxMaOrderShippingInfoGetResponse.class);
}
/**
* 查询订单列表
* 你可以通过支付时间支付者openid或订单状态来查询订单列表
*
* @param request 请求
* @return WxMaOrderShippingInfoGetListResponse
* @throws WxErrorException e
*/
@Override
public WxMaOrderShippingInfoGetListResponse getList(WxMaOrderShippingInfoGetListRequest request) throws WxErrorException {
return request(GET_SHIPPING_INFO_LIST, request, WxMaOrderShippingInfoGetListResponse.class);
}
/**
* 确认收货提醒接口
* 如你已经从你的快递物流服务方获知到用户已经签收相关商品可以通过该接口提醒用户及时确认收货以提高资金结算效率每个订单仅可调用一次
*
* @param request 请求
* @return WxMaOrderShippingInfoBaseResponse
* @throws WxErrorException e
*/
@Override
public WxMaOrderShippingInfoBaseResponse notifyConfirmReceive(WxMaOrderShippingInfoNotifyConfirmRequest request) throws WxErrorException {
return request(NOTIFY_CONFIRM_RECEIVE, request, WxMaOrderShippingInfoBaseResponse.class);
}
/**
* 消息跳转路径设置接口
* 如你已经在小程序内接入平台提供的确认收货组件可以通过该接口设置发货消息及确认收货消息的跳转动作用户点击发货消息时会直接进入你的小程序订单列表页面或详情页面进行确认收货进一步优化用户体验
*
* @param path 商户自定义跳转路径
* @return WxMaOrderShippingInfoBaseResponse
* @throws WxErrorException e
*/
@Override
public WxMaOrderShippingInfoBaseResponse setMsgJumpPath(String path) throws WxErrorException {
JsonObject jsonObject = GsonHelper.buildJsonObject("path", path);
return request(SET_MSG_JUMP_PATH, jsonObject, WxMaOrderShippingInfoBaseResponse.class);
}
private <T> T request(String url, Object request, Class<T> resultT) throws WxErrorException {
String responseContent = this.wxMaService.post(url, request);
JsonObject jsonObject = GsonParser.parse(responseContent);
if (jsonObject.get(WxConsts.ERR_CODE).getAsInt() != 0) {
throw new WxErrorException(WxError.fromJson(responseContent, WxType.MiniApp));
}
return WxMaGsonBuilder.create().fromJson(responseContent, resultT);
}
}

View File

@ -0,0 +1,30 @@
package cn.binarywang.wx.miniapp.bean.shop.request;
import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.List;
/**
* @author xzh
* created on 2023/5/17 17:01
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class WxMaOrderShippingIsTradeManagedRequest implements Serializable {
private static final long serialVersionUID = -5735132900385013330L;
/**
* 必填
* 待查询小程序的 appid非服务商调用时仅能查询本账号
*/
@SerializedName("appid")
private String appId;
}

View File

@ -0,0 +1,33 @@
package cn.binarywang.wx.miniapp.bean.shop.request.shipping;
import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @author xzh
* @Description
* @createTime 2023/07/10 10:38
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ContactBean implements Serializable {
private static final long serialVersionUID = 3388264169113920140L;
/**
* 寄件人联系方式寄件人联系方式采用掩码传输最后4位数字不能打掩码 示例值: `189****1234, 021-****1234, ****1234, 0**2-***1234, 0**2-******23-10, ****123-8008` 值限制: 0 value 1024
*/
@SerializedName("consignor_contact")
private String consignorContact;
/**
* 收件人联系方式收件人联系方式为采用掩码传输最后4位数字不能打掩码 示例值: `189****1234, 021-****1234, ****1234, 0**2-***1234, 0**2-******23-10, ****123-8008` 值限制: 0 value 1024
*/
@SerializedName("receiver_contact")
private String receiverContact;
}

View File

@ -0,0 +1,44 @@
package cn.binarywang.wx.miniapp.bean.shop.request.shipping;
import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @author xzh
* @Description
* @createTime 2023/07/10 10:37
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class OrderKeyBean implements Serializable {
private static final long serialVersionUID = -6322907878214196106L;
/**
* 必填
* 订单单号类型用于确认需要上传详情的订单枚举值1使用下单商户号和商户侧单号枚举值2使用微信支付单号
*/
@SerializedName("order_number_type")
private int orderNumberType;
/**
* 原支付交易对应的微信订单号
*/
@SerializedName("transaction_id")
private String transactionId;
/**
* 支付下单商户的商户号由微信支付生成并下发
*/
@SerializedName("mchid")
private String mchId;
/**
* 商户系统内部订单号只能是数字大小写字母`_-*`且在同一个商户号下唯一
*/
@SerializedName("out_trade_no")
private String outTradeNo;
}

View File

@ -0,0 +1,29 @@
package cn.binarywang.wx.miniapp.bean.shop.request.shipping;
import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @author xzh
* @Description
* @createTime 2023/07/10 10:38
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class PayerBean implements Serializable {
private static final long serialVersionUID = 6628077253606871512L;
/**
* 必填
* 用户标识用户在小程序appid下的唯一标识 下单前需获取到用户的Openid 示例值: oUpF8uMuAJO_M2pxb1Q9zNjWeS6o 字符字节限制: [1, 128]
*/
@SerializedName("openid")
private String openid;
}

View File

@ -0,0 +1,44 @@
package cn.binarywang.wx.miniapp.bean.shop.request.shipping;
import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @author xzh
* @Description
* @createTime 2023/07/10 10:39
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ShippingListBean implements Serializable {
private static final long serialVersionUID = -6554762808990702774L;
/**
* 物流单号物流快递发货时必填示例值: 323244567777 字符字节限制: [1, 128]
*/
@SerializedName("tracking_no")
private String trackingNo;
/**
* 物流公司编码快递公司ID参见查询物流公司编码列表物流快递发货时必填 示例值: DHL 字符字节限制: [1, 128]
*/
@SerializedName("express_company")
private String expressCompany;
/**
* 必填
* 商品信息例如微信红包抱枕*1个限120个字以内
*/
@SerializedName("item_desc")
private String itemDesc;
/**
* 联系方式当发货的物流公司为顺丰时联系方式为必填收件人或寄件人联系方式二选一
*/
@SerializedName("contact")
private ContactBean contact;
}

View File

@ -0,0 +1,96 @@
package cn.binarywang.wx.miniapp.bean.shop.request.shipping;
import cn.binarywang.wx.miniapp.bean.shop.request.shipping.ContactBean;
import cn.binarywang.wx.miniapp.bean.shop.request.shipping.OrderKeyBean;
import cn.binarywang.wx.miniapp.bean.shop.request.shipping.PayerBean;
import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.List;
/**
* @author xzh
* created on 2023/5/17 17:01
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class WxMaOrderCombinedShippingInfoUploadRequest implements Serializable {
private static final long serialVersionUID = -334322216049787167L;
/**
* 必填
* 订单需要上传物流信息的订单
*/
@SerializedName("order_key")
private OrderKeyBean orderKey;
@SerializedName("sub_orders")
private List<SubOrderBean> subOrders;
/**
* 必填
* 上传时间用于标识请求的先后顺序 示例值: `2022-12-15T13:29:35.120+08:00
*/
@SerializedName("upload_time")
private String uploadTime;
/**
* 必填
* 支付者支付者信息
*/
@SerializedName("payer")
private PayerBean payer;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public static class SubOrderBean implements Serializable {
private static final long serialVersionUID = -8999547192454376968L;
/**
* 必填
* 需要上传物流详情的子单订单订单类型与合单订单保持一致
*/
@SerializedName("order_key")
private OrderKeyBean orderKey;
/**
* 必填
* 物流模式发货方式枚举值1实体物流配送采用快递公司进行实体物流配送形式 2同城配送 3虚拟商品虚拟商品例如话费充值点卡等无实体配送形式 4用户自提
*/
@SerializedName("logistics_type")
private int logisticsType;
/**
* 必填
* 发货模式发货模式枚举值1UNIFIED_DELIVERY统一发货2SPLIT_DELIVERY分拆发货
* 示例值: UNIFIED_DELIVERY
*/
@SerializedName("delivery_mode")
private int deliveryMode;
/**
* 分拆发货模式时必填用于标识分拆发货模式下是否已全部发货完成只有全部发货完成的情况下才会向用户推送发货完成通知
* 示例值: true/false
*/
@SerializedName("is_all_delivered")
private Boolean isAllDelivered;
/**
* 子单物流信息列表 多重性: [1, 10]
*/
@SerializedName("shipping_list")
private List<ShippingListBean> shippingList;
}
}

View File

@ -0,0 +1,67 @@
package cn.binarywang.wx.miniapp.bean.shop.request.shipping;
import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @author xzh
* created on 2023/5/17 17:01
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class WxMaOrderShippingInfoGetListRequest implements Serializable {
private static final long serialVersionUID = -3682480001426075609L;
/**
* 支付时间所属范围
*/
@SerializedName("pay_time_range")
private PayTimeRange payTimeRange;
/**
* 订单状态枚举(1) 待发货(2) 已发货(3) 确认收货(4) 交易完成(5) 已退款
*/
@SerializedName("order_state")
private Integer orderState;
/**
* 支付者openid
*/
@SerializedName("openid")
private String openId;
/**
* 翻页时使用获取第一页时不用传入如果查询结果中 has_more 字段为 true则传入该次查询结果中返回的 last_index 字段可获取下一页
*/
@SerializedName("last_index")
private String lastIndex;
/**
* 翻页时使用返回列表的长度默认为100
*/
@SerializedName("page_size")
private Long pageSize;
@Data
public static class PayTimeRange implements Serializable {
private static final long serialVersionUID = -1477231289550635468L;
/**
* 起始时间时间戳形式不填则视为从0开始
*/
@SerializedName("begin_time")
private Long beginTime;
/**
* 结束时间时间戳形式不填则视为32位无符号整型的最大值
*/
@SerializedName("end_time")
private Long endTime;
}
}

View File

@ -0,0 +1,43 @@
package cn.binarywang.wx.miniapp.bean.shop.request.shipping;
import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @author xzh
* created on 2023/5/17 17:01
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class WxMaOrderShippingInfoGetRequest implements Serializable {
private static final long serialVersionUID = -6868378515860675152L;
/**
* 原支付交易对应的微信订单号
*/
@SerializedName("transaction_id")
private String transactionId;
/**
* 支付下单商户的商户号由微信支付生成并下发
*/
@SerializedName("merchant_id")
private String merchantId;
/**
* 二级商户号
*/
@SerializedName("sub_merchant_id")
private String subMerchantId;
/**
* 商户系统内部订单号只能是数字大小写字母`_-*`且在同一个商户号下唯一
*/
@SerializedName("merchant_trade_no")
private String merchantTradeNo;
}

View File

@ -0,0 +1,49 @@
package cn.binarywang.wx.miniapp.bean.shop.request.shipping;
import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @author xzh
* created on 2023/5/17 17:01
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class WxMaOrderShippingInfoNotifyConfirmRequest implements Serializable {
private static final long serialVersionUID = -6868378515860675152L;
/**
* 原支付交易对应的微信订单号
*/
@SerializedName("transaction_id")
private String transactionId;
/**
* 支付下单商户的商户号由微信支付生成并下发
*/
@SerializedName("merchant_id")
private String merchantId;
/**
* 二级商户号
*/
@SerializedName("sub_merchant_id")
private String subMerchantId;
/**
* 商户系统内部订单号只能是数字大小写字母`_-*`且在同一个商户号下唯一
*/
@SerializedName("merchant_trade_no")
private String merchantTradeNo;
/**
* 快递签收时间时间戳形式
*/
@SerializedName("received_time")
private Long receivedTime;
}

View File

@ -0,0 +1,74 @@
package cn.binarywang.wx.miniapp.bean.shop.request.shipping;
import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.List;
/**
* @author xzh
* created on 2023/5/17 17:01
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class WxMaOrderShippingInfoUploadRequest implements Serializable {
private static final long serialVersionUID = -334322216049787167L;
/**
* 必填
* 订单需要上传物流信息的订单
*/
@SerializedName("order_key")
private OrderKeyBean orderKey;
/**
* 必填
* 物流模式发货方式枚举值1实体物流配送采用快递公司进行实体物流配送形式 2同城配送 3虚拟商品虚拟商品例如话费充值点卡等无实体配送形式 4用户自提
*/
@SerializedName("logistics_type")
private int logisticsType;
/**
* 必填
* 发货模式发货模式枚举值1UNIFIED_DELIVERY统一发货2SPLIT_DELIVERY分拆发货
* 示例值: UNIFIED_DELIVERY
*/
@SerializedName("delivery_mode")
private int deliveryMode;
/**
* 分拆发货模式时必填用于标识分拆发货模式下是否已全部发货完成只有全部发货完成的情况下才会向用户推送发货完成通知
* 示例值: true/false
*/
@SerializedName("is_all_delivered")
private Boolean isAllDelivered;
/**
* 必填
* 物流信息列表发货物流单列表支持统一发货单个物流单和分拆发货多个物流单两种模式多重性: [1, 10]
*/
@SerializedName("shipping_list")
private List<ShippingListBean> shippingList;
/**
* 必填
* 上传时间用于标识请求的先后顺序 示例值: `2022-12-15T13:29:35.120+08:00
*/
@SerializedName("upload_time")
private String uploadTime;
/**
* 必填
* 支付者支付者信息
*/
@SerializedName("payer")
private PayerBean payer;
}

View File

@ -0,0 +1,187 @@
package cn.binarywang.wx.miniapp.bean.shop.response;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @author xzh
* created on 2023/5/17 17:01
*/
@Data
public class WxMaOrderShippingInfoBaseResponse implements Serializable {
private static final long serialVersionUID = -5414031943436195493L;
/**
* 错误码
*/
@SerializedName("errcode")
private Integer errCode;
/**
* 错误原因
*/
@SerializedName("errmsg")
private String errMsg;
//region 类型定义
@Data
public static class Order implements Serializable {
private static final long serialVersionUID = -1390355751615987663L;
/**
* 原支付交易对应的微信订单号
*/
@SerializedName("transaction_id")
private String transactionId;
/**
* 支付下单商户的商户号由微信支付生成并下发
*/
@SerializedName("merchant_id")
private String merchantId;
/**
* 二级商户号
*/
@SerializedName("sub_merchant_id")
private String subMerchantId;
/**
* 商户系统内部订单号只能是数字大小写字母`_-*`且在同一个商户号下唯一
*/
@SerializedName("merchant_trade_no")
private String merchantTradeNo;
/**
* 以分号连接的该支付单的所有商品描述当超过120字时自动截断并以 ... 结尾
*/
@SerializedName("description")
private String description;
/**
* 支付单实际支付金额整型单位分钱
*/
@SerializedName("paid_amount")
private Long paidAmount;
/**
* 支付者openid
*/
@SerializedName("openid")
private String openId;
/**
* 交易创建时间时间戳形式
*/
@SerializedName("trade_create_time")
private Long tradeCreateTime;
/**
* 支付时间时间戳形式
*/
@SerializedName("pay_time")
private Long payTime;
/**
* 订单状态枚举(1) 待发货(2) 已发货(3) 确认收货(4) 交易完成(5) 已退款
*/
@SerializedName("order_state")
private Integer orderState;
/**
* 是否处在交易纠纷中
*/
@SerializedName("in_complaint")
private Boolean inComplaint;
/**
* 发货信息
*/
@SerializedName("shipping")
private Shipping shipping;
}
@Data
public static class Shipping implements Serializable {
private static final long serialVersionUID = -3527308640256070121L;
/**
* 发货模式发货模式枚举值1UNIFIED_DELIVERY统一发货2SPLIT_DELIVERY分拆发货 示例值: UNIFIED_DELIVERY
*/
@SerializedName("delivery_mode")
private Integer deliveryMode;
/**
* 物流模式发货方式枚举值1实体物流配送采用快递公司进行实体物流配送形式 2同城配送 3虚拟商品虚拟商品例如话费充值点卡等无实体配送形式 4用户自提
*/
@SerializedName("logistics_type")
private Integer logisticsType;
/**
* 是否已完成全部发货
*/
@SerializedName("finish_shipping")
private Boolean finishShipping;
/**
* 在小程序后台发货信息录入页录入的商品描述
*/
@SerializedName("goods_desc")
private String goodsDesc;
/**
* 已完成全部发货的次数未完成时为 0完成时为 1重新发货并完成后为 2
*/
@SerializedName("finish_shipping_count")
private Integer finishShippingCount;
/**
* 物流信息列表发货物流单列表支持统一发货单个物流单和分拆发货多个物流单两种模式
*/
@SerializedName("shipping_list")
private List<ShippingItem> shippingList;
}
@Data
public static class ShippingItem implements Serializable {
private static final long serialVersionUID = 7064368114873624112L;
/**
* 物流单号示例值: "323244567777"
*/
@SerializedName("tracking_no")
private String trackingNo;
/**
* 同城配送公司名或物流公司编码快递公司ID参见查询物流公司编码列表 示例值: "DHL"
*/
@SerializedName("express_company")
private String expressCompany;
/**
* 使用上传物流信息 API 录入的该物流信息的商品描述
*/
@SerializedName("goods_desc")
private String goodsDesc;
/**
* 该物流信息的上传时间时间戳形式
*/
@SerializedName("upload_time")
private Long uploadTime;
/**
* 联系方式
*/
@SerializedName("contact")
private Contact contact;
}
@Data
public static class Contact implements Serializable {
private static final long serialVersionUID = -320914533207502380L;
/**
* 寄件人联系方式
*/
@SerializedName("consignor_contact")
private String consignorContact;
/**
* 收件人联系方式
*/
@SerializedName("receiver_contact")
private String receiverContact;
}
//endregion
}

View File

@ -0,0 +1,34 @@
package cn.binarywang.wx.miniapp.bean.shop.response;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @author xzh
* created on 2023/5/17 17:01
*/
@Data
public class WxMaOrderShippingInfoGetListResponse extends WxMaOrderShippingInfoBaseResponse implements Serializable {
private static final long serialVersionUID = -5414031943436195493L;
/**
* 翻页时使用
*/
@SerializedName("last_index")
private String lastIndex;
/**
* 是否还有更多支付单
*/
@SerializedName("has_more")
private Boolean hasMore;
/**
* 支付单信息列表
*/
@SerializedName("order_list")
private List<Order> orderList;
}

View File

@ -0,0 +1,22 @@
package cn.binarywang.wx.miniapp.bean.shop.response;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import java.io.Serializable;
/**
* @author xzh
* created on 2023/5/17 17:01
*/
@Data
public class WxMaOrderShippingInfoGetResponse extends WxMaOrderShippingInfoBaseResponse implements Serializable {
private static final long serialVersionUID = -5414031943436195493L;
/**
* 支付单信息
*/
@SerializedName("order")
private Order order;
}

View File

@ -0,0 +1,33 @@
package cn.binarywang.wx.miniapp.bean.shop.response;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import java.io.Serializable;
/**
* @author xzh
* created on 2023/5/17 17:01
*/
@Data
public class WxMaOrderShippingIsTradeManagedResponse implements Serializable {
private static final long serialVersionUID = -5397007157487018762L;
/**
* 错误码
*/
@SerializedName("errcode")
private Integer errCode;
/**
* 错误原因
*/
@SerializedName("errmsg")
private String errMsg;
/**
* 是否已开通小程序发货信息管理服务
*/
@SerializedName("is_trade_managed")
private Boolean tradeManaged;
}

View File

@ -764,4 +764,69 @@ public class WxMaApiUrlConstants {
}
/**
* 发货信息管理服务相关接口
* <pre>
* 文档地址 https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/order-shipping/order-shipping.html#%E4%B8%80%E3%80%81%E5%8F%91%E8%B4%A7%E4%BF%A1%E6%81%AF%E5%BD%95%E5%85%A5%E6%8E%A5%E5%8F%A3
* </pre>
*/
public interface OrderShipping {
/**
* 查询小程序是否已开通发货信息管理服务.
* <pre>
* 文档地址https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/order-shipping/order-shipping.html#%E4%B8%83%E3%80%81%E6%9F%A5%E8%AF%A2%E5%B0%8F%E7%A8%8B%E5%BA%8F%E6%98%AF%E5%90%A6%E5%B7%B2%E5%BC%80%E9%80%9A%E5%8F%91%E8%B4%A7%E4%BF%A1%E6%81%AF%E7%AE%A1%E7%90%86%E6%9C%8D%E5%8A%A1
* </pre>
*/
String IS_TRADE_MANAGED = "https://api.weixin.qq.com/wxa/sec/order/is_trade_managed";
/**
* 发货信息录入接口.
* <pre>
* 文档地址https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/order-shipping/order-shipping.html#%E4%B8%80%E3%80%81%E5%8F%91%E8%B4%A7%E4%BF%A1%E6%81%AF%E5%BD%95%E5%85%A5%E6%8E%A5%E5%8F%A3
* </pre>
*/
String UPLOAD_SHIPPING_INFO = "https://api.weixin.qq.com/wxa/sec/order/upload_shipping_info";
/**
* 发货信息合单录入接口.
* <pre>
* 文档地址https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/order-shipping/order-shipping.html#%E4%BA%8C%E3%80%81%E5%8F%91%E8%B4%A7%E4%BF%A1%E6%81%AF%E5%90%88%E5%8D%95%E5%BD%95%E5%85%A5%E6%8E%A5%E5%8F%A3
* </pre>
*/
String UPLOAD_COMBINED_SHIPPING_INFO = "https://api.weixin.qq.com/wxa/sec/order/upload_combined_shipping_info";
/**
* 查询订单发货状态.
* <pre>
* 文档地址https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/order-shipping/order-shipping.html#%E4%BA%8C%E3%80%81%E5%8F%91%E8%B4%A7%E4%BF%A1%E6%81%AF%E5%90%88%E5%8D%95%E5%BD%95%E5%85%A5%E6%8E%A5%E5%8F%A3
* </pre>
*/
String GET_SHIPPING_INFO = "https://api.weixin.qq.com/wxa/sec/order/get_order";
/**
* 查询订单发货状态列表.
* <pre>
* 文档地址https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/order-shipping/order-shipping.html#%E5%9B%9B%E3%80%81%E6%9F%A5%E8%AF%A2%E8%AE%A2%E5%8D%95%E5%88%97%E8%A1%A8
* </pre>
*/
String GET_SHIPPING_INFO_LIST = "https://api.weixin.qq.com/wxa/sec/order/get_order_list";
/**
* 确认收货提醒接口.
* <pre>
* 文档地址https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/order-shipping/order-shipping.html#%E4%BA%94%E3%80%81%E7%A1%AE%E8%AE%A4%E6%94%B6%E8%B4%A7%E6%8F%90%E9%86%92%E6%8E%A5%E5%8F%A3
* </pre>
*/
String NOTIFY_CONFIRM_RECEIVE = "https://api.weixin.qq.com/wxa/sec/order/notify_confirm_receive";
/**
* 消息跳转路径设置接口.
* <pre>
* 文档地址https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/business-capabilities/order-shipping/order-shipping.html#%E5%85%AD%E3%80%81%E6%B6%88%E6%81%AF%E8%B7%B3%E8%BD%AC%E8%B7%AF%E5%BE%84%E8%AE%BE%E7%BD%AE%E6%8E%A5%E5%8F%A3
* </pre>
*/
String SET_MSG_JUMP_PATH = "https://api.weixin.qq.com/wxa/sec/order/set_msg_jump_path";
}
}

View File

@ -8,6 +8,7 @@ import me.chanjar.weixin.mp.api.WxMpService;
import me.chanjar.weixin.open.bean.WxOpenCreateResult;
import me.chanjar.weixin.open.bean.WxOpenGetResult;
import me.chanjar.weixin.open.bean.WxOpenMaCodeTemplate;
import me.chanjar.weixin.open.bean.ma.WxOpenMaApplyOrderPathInfo;
import me.chanjar.weixin.open.bean.message.WxOpenXmlMessage;
import me.chanjar.weixin.open.bean.minishop.*;
import me.chanjar.weixin.open.bean.minishop.coupon.WxMinishopCoupon;
@ -1097,4 +1098,20 @@ public interface WxOpenComponentService {
*/
WxOpenResult clearQuotaV2(String appid) throws WxErrorException;
//////////////////////////////////////////////////////////////
/**
* 申请设置订单页path信息
*/
String OPEN_APPLY_SET_ORDER_PATH_INFO = "https://api.weixin.qq.com/wxa/security/applysetorderpathinfo";
/**
* 申请设置订单页path信息
* 注意一次提交不超过100个appid
*
* @param info 订单页path信息
* @return .
* @throws WxErrorException .
*/
WxOpenResult applySetOrderPathInfo(WxOpenMaApplyOrderPathInfo info) throws WxErrorException;
}

View File

@ -2,6 +2,7 @@ package me.chanjar.weixin.open.api;
import me.chanjar.weixin.common.error.WxErrorException;
import me.chanjar.weixin.open.bean.ma.WxFastMaCategory;
import me.chanjar.weixin.open.bean.ma.WxOpenMaApplyOrderPathInfo;
import me.chanjar.weixin.open.bean.result.*;
import java.util.List;
@ -69,6 +70,11 @@ public interface WxOpenMaBasicService {
*/
String OPEN_MODIFY_CATEGORY = "https://api.weixin.qq.com/cgi-bin/wxopen/modifycategory";
/**
* 获取订单页path信息
*/
String OPEN_GET_ORDER_PATH_INFO = "https://api.weixin.qq.com/wxa/security/getorderpathinfo";
/**
* 1.获取小程序的信息
@ -196,4 +202,13 @@ public interface WxOpenMaBasicService {
* @throws WxErrorException .
*/
WxOpenResult modifyCategory(WxFastMaCategory category) throws WxErrorException;
/**
* 获取订单页Path信息
*
* @param infoType 0:线上版1:审核版
* @return 订单页Path信息
* @throws WxErrorException .
*/
WxOpenMaGetOrderPathResult getOrderPathInfo(int infoType) throws WxErrorException;
}

View File

@ -684,6 +684,12 @@ public interface WxOpenMaService extends WxMaService {
*/
WxOpenMaPrivacyService getPrivacyService();
/**
* 购物订单
* @return 购物订单服务
*/
WxOpenMaShoppingOrdersService getShoppingOrdersService();
/**
* 小程序审核 提审素材上传接口
*

View File

@ -0,0 +1,111 @@
package me.chanjar.weixin.open.api;
import me.chanjar.weixin.common.error.WxErrorException;
import me.chanjar.weixin.open.bean.result.WxOpenResult;
import me.chanjar.weixin.open.bean.shoppingOrders.*;
/**
* @author xzh
* created on 2023/5/17 16:49
*/
public interface WxOpenMaShoppingOrdersService {
/**
* 上传购物详情
*/
String UPLOAD_SHOPPING_INFO = "https://api.weixin.qq.com/user-order/orders";
/**
* 上传物流信息
*/
String UPLOAD_SHIPPING_INFO = "https://api.weixin.qq.com/user-order/orders/shippings";
/**
* 上传合单购物详情
*/
String UPLOAD_COMBINED_SHOPPING_INFO = "https://api.weixin.qq.com/user-order/combine-orders";
/**
* 上传合单物流信息
*/
String UPLOAD_COMBINED_SHIPPING_INFO = "https://api.weixin.qq.com/user-order/combine-orders/shippings";
/**
* 开通购物订单产品权限
*/
String OPEN_SHOPPING_ORDER_PRODUCT_PERMISSION = "https://api.weixin.qq.com/user-order/orders-permission/open";
/**
* 提交购物订单接入审核
*/
String CONFIRM_PRODUCT_PERMISSION = "https://api.weixin.qq.com/user-order/orders-permission/confirm";
/**
* 验证购物订单上传结果
*/
String SHOPPING_INFO_VERIFY_UPLOAD_RESULT = "https://api.weixin.qq.com/user-order/shoppinginfo/verify";
/**
* 上传购物详情
*
* @param info 购物详情
* @return WxOpenResult
* @throws WxErrorException
*/
WxOpenResult upload(ShoppingInfo info) throws WxErrorException;
/**
* 上传物流信息
*
* @param info 物流信息
* @return WxOpenResult
* @throws WxErrorException
*/
WxOpenResult upload(ShippingInfo info) throws WxErrorException;
/**
* 上传合单购物详情
*
* @param info 购物详情
* @return WxOpenResult
* @throws WxErrorException
*/
WxOpenResult upload(CombinedShoppingInfo info) throws WxErrorException;
/**
* 上传合单物流信息
*
* @param info 物流信息
* @return WxOpenResult
* @throws WxErrorException
*/
WxOpenResult upload(CombinedShippingInfo info) throws WxErrorException;
/**
* 开通购物订单产品权限
*
* @return WxOpenResult
* @throws WxErrorException
*/
WxOpenResult openShoppingOrderProductPermission() throws WxErrorException;
/**
* 提交购物订单接入审核
*
* @return WxOpenShoppingOrdersConfirmResult
* @throws WxErrorException
*/
WxOpenShoppingOrdersConfirmResult confirmProductPermission() throws WxErrorException;
/**
* 验证购物订单上传结果
*
* @param info 信息
* @return WxOpenResult
* @throws WxErrorException
*/
WxOpenShoppingInfoVerifyUploadResult verifyUploadResult(ShoppingInfoVerifyUpload info) throws WxErrorException;
}

View File

@ -21,6 +21,7 @@ import me.chanjar.weixin.mp.api.WxMpService;
import me.chanjar.weixin.open.api.*;
import me.chanjar.weixin.open.bean.*;
import me.chanjar.weixin.open.bean.auth.WxOpenAuthorizationInfo;
import me.chanjar.weixin.open.bean.ma.WxOpenMaApplyOrderPathInfo;
import me.chanjar.weixin.open.bean.message.WxOpenXmlMessage;
import me.chanjar.weixin.open.bean.minishop.*;
import me.chanjar.weixin.open.bean.minishop.coupon.WxMinishopCoupon;
@ -1237,7 +1238,7 @@ public class WxOpenComponentServiceImpl implements WxOpenComponentService {
public GetShareCloudBaseEnvResponse getShareCloudBaseEnv(List<String> appids) throws WxErrorException {
JsonObject jsonObject = new JsonObject();
JsonArray jsonArray = new JsonArray();
for(String appId : appids) {
for (String appId : appids) {
jsonArray.add(appId);
}
jsonObject.add("appids", jsonArray);
@ -1275,4 +1276,19 @@ public class WxOpenComponentServiceImpl implements WxOpenComponentService {
String response = getWxOpenService().post(COMPONENT_CLEAR_QUOTA_URL, jsonObject.toString());
return WxOpenResult.fromJson(response);
}
/**
* 申请设置订单页path信息
* 注意一次提交不超过100个appid
*
* @param info 订单页path信息
* @return .
* @throws WxErrorException .
*/
@Override
public WxOpenResult applySetOrderPathInfo(WxOpenMaApplyOrderPathInfo info) throws WxErrorException {
Gson gson = new Gson();
String response = post(OPEN_APPLY_SET_ORDER_PATH_INFO, gson.toJson(info));
return WxOpenGsonBuilder.create().fromJson(response, WxOpenResult.class);
}
}

View File

@ -8,6 +8,7 @@ import me.chanjar.weixin.common.error.WxErrorException;
import me.chanjar.weixin.open.api.WxOpenComponentService;
import me.chanjar.weixin.open.api.WxOpenFastMaService;
import me.chanjar.weixin.open.bean.ma.WxFastMaCategory;
import me.chanjar.weixin.open.bean.ma.WxOpenMaApplyOrderPathInfo;
import me.chanjar.weixin.open.bean.result.*;
import me.chanjar.weixin.open.util.json.WxOpenGsonBuilder;
@ -141,6 +142,18 @@ public class WxOpenFastMaServiceImpl extends WxMaServiceImpl implements WxOpenFa
return WxOpenGsonBuilder.create().fromJson(response, WxOpenResult.class);
}
/**
* 获取订单页Path信息
*
* @param infoType 0:线上版1:审核版
* @return 订单页Path信息
* @throws WxErrorException .
*/
@Override
public WxOpenMaGetOrderPathResult getOrderPathInfo(int infoType) throws WxErrorException {
throw new UnsupportedOperationException();
}
private JsonArray toJsonArray(List<String> strList) {
JsonArray jsonArray = new JsonArray();
if (strList != null && !strList.isEmpty()) {

View File

@ -6,6 +6,7 @@ import com.google.gson.JsonObject;
import me.chanjar.weixin.common.error.WxErrorException;
import me.chanjar.weixin.open.api.WxOpenMaBasicService;
import me.chanjar.weixin.open.bean.ma.WxFastMaCategory;
import me.chanjar.weixin.open.bean.ma.WxOpenMaApplyOrderPathInfo;
import me.chanjar.weixin.open.bean.result.*;
import me.chanjar.weixin.open.util.json.WxOpenGsonBuilder;
@ -123,6 +124,21 @@ public class WxOpenMaBasicServiceImpl implements WxOpenMaBasicService {
return WxOpenGsonBuilder.create().fromJson(response, WxOpenResult.class);
}
/**
* 获取订单页Path信息
*
* @param infoType 0:线上版1:审核版
* @return 订单页Path信息
* @throws WxErrorException .
*/
@Override
public WxOpenMaGetOrderPathResult getOrderPathInfo(int infoType) throws WxErrorException {
JsonObject params = new JsonObject();
params.addProperty("info_type", infoType);
String response = wxMaService.post(OPEN_GET_ORDER_PATH_INFO, params);
return WxOpenGsonBuilder.create().fromJson(response, WxOpenMaGetOrderPathResult.class);
}
private JsonArray toJsonArray(List<String> strList) {
JsonArray jsonArray = new JsonArray();
if (strList != null && !strList.isEmpty()) {

View File

@ -13,10 +13,7 @@ import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import lombok.Getter;
import me.chanjar.weixin.common.error.WxErrorException;
import me.chanjar.weixin.open.api.WxOpenComponentService;
import me.chanjar.weixin.open.api.WxOpenMaBasicService;
import me.chanjar.weixin.open.api.WxOpenMaPrivacyService;
import me.chanjar.weixin.open.api.WxOpenMaService;
import me.chanjar.weixin.open.api.*;
import me.chanjar.weixin.open.bean.ma.WxMaPrefetchDomain;
import me.chanjar.weixin.open.bean.ma.WxMaQrcodeParam;
import me.chanjar.weixin.open.bean.ma.WxMaScheme;
@ -46,6 +43,8 @@ public class WxOpenMaServiceImpl extends WxMaServiceImpl implements WxOpenMaServ
private final WxOpenMaBasicService basicService;
@Getter
private final WxOpenMaPrivacyService privacyService;
@Getter
private final WxOpenMaShoppingOrdersService shoppingOrdersService;
public WxOpenMaServiceImpl(WxOpenComponentService wxOpenComponentService, String appId, WxMaConfig wxMaConfig) {
this.wxOpenComponentService = wxOpenComponentService;
@ -53,6 +52,7 @@ public class WxOpenMaServiceImpl extends WxMaServiceImpl implements WxOpenMaServ
this.wxMaConfig = wxMaConfig;
this.basicService = new WxOpenMaBasicServiceImpl(this);
this.privacyService = new WxOpenMaPrivacyServiceImpl(this);
this.shoppingOrdersService = new WxOpenMaShoppingOrdersServiceImpl(this);
initHttp();
}
@ -450,8 +450,8 @@ public class WxOpenMaServiceImpl extends WxMaServiceImpl implements WxOpenMaServ
@Override
public WxOpenMaApplyLiveInfoResult applyLiveInfo() throws WxErrorException {
JsonObject params = new JsonObject();
params.addProperty("action","apply");
params.addProperty("action", "apply");
String response = post(API_WX_APPLY_LIVE_INFO, GSON.toJson(params));
return WxMaGsonBuilder.create().fromJson(response,WxOpenMaApplyLiveInfoResult.class);
return WxMaGsonBuilder.create().fromJson(response, WxOpenMaApplyLiveInfoResult.class);
}
}

View File

@ -0,0 +1,107 @@
package me.chanjar.weixin.open.api.impl;
import cn.binarywang.wx.miniapp.api.WxMaService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import me.chanjar.weixin.common.error.WxErrorException;
import me.chanjar.weixin.open.api.WxOpenMaShoppingOrdersService;
import me.chanjar.weixin.open.bean.result.WxOpenResult;
import me.chanjar.weixin.open.bean.shoppingOrders.*;
import me.chanjar.weixin.open.util.json.WxOpenGsonBuilder;
@Slf4j
@AllArgsConstructor
public class WxOpenMaShoppingOrdersServiceImpl implements WxOpenMaShoppingOrdersService {
private final WxMaService wxMaService;
/**
* 上传购物详情
*
* @param info 购物详情
* @return WxOpenResult
* @throws WxErrorException
*/
@Override
public WxOpenResult upload(ShoppingInfo info) throws WxErrorException {
String response = wxMaService.post(UPLOAD_SHOPPING_INFO, WxOpenGsonBuilder.create().toJson(info));
return WxOpenGsonBuilder.create().fromJson(response, WxOpenResult.class);
}
/**
* 上传物流信息
*
* @param info 物流信息
* @return WxOpenResult
* @throws WxErrorException
*/
@Override
public WxOpenResult upload(ShippingInfo info) throws WxErrorException {
String response = wxMaService.post(UPLOAD_SHIPPING_INFO, WxOpenGsonBuilder.create().toJson(info));
return WxOpenGsonBuilder.create().fromJson(response, WxOpenResult.class);
}
/**
* 上传合单购物详情
*
* @param info 购物详情
* @return WxOpenResult
* @throws WxErrorException
*/
@Override
public WxOpenResult upload(CombinedShoppingInfo info) throws WxErrorException {
String response = wxMaService.post(UPLOAD_COMBINED_SHOPPING_INFO, WxOpenGsonBuilder.create().toJson(info));
return WxOpenGsonBuilder.create().fromJson(response, WxOpenResult.class);
}
/**
* 上传合单物流信息
*
* @param info 物流信息
* @return WxOpenResult
* @throws WxErrorException
*/
@Override
public WxOpenResult upload(CombinedShippingInfo info) throws WxErrorException {
String response = wxMaService.post(UPLOAD_COMBINED_SHIPPING_INFO, WxOpenGsonBuilder.create().toJson(info));
return WxOpenGsonBuilder.create().fromJson(response, WxOpenResult.class);
}
/**
* 开通购物订单产品权限
*
* @return WxOpenResult
* @throws WxErrorException
*/
@Override
public WxOpenResult openShoppingOrderProductPermission() throws WxErrorException {
String response = wxMaService.post(OPEN_SHOPPING_ORDER_PRODUCT_PERMISSION, "");
return WxOpenGsonBuilder.create().fromJson(response, WxOpenResult.class);
}
/**
* 提交购物订单接入审核
*
* @return WxOpenShoppingOrdersConfirmResult
* @throws WxErrorException
*/
@Override
public WxOpenShoppingOrdersConfirmResult confirmProductPermission() throws WxErrorException {
String response = wxMaService.post(CONFIRM_PRODUCT_PERMISSION, "");
return WxOpenGsonBuilder.create().fromJson(response, WxOpenShoppingOrdersConfirmResult.class);
}
/**
* 验证购物订单上传结果
*
* @param info 信息
* @return WxOpenResult
* @throws WxErrorException
*/
@Override
public WxOpenShoppingInfoVerifyUploadResult verifyUploadResult(ShoppingInfoVerifyUpload info) throws WxErrorException {
String response = wxMaService.post(SHOPPING_INFO_VERIFY_UPLOAD_RESULT, WxOpenGsonBuilder.create().toJson(info));
return WxOpenGsonBuilder.create().fromJson(response, WxOpenShoppingInfoVerifyUploadResult.class);
}
}

View File

@ -0,0 +1,74 @@
package me.chanjar.weixin.open.bean.ma;
import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.List;
/**
* @author xzh
* @Description 申请设置订单页path信息 接口的相关信息
* @createTime 2023/05/23 15:19
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class WxOpenMaApplyOrderPathInfo implements Serializable {
private static final long serialVersionUID = -1812688861780119219L;
/**
* 批量申请的信息
*/
@SerializedName("batch_req")
private BatchReqBean batchReq;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public static class BatchReqBean implements Serializable {
private static final long serialVersionUID = 1816976472441827961L;
/**
* 申请提交的订单页path
*/
@SerializedName("path")
private String path;
/**
* 申请提交的图片url审核版会显示
*/
@SerializedName("img_list")
private List<String> imgList;
/**
* 申请提交的视频url审核版会显示
*/
@SerializedName("video")
private String video;
/**
* 申请提交的测试账号审核版会显示
*/
@SerializedName("test_account")
private String testAccount;
/**
* 申请提交的测试密码审核版会显示
*/
@SerializedName("test_pwd")
private String testPwd;
/**
* 申请提交的测试备注审核版会显示
*/
@SerializedName("test_remark")
private String testRemark;
/**
* 申请提交的批量的appid
* NOTE: 一次提交不超过100个appid
*/
@SerializedName("appid_list")
private List<String> appIdList;
}
}

View File

@ -0,0 +1,75 @@
package me.chanjar.weixin.open.bean.result;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.util.List;
/**
* @author xzh
* @Description 获取订单页path信息接口返回结果
* @createTime 2023/05/23 15:07
*/
@Data
@EqualsAndHashCode(callSuper = true)
public class WxOpenMaGetOrderPathResult extends WxOpenResult {
private static final long serialVersionUID = 1988636135032104851L;
/**
* 订单页path信息
*/
@SerializedName("msg")
private MsgBean msg;
@Data
public static class MsgBean implements Serializable {
private static final long serialVersionUID = 2153432209800394925L;
/**
* 订单页path
*/
@SerializedName("path")
private String path;
/**
* 申请提交的图片url审核版会显示
*/
@SerializedName("img_list")
private List<String> imgList;
/**
* 申请提交的视频url审核版会显示
*/
@SerializedName("video")
private String video;
/**
* 申请提交的测试账号审核版会显示
*/
@SerializedName("test_account")
private String testAccount;
/**
* 申请提交的测试密码审核版会显示
*/
@SerializedName("test_pwd")
private String testPwd;
/**
* 申请提交的测试备注审核版会显示
*/
@SerializedName("test_remark")
private String testRemark;
/**
* 申请状态说明
* 2 审核中
* 3 审核失败
* 4 审核通过
*/
@SerializedName("status")
private int status;
/**
* 申请时间
*/
@SerializedName("apply_time")
private long applyTime;
}
}

View File

@ -0,0 +1,77 @@
package me.chanjar.weixin.open.bean.shoppingOrders;
import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.List;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class CombinedShippingInfo implements Serializable {
private static final long serialVersionUID = -2338140924295957062L;
/**
* 必填
* 合单订单需要上传物流详情的合单订单根据订单类型二选一
*/
@SerializedName("order_key")
private OrderKeyBean orderKey;
/**
* 子单物流详情
*/
@SerializedName("sub_orders")
private List<SubOrderListBean> subOrders;
/**
* 必填
* 支付者支付者信息
*/
@SerializedName("payer")
private PayerBean payer;
/**
* 必填
* 上传时间用于标识请求的先后顺序 示例值: `2022-12-15T13:29:35.120+08:00
*/
@SerializedName("upload_time")
private String uploadTime;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public static class SubOrderListBean implements Serializable {
private static final long serialVersionUID = -8792281478692710237L;
/**
* 必填
* 订单需要上传购物详情的订单根据订单类型二选一
*/
@SerializedName("order_key")
private OrderKeyBean orderKey;
/**
* 必填
* 发货模式发货模式枚举值1UNIFIED_DELIVERY统一发货2SPLIT_DELIVERY分拆发货
* 示例值: UNIFIED_DELIVERY
*/
@SerializedName("delivery_mode")
private int deliveryMode;
/**
* 必填
* 物流信息列表发货物流单列表支持统一发货单个物流单和分拆发货多个物流单两种模式多重性: [1, 10]
*/
@SerializedName("shipping_list")
private List<ShippingListBean> shippingList;
}
}

View File

@ -0,0 +1,88 @@
package me.chanjar.weixin.open.bean.shoppingOrders;
import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.List;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class CombinedShoppingInfo implements Serializable {
private static final long serialVersionUID = 8325009858985444023L;
/**
* 必填
* 合单订单需要上传购物详情的合单订单根据订单类型二选一
*/
@SerializedName("order_key")
private OrderKeyBean orderKey;
/**
* 子单购物详情
*/
@SerializedName("sub_orders")
private List<SubOrderListBean> subOrders;
/**
* 必填
* 支付者支付者信息
*/
@SerializedName("payer")
private PayerBean payer;
/**
* 必填
* 上传时间用于标识请求的先后顺序 示例值: `2022-12-15T13:29:35.120+08:00
*/
@SerializedName("upload_time")
private String uploadTime;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public static class SubOrderListBean implements Serializable {
private static final long serialVersionUID = -8792281478692710237L;
/**
* 必填
* 订单需要上传购物详情的订单根据订单类型二选一
*/
@SerializedName("order_key")
private OrderKeyBean orderKey;
/**
* 必填
* 商户交易订单编号商户侧的交易订单详情页向用户展示的订单编号
* 示例值: 232457563423 字符字节限制: [1, 64]
*/
@SerializedName("merchant_order_no")
private String merchantOrderNo;
/**
* 必填
* 商户交易订单详情页链接用户查看商城订单跳转至商户侧查看交易订单详情页的链接详情页类别可以为H5或小程序
*/
@SerializedName("order_detail_jump_link")
private ShoppingInfo.OrderDetailBean orderDetailJumpLink;
/**
* 订单购买的商品列表用户在订单中购买的全部商品明细的列表最多可以上传50个商品
* 多重性: [1, 50]
*/
@SerializedName("item_list")
private List<ShoppingInfo.OrderItemListBean> itemList;
/**
* 物流形式订单商品配送的物流形式默认为实体物流
* 物流模式发货方式枚举值1实体物流配送采用快递公司进行实体物流配送形式 2同城配送 3虚拟商品虚拟商品例如话费充值点卡等无实体配送形式 4用户自提
*/
@SerializedName("logistics_type")
private int logisticsType;
}
}

View File

@ -0,0 +1,27 @@
package me.chanjar.weixin.open.bean.shoppingOrders;
import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ContactBean implements Serializable {
private static final long serialVersionUID = 2256209964320569284L;
/**
* 寄件人联系方式寄件人联系方式采用掩码传输最后4位数字不能打掩码 示例值: `189****1234, 021-****1234, ****1234, 0**2-***1234, 0**2-******23-10, ****123-8008` 值限制: 0 value 1024
*/
@SerializedName("consignor_contact")
private String consignorContact;
/**
* 收件人联系方式收件人联系方式为采用掩码传输最后4位数字不能打掩码 示例值: `189****1234, 021-****1234, ****1234, 0**2-***1234, 0**2-******23-10, ****123-8008` 值限制: 0 value 1024
*/
@SerializedName("receiver_contact")
private String receiverContact;
}

View File

@ -0,0 +1,39 @@
package me.chanjar.weixin.open.bean.shoppingOrders;
import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class OrderKeyBean implements Serializable {
private static final long serialVersionUID = 1486092394664728388L;
/**
* 必填
* 订单单号类型用于确认需要上传详情的订单枚举值1使用下单商户号和商户侧单号枚举值2使用微信支付单号
*/
@SerializedName("order_number_type")
private int orderNumberType;
/**
* 原支付交易对应的微信订单号
*/
@SerializedName("transaction_id")
private String transactionId;
/**
* 支付下单商户的商户号由微信支付生成并下发
*/
@SerializedName("mchid")
private String mchId;
/**
* 商户系统内部订单号只能是数字大小写字母`_-*`且在同一个商户号下唯一
*/
@SerializedName("out_trade_no")
private String outTradeNo;
}

View File

@ -0,0 +1,23 @@
package me.chanjar.weixin.open.bean.shoppingOrders;
import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class PayerBean implements Serializable {
private static final long serialVersionUID = -7943088204264205895L;
/**
* 必填
* 用户标识用户在小程序appid下的唯一标识 下单前需获取到用户的Openid 示例值: oUpF8uMuAJO_M2pxb1Q9zNjWeS6o 字符字节限制: [1, 128]
*/
@SerializedName("openid")
private String openid;
}

View File

@ -0,0 +1,48 @@
package me.chanjar.weixin.open.bean.shoppingOrders;
import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.List;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ShippingInfo implements Serializable {
private static final long serialVersionUID = 2105037984591600658L;
/**
* 必填
* 订单需要上传物流信息的订单
*/
@SerializedName("order_key")
private OrderKeyBean orderKey;
/**
* 必填
* 发货模式发货模式枚举值1UNIFIED_DELIVERY统一发货2SPLIT_DELIVERY分拆发货
* 示例值: UNIFIED_DELIVERY
*/
@SerializedName("delivery_mode")
private int deliveryMode;
/**
* 必填
* 物流信息列表发货物流单列表支持统一发货单个物流单和分拆发货多个物流单两种模式多重性: [1, 10]
*/
@SerializedName("shipping_list")
private List<ShippingListBean> shippingList;
/**
* 必填
* 上传时间用于标识请求的先后顺序 示例值: `2022-12-15T13:29:35.120+08:00
*/
@SerializedName("upload_time")
private String uploadTime;
}

View File

@ -0,0 +1,54 @@
package me.chanjar.weixin.open.bean.shoppingOrders;
import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.List;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ShippingListBean implements Serializable {
private static final long serialVersionUID = -6884739637300493109L;
/**
* 物流单号物流快递发货时必填示例值: 323244567777 字符字节限制: [1, 128]
*/
@SerializedName("tracking_no")
private String trackingNo;
/**
* 物流公司编码快递公司ID参见查询物流公司编码列表物流快递发货时必填 示例值: DHL 字符字节限制: [1, 128]
*/
@SerializedName("express_company")
private String expressCompany;
/**
* 物流关联的商品列表当统一发货单个物流单该项不填当分拆发货多个物流单需填入各物流单关联的商品列表 多重性: [0, 50]
*/
@SerializedName("item_list")
private List<ShippingItemListBean> itemList;
/**
* 联系方式当发货的物流公司为顺丰时联系方式为必填收件人或寄件人联系方式二选一
*/
@SerializedName("contact")
private ContactBean contact;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public static class ShippingItemListBean implements Serializable {
private static final long serialVersionUID = -1433227869321841858L;
/**
* 商户侧商品ID商户系统内部商品编码分拆发货模式下为必填用于标识每笔物流单号内包含的商品需与上传购物详情中传入的商品ID匹配
* 示例值: 1246464644 字符字节限制: [1, 64]
*/
@SerializedName("merchant_item_id")
private String merchantItemId;
}
}

View File

@ -0,0 +1,166 @@
package me.chanjar.weixin.open.bean.shoppingOrders;
import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.List;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ShoppingInfo implements Serializable {
private static final long serialVersionUID = 2105037984591600658L;
/**
* 必填
* 订单需要上传物流信息的订单
*/
@SerializedName("order_key")
private OrderKeyBean orderKey;
/**
* 购物详情列表
*/
@SerializedName("order_list")
private List<OrderListBean> orderList;
/**
* 必填
* 支付者支付者信息
*/
@SerializedName("payer")
private PayerBean payer;
/**
* 物流形式订单商品配送的物流形式默认为实体物流
* 物流模式发货方式枚举值1实体物流配送采用快递公司进行实体物流配送形式 2同城配送 3虚拟商品虚拟商品例如话费充值点卡等无实体配送形式 4用户自提
*/
@SerializedName("logistics_type")
private int logisticsType;
/**
* 必填
* 上传时间用于标识请求的先后顺序 示例值: `2022-12-15T13:29:35.120+08:00
*/
@SerializedName("upload_time")
private String uploadTime;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public static class OrderListBean implements Serializable {
private static final long serialVersionUID = -7690807867756471672L;
/**
* 必填
* 商户交易订单编号商户侧的交易订单详情页向用户展示的订单编号
* 示例值: 232457563423 字符字节限制: [1, 64]
*/
@SerializedName("merchant_order_no")
private String merchantOrderNo;
/**
* 必填
* 商户交易订单详情页链接用户查看商城订单跳转至商户侧查看交易订单详情页的链接详情页类别可以为H5或小程序
*/
@SerializedName("order_detail_jump_link")
private OrderDetailBean orderDetailJumpLink;
/**
* 订单购买的商品列表用户在订单中购买的全部商品明细的列表最多可以上传50个商品
* 多重性: [1, 50]
*/
@SerializedName("item_list")
private List<OrderItemListBean> itemList;
}
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public static class OrderDetailBean implements Serializable {
private static final long serialVersionUID = -8002249022516272034L;
/**
* 链接地址链接类型为H5时必填
* 示例值: https://www.weixin.qq.com/wxpay/pay.php
* 字符字节限制: [1, 1024]
* 匹配正则表达式: ^https?😕/([^\s/?#[]@]+@)?([^\s/?#@:]+)(?::\d{2,5})?([^[]]*)$
*/
@SerializedName("url")
private String url;
/**
* 小程序appid链接类型为MINIAPP时必填
* 示例值: wxd678efh567hg6787 字符字节限制: [1, 32]
*/
@SerializedName("appid")
private String appId;
/**
* 小程序path链接类型为MINIAPP时必填
* 示例值: /path/index/index 字符字节限制: [1, 512]
*/
@SerializedName("path")
private String path;
/**
* 必填
* 链接类型枚举值1URL2MINI_PROGRAM
* 示例值: MINI_PROGRAM
*/
@SerializedName("type")
private int type;
}
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public static class OrderItemListBean implements Serializable {
private static final long serialVersionUID = -2989527770771246748L;
/**
* 商户侧商品ID商户系统内部商品编码用于标识不同的商品请注意当发货模式选择分拆发货需要使用商户侧商品ID来标记各物流单中包含的具体商品
* 示例值: 1246464644 字符字节限制: [1, 64]
*/
@SerializedName("merchant_item_id")
private String merchantItemId;
/**
* 必填
* 商品名称
* 示例值: iPhoneX 256G 字符长度限制: [1, 256]
*/
@SerializedName("name")
private String name;
/**
* 商品描述
* 示例值: Image形象店-深圳腾大-QQ公仔 字符长度限制: [1, 512]
*/
@SerializedName("description")
private String description;
/**
* 必填
* 商品单价单位
*/
@SerializedName("unit_price")
private long unitPrice;
/**
* 必填
* 购买数量
* 示例值: 2
*/
@SerializedName("quantity")
private long quantity;
/**
* 商品图片链接
* 示例值: https://qpic.cn/xxx
* 多重性: [1, 3]
* 字符字节限制: [1, 1024]
* 匹配正则表达式: ^https?😕/([^\s/?#[]@]+@)?([^\s/?#@:]+)(?::\d{2,5})?([^[]]*)$
*/
@SerializedName("image_url")
private List<String> imageUrl;
}
}

View File

@ -0,0 +1,32 @@
package me.chanjar.weixin.open.bean.shoppingOrders;
import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.List;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ShoppingInfoVerifyUpload implements Serializable {
private static final long serialVersionUID = 4295431037060277496L;
/**
* 必填
* 订单需要上传购物详情的订单根据订单类型二选一
*/
@SerializedName("order_key")
private OrderKeyBean orderKey;
/**
* 必填
* 支付者支付者信息
*/
@SerializedName("payer")
private PayerBean payer;
}

View File

@ -0,0 +1,18 @@
package me.chanjar.weixin.open.bean.shoppingOrders;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import me.chanjar.weixin.open.bean.result.WxOpenResult;
@Data
@EqualsAndHashCode(callSuper = true)
public class WxOpenShoppingInfoVerifyUploadResult extends WxOpenResult {
private static final long serialVersionUID = -3223834939130803964L;
/**
* 验证结果
*/
@SerializedName("verify_result")
private String verifyResult;
}

View File

@ -0,0 +1,17 @@
package me.chanjar.weixin.open.bean.shoppingOrders;
import com.google.gson.annotations.SerializedName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import me.chanjar.weixin.open.bean.result.WxOpenResult;
@Data
@EqualsAndHashCode(callSuper = true)
public class WxOpenShoppingOrdersConfirmResult extends WxOpenResult {
private static final long serialVersionUID = 8534868743462740891L;
/**
* 最近一次审核的结果
*/
@SerializedName("last_result")
private String lastResult;
}