功能描述
电子面单是物流发货的核心功能,目前WxJava完全未实现该模块。建议新增 WxChannelEwaybillService 接口及实现类。
官方文档
https://developers.weixin.qq.com/doc/channels/API/channels-shop-delivery/ewaybill/
需要实现的接口列表(16个)
| 接口名称 |
请求路径 |
| 获取面单标准模板 |
/channels/ec/logistics/ewaybill/biz/template/config |
| 新增面单模板 |
/channels/ec/logistics/ewaybill/biz/template/create |
| 删除面单模版 |
/channels/ec/logistics/ewaybill/biz/template/delete |
| 更新面单模版 |
/channels/ec/logistics/ewaybill/biz/template/update |
| 获取面单模板信息 |
/channels/ec/logistics/ewaybill/biz/template/get |
| 根据模板ID获取面单模板信息 |
/channels/ec/logistics/ewaybill/biz/template/getbyid |
| 查询开通的电子面单网点/账号信息 |
/channels/ec/logistics/ewaybill/biz/account/get |
| 查询开通的快递公司列表 |
/channels/ec/logistics/ewaybill/biz/delivery/get |
| 电子面单预取号 |
/channels/ec/logistics/ewaybill/biz/order/precreate |
| 电子面单取号 |
/channels/ec/logistics/ewaybill/biz/order/create |
| 电子面单子件追加 |
/channels/ec/logistics/ewaybill/biz/order/addsuborder |
| 电子面单取消下单 |
/channels/ec/logistics/ewaybill/biz/order/cancel |
| 查询面单详情 |
/channels/ec/logistics/ewaybill/biz/order/get |
| 获取打印报文 |
/channels/ec/logistics/ewaybill/biz/print/get |
| 打印成功通知 |
/channels/ec/logistics/ewaybill/biz/order/print |
| 批量打印通知 |
/channels/ec/logistics/ewaybill/biz/order/batchprint |
实现要点
1. 新建服务接口
public interface WxChannelEwaybillService {
// 模板管理
TemplateConfigResponse getTemplateConfig() throws WxErrorException;
TemplateIdResponse createTemplate(TemplateCreateRequest req) throws WxErrorException;
WxChannelBaseResponse deleteTemplate(String templateId) throws WxErrorException;
WxChannelBaseResponse updateTemplate(TemplateUpdateRequest req) throws WxErrorException;
TemplateInfoResponse getTemplate(String templateId) throws WxErrorException;
TemplateInfoResponse getTemplateById(String templateId) throws WxErrorException;
// 账号管理
AccountInfoResponse getAccount() throws WxErrorException;
DeliveryListResponse getDeliveryList() throws WxErrorException;
// 订单管理
PreCreateResponse preCreateOrder(PreCreateRequest req) throws WxErrorException;
CreateOrderResponse createOrder(CreateOrderRequest req) throws WxErrorException;
WxChannelBaseResponse addSubOrder(AddSubOrderRequest req) throws WxErrorException;
WxChannelBaseResponse cancelOrder(String waybillId) throws WxErrorException;
OrderDetailResponse getOrder(String waybillId) throws WxErrorException;
// 打印管理
PrintContentResponse getPrintContent(String waybillId) throws WxErrorException;
WxChannelBaseResponse printOrder(String waybillId) throws WxErrorException;
WxChannelBaseResponse batchPrintOrder(List<String> waybillIds) throws WxErrorException;
}
2. 新建Bean类
TemplateConfigResponse - 面单标准模板响应
TemplateCreateRequest - 新增模板请求
TemplateUpdateRequest - 更新模板请求
TemplateInfoResponse - 模板信息响应
AccountInfoResponse - 账号信息响应
DeliveryListResponse - 快递公司列表响应
PreCreateRequest/Response - 预取号请求/响应
CreateOrderRequest/Response - 取号请求/响应
OrderDetailResponse - 面单详情响应
PrintContentResponse - 打印报文响应
3. URL常量定义
在 WxChannelApiUrlConstants.java 中新增 Ewaybill 接口。
功能描述
电子面单是物流发货的核心功能,目前WxJava完全未实现该模块。建议新增
WxChannelEwaybillService接口及实现类。官方文档
https://developers.weixin.qq.com/doc/channels/API/channels-shop-delivery/ewaybill/
需要实现的接口列表(16个)
/channels/ec/logistics/ewaybill/biz/template/config/channels/ec/logistics/ewaybill/biz/template/create/channels/ec/logistics/ewaybill/biz/template/delete/channels/ec/logistics/ewaybill/biz/template/update/channels/ec/logistics/ewaybill/biz/template/get/channels/ec/logistics/ewaybill/biz/template/getbyid/channels/ec/logistics/ewaybill/biz/account/get/channels/ec/logistics/ewaybill/biz/delivery/get/channels/ec/logistics/ewaybill/biz/order/precreate/channels/ec/logistics/ewaybill/biz/order/create/channels/ec/logistics/ewaybill/biz/order/addsuborder/channels/ec/logistics/ewaybill/biz/order/cancel/channels/ec/logistics/ewaybill/biz/order/get/channels/ec/logistics/ewaybill/biz/print/get/channels/ec/logistics/ewaybill/biz/order/print/channels/ec/logistics/ewaybill/biz/order/batchprint实现要点
1. 新建服务接口
2. 新建Bean类
TemplateConfigResponse- 面单标准模板响应TemplateCreateRequest- 新增模板请求TemplateUpdateRequest- 更新模板请求TemplateInfoResponse- 模板信息响应AccountInfoResponse- 账号信息响应DeliveryListResponse- 快递公司列表响应PreCreateRequest/Response- 预取号请求/响应CreateOrderRequest/Response- 取号请求/响应OrderDetailResponse- 面单详情响应PrintContentResponse- 打印报文响应3. URL常量定义
在
WxChannelApiUrlConstants.java中新增Ewaybill接口。