Skip to content

[Feature] 新增代发管理模块支持 #3985

Description

@binarywang

功能描述

代发管理是供应链核心功能,支持商家与供货商关联、订单自动分配、代发单管理。目前WxJava完全未实现该模块。

官方文档

https://developers.weixin.qq.com/doc/channels/API/supplier/

需要实现的接口列表(12个)

关联供货商(1个)

接口名称 请求路径
获取供货商列表 /channels/ec/supplier/relation/get_supplier_list

自动分配设置(6个)

接口名称 请求路径
获取分配方式 /channels/ec/supplier/relation/get_distribute
设置全店订单手动分配 /channels/ec/supplier/relation/set_manually_distribute
设置全店订单自动分配 /channels/ec/supplier/relation/set_all_distribution
设置按商品自动分配 /channels/ec/supplier/relation/set_product_distribute
获取商品对应的自动分配供货商 /channels/ec/supplier/relation/get_product_default_distribute
获取按商品自动分配的商品列表 /channels/ec/supplier/relation/get_product_list

代发单管理(5个)

接口名称 请求路径
分配订单代发 /channels/ec/order/dropship/assign
取消分配代发单 /channels/ec/order/dropship/cancel
查询代发单详情 /channels/ec/order/dropship/get
拉取代发单列表 /channels/ec/order/dropship/list
搜索代发单 /channels/ec/order/dropship/search

实现要点

1. 新建服务接口

public interface WxChannelSupplierService {
  // 供货商关联
  SupplierListResponse getSupplierList() throws WxErrorException;
  
  // 自动分配设置
  DistributeTypeResponse getDistribute() throws WxErrorException;
  WxChannelBaseResponse setManuallyDistribute() throws WxErrorException;
  WxChannelBaseResponse setAllDistribute(String supplierId) throws WxErrorException;
  WxChannelBaseResponse setProductDistribute(ProductDistributeRequest req) throws WxErrorException;
  SupplierInfoResponse getProductDefaultDistribute(String productId) throws WxErrorException;
  ProductListResponse getProductList(String supplierId) throws WxErrorException;
  
  // 代发单管理
  DropshipResponse assignOrder(DropshipAssignRequest req) throws WxErrorException;
  WxChannelBaseResponse cancelDropship(String orderId) throws WxErrorException;
  DropshipDetailResponse getDropship(String orderId) throws WxErrorException;
  DropshipListResponse listDropship(DropshipListRequest req) throws WxErrorException;
  DropshipListResponse searchDropship(DropshipSearchRequest req) throws WxErrorException;
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions