|
|
|
|
package common.ecommerce.yqn;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 运去哪(YQN)协议常量。
|
|
|
|
|
*
|
|
|
|
|
* <p>端点与路径是<b>协议的一部分</b>,写在代码里,不做成配置表。
|
|
|
|
|
* 运行时不使用 {@link #PRODUCTION_BASE_URL}:端点由调用方每次经
|
|
|
|
|
* {@code WarehouseConnection} 传入。</p>
|
|
|
|
|
*
|
|
|
|
|
* <p>端点与路径来自 Spec W0 §2.3 / §8.1(《得力系统对接.xlsx》整理)。</p>
|
|
|
|
|
*/
|
|
|
|
|
public final class YqnConstants {
|
|
|
|
|
|
|
|
|
|
public static final String ADAPTER_ID = "yqn";
|
|
|
|
|
|
|
|
|
|
/** PR(联调)环境。 */
|
|
|
|
|
public static final String PR_BASE_URL = "https://pr-hwc-open-api.yqn.com";
|
|
|
|
|
|
|
|
|
|
/** 生产环境。 */
|
|
|
|
|
public static final String PRODUCTION_BASE_URL = "https://open-hwc.yqn.com";
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 组织级 Token 的请求头名。API 115 文档确认:{@code x-api-key},固定值放请求头,无签名。
|
|
|
|
|
*/
|
|
|
|
|
public static final String TOKEN_HEADER = "x-api-key";
|
|
|
|
|
|
|
|
|
|
/** 商品创建 / 编辑(V1 推荐版)。 */
|
|
|
|
|
public static final String PATH_PRODUCT_SAVE = "/v1/product/save";
|
|
|
|
|
/** 创建销售订单(API 123)。 */
|
|
|
|
|
public static final String PATH_ORDER_CREATE = "/v1/saleOrder/create";
|
|
|
|
|
/** 订单详情(API 128):按来源单号查完整订单。 */
|
|
|
|
|
public static final String PATH_ORDER_FIND_ONE = "/v1/saleOrder/findOne";
|
|
|
|
|
/** 取消销售订单(API 122)。 */
|
|
|
|
|
public static final String PATH_ORDER_CANCEL = "/v1/saleOrder/cancel";
|
|
|
|
|
/** 批量查询库存(API 107),GET + 分页。 */
|
|
|
|
|
public static final String PATH_INVENTORY_PAGE = "/v2/inventory/get_inventory_by_page";
|
|
|
|
|
/** 创建调拨单(API 139)。 */
|
|
|
|
|
public static final String PATH_TRANSFER_CREATE = "/v2/transferOutboundPlan/create";
|
|
|
|
|
/** 创建入库计划单(API 97)。 */
|
|
|
|
|
public static final String PATH_INBOUND_CREATE = "/v1/inbound/createInboundPlan";
|
|
|
|
|
/** 查询入库计划(API 101)。 */
|
|
|
|
|
public static final String PATH_INBOUND_GET = "/v1/inbound/getInboundPlanInfo";
|
|
|
|
|
/** 退货发起。 */
|
|
|
|
|
public static final String PATH_RETURN_CREATE = "/salereturn/SalesReturnCreate";
|
|
|
|
|
/** 退货处理方式(二次上架 / 销毁)。 */
|
|
|
|
|
public static final String PATH_RETURN_DISPOSITION = "/salereturn/SaleReturnAddProcessMode";
|
|
|
|
|
/** 销毁计划。 */
|
|
|
|
|
public static final String PATH_DESTRUCTION_CREATE = "/destroyplan/DestructionPlanCreate";
|
|
|
|
|
/** 物流轨迹。 */
|
|
|
|
|
public static final String PATH_TRACKING = "/cloudship/expressdelivery/GetTrackingStatus";
|
|
|
|
|
/** 结算明细(API 133):作业费 / 仓储费 / 增值服务费 / 尾程费。 */
|
|
|
|
|
public static final String PATH_FEE_DETAIL = "/v1/warehouse/operation/costs/detail";
|
|
|
|
|
|
|
|
|
|
/** Spec §7.5:三家仓均未公开限流值,保守默认 2 req/s/仓。 */
|
|
|
|
|
public static final int PERMITS_PER_SECOND = 2;
|
|
|
|
|
|
|
|
|
|
private YqnConstants() {
|
|
|
|
|
}
|
|
|
|
|
}
|