|
|
|
|
package common.ecommerce.yqn.dto;
|
|
|
|
|
|
|
|
|
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 运去哪报文结构。
|
|
|
|
|
*
|
|
|
|
|
* <p>商品相关字段以 API 115 官方文档为准({@code /v1/product/save})。
|
|
|
|
|
* 出库相关字段仍待打样核对(Spec §8.6 第 2/5/9 项)。字段差异只改本类与
|
|
|
|
|
* 对应的 Mapper,不动门面与领域模型。</p>
|
|
|
|
|
*/
|
|
|
|
|
public final class YqnDtos {
|
|
|
|
|
|
|
|
|
|
private YqnDtos() {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 创建销售订单请求(API 123,{@code /v1/saleOrder/create})。
|
|
|
|
|
*
|
|
|
|
|
* <p>必填:orderNo / shipToCountry / shipToState / shipToCity / shipToPostal /
|
|
|
|
|
* shipToAddress1 / shipToContact / shipToTelephone / salesPlatform / productItems。</p>
|
|
|
|
|
*/
|
|
|
|
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
|
|
|
|
public static final class CreateOrderRequest {
|
|
|
|
|
|
|
|
|
|
/** 来源单号;用 OMS 的出库单号,仓侧回查与幂等锚点。 */
|
|
|
|
|
public String orderNo;
|
|
|
|
|
/** 承运商,如 FedEx / UPS。 */
|
|
|
|
|
public String carrier;
|
|
|
|
|
/** 物流商服务 Code;不传走仓的分物流渠道规则。 */
|
|
|
|
|
public String carrierCode;
|
|
|
|
|
/** 仓 code;不传走分仓规则。 */
|
|
|
|
|
public String warehouseCode;
|
|
|
|
|
/** 币种,不填默认 USD。 */
|
|
|
|
|
public String currency;
|
|
|
|
|
/** 支付时间 {@code yyyy-MM-dd HH:mm:ss};不填默认当前时间。 */
|
|
|
|
|
public String paidAt;
|
|
|
|
|
|
|
|
|
|
/** 目的国家,2 位字符。必填。 */
|
|
|
|
|
public String shipToCountry;
|
|
|
|
|
/** 目的州;美加为 2 位编码。必填。 */
|
|
|
|
|
public String shipToState;
|
|
|
|
|
/** 目的城市。必填。 */
|
|
|
|
|
public String shipToCity;
|
|
|
|
|
/** 发运邮编。必填。 */
|
|
|
|
|
public String shipToPostal;
|
|
|
|
|
/** 发运地址1。必填。 */
|
|
|
|
|
public String shipToAddress1;
|
|
|
|
|
public String shipToAddress2;
|
|
|
|
|
public String shipToAddress3;
|
|
|
|
|
/** 发运联系人。必填。 */
|
|
|
|
|
public String shipToContact;
|
|
|
|
|
/** 发运联系电话。必填。 */
|
|
|
|
|
public String shipToTelephone;
|
|
|
|
|
/** 客户姓名。 */
|
|
|
|
|
public String buyerName;
|
|
|
|
|
/** 客户邮箱。 */
|
|
|
|
|
public String buyerEmail;
|
|
|
|
|
/** third party 账号。 */
|
|
|
|
|
public String thirdPartyAccount;
|
|
|
|
|
|
|
|
|
|
/** 发货时效:Standard-48 Hours / Same Day Ship Out / Outbound First Class;不填为标准。 */
|
|
|
|
|
public String shipServiceLevel;
|
|
|
|
|
/** 平台订单号。 */
|
|
|
|
|
public String poNumber;
|
|
|
|
|
/** Amazon 店铺 Seller ID。 */
|
|
|
|
|
public String sellerCode;
|
|
|
|
|
/** 店铺名称;传入时会校验系统内是否存在。 */
|
|
|
|
|
public String channelAccount;
|
|
|
|
|
/** 订单特殊标签 0 无 / 1 SFP / 2 VC;不填默认无。 */
|
|
|
|
|
public Integer isPrime;
|
|
|
|
|
/** 最晚发货时间 {@code yyyy-MM-dd HH:mm:ss}。 */
|
|
|
|
|
public String latestShipDate;
|
|
|
|
|
/** 最晚送达时间 {@code yyyy-MM-dd HH:mm:ss}。 */
|
|
|
|
|
public String estimatedDeliveryTime;
|
|
|
|
|
/** 销售平台类型,码值见 API 123;必填。 */
|
|
|
|
|
public Integer salesPlatform;
|
|
|
|
|
/** ERP 来源类型;领星为 1。 */
|
|
|
|
|
public Integer erpPlatform;
|
|
|
|
|
public String remark;
|
|
|
|
|
|
|
|
|
|
/** 产品行,必填。 */
|
|
|
|
|
public List<ProductItem> productItems;
|
|
|
|
|
/** 附件(面单 / 装箱单 / BOL 等);非必填,传了就要给全必填子字段。 */
|
|
|
|
|
public List<AttachInfoItem> attachInfoItems;
|
|
|
|
|
/** 发货包裹;不传则由仓按默认规则打包。 */
|
|
|
|
|
public List<PackageItem> packageItems;
|
|
|
|
|
/** 业务标签 100 售后卡 / 110 贴发票 / 20 不使用耗材 / 21 纸箱打包 / 22 快递袋打包 / 150 采集 SN。 */
|
|
|
|
|
public List<Integer> tags;
|
|
|
|
|
|
|
|
|
|
/** 产品行。 */
|
|
|
|
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
|
|
|
|
public static final class ProductItem {
|
|
|
|
|
/** 发货产品 SKU。 */
|
|
|
|
|
public String sku;
|
|
|
|
|
/** 父商品 ERP SKU;箱产品必填。 */
|
|
|
|
|
public String parentErpsku;
|
|
|
|
|
/** 批次属性,JSON 字符串。 */
|
|
|
|
|
public String batchItems;
|
|
|
|
|
/** 商品形态 0 单一产品 / 2 箱产品;箱产品必填。 */
|
|
|
|
|
public Integer saleType;
|
|
|
|
|
/** 标准件数;箱产品必填。 */
|
|
|
|
|
public Integer standardQuantity;
|
|
|
|
|
/** 发货数量。 */
|
|
|
|
|
public Integer quantity;
|
|
|
|
|
/** 是否保价 0 否 / 1 是;不填从产品中心取。 */
|
|
|
|
|
public Integer isInsure;
|
|
|
|
|
/** 签收类型 0 不签收 / 1 直接 / 2 成人 / 3 间接;不填从产品中心取。 */
|
|
|
|
|
public Integer isSignature;
|
|
|
|
|
/** 当前 SKU 总金额(美元)。 */
|
|
|
|
|
public Double skuAmount;
|
|
|
|
|
/** 投保金额;保价时必填。 */
|
|
|
|
|
public Double insureAmount;
|
|
|
|
|
/** 商品货号。 */
|
|
|
|
|
public String articleNo;
|
|
|
|
|
/** EAN 条码。 */
|
|
|
|
|
public String ean;
|
|
|
|
|
/** 供应商货号。 */
|
|
|
|
|
public String supplierArticleNo;
|
|
|
|
|
/** 行号,当前订单内唯一。 */
|
|
|
|
|
public String lineNo;
|
|
|
|
|
/** 产品订单序列号;各平台语义不同。 */
|
|
|
|
|
public String skuOrderSn;
|
|
|
|
|
/** 产品交易序列号;各平台语义不同。 */
|
|
|
|
|
public String skuTransactionSn;
|
|
|
|
|
/** 危险品标签。 */
|
|
|
|
|
public String dangerousLabel;
|
|
|
|
|
/** 危险品标签数量。 */
|
|
|
|
|
public Integer dangerousLabelQty;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 附件。 */
|
|
|
|
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
|
|
|
|
public static final class AttachInfoItem {
|
|
|
|
|
/** 附件名称,建议用 TrackingNo 且不带后缀。 */
|
|
|
|
|
public String name;
|
|
|
|
|
/** 附件 URL;与 {@link #file} 至少给一个。 */
|
|
|
|
|
public String url;
|
|
|
|
|
/** base64 内容;给了就忽略 url。 */
|
|
|
|
|
public String file;
|
|
|
|
|
/** 0 面单 / 1 装箱单 / 2 BOL / 3 其他 / 4 箱标 / 5 托盘标 / 6 商品标 / 7 发票 / 8 发货计划。 */
|
|
|
|
|
public Integer type;
|
|
|
|
|
/** base64 时的格式:png / pdf,默认 pdf。 */
|
|
|
|
|
public String fileType;
|
|
|
|
|
public String remark;
|
|
|
|
|
/** 包裹号,与包裹的 refNo 一致。 */
|
|
|
|
|
public String packageNo;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 包裹。 */
|
|
|
|
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
|
|
|
|
public static final class PackageItem {
|
|
|
|
|
public String refNo;
|
|
|
|
|
/** 长(cm),必填。 */
|
|
|
|
|
public Double length;
|
|
|
|
|
/** 宽(cm),必填。 */
|
|
|
|
|
public Double width;
|
|
|
|
|
/** 高(cm),必填。 */
|
|
|
|
|
public Double height;
|
|
|
|
|
/** 重量(g),必填。 */
|
|
|
|
|
public Double weight;
|
|
|
|
|
/** 包裹内 SKU;只有一个包裹时可省略,表示全部 SKU 同箱。 */
|
|
|
|
|
public List<PackageSku> skuInfos;
|
|
|
|
|
/** 打包耗材 20 / 21 / 22,必填。 */
|
|
|
|
|
public List<Integer> materialType;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 包裹内 SKU 数量。 */
|
|
|
|
|
public static final class PackageSku {
|
|
|
|
|
public String sku;
|
|
|
|
|
public Integer qty;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 创建销售订单响应的 {@code data}。 */
|
|
|
|
|
public static final class CreateOrderResponse {
|
|
|
|
|
|
|
|
|
|
/** 仓侧订单 id,列表查询时可用。 */
|
|
|
|
|
public Long orderId;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 订单详情请求(API 128):只按来源单号查。 */
|
|
|
|
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
|
|
|
|
public static final class FindOneOrderRequest {
|
|
|
|
|
|
|
|
|
|
/** 订单号;运去哪指我们下发时的 {@code orderNo}(来源单号)。 */
|
|
|
|
|
public String orderNo;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 订单详情响应 {@code data}(API 128)。
|
|
|
|
|
*
|
|
|
|
|
* <p>注意:这份响应<b>没有 statusCode/status</b>,只有 {@code code/message/data};
|
|
|
|
|
* {@code data} 内也没有 {@code carrier}/{@code trackingNo} 顶层字段,
|
|
|
|
|
* 运单与包裹在 {@link #shipmentPackages}。</p>
|
|
|
|
|
*/
|
|
|
|
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
|
|
|
|
public static final class OrderDetail {
|
|
|
|
|
|
|
|
|
|
public String orderNo;
|
|
|
|
|
/** 支付时间 {@code yyyy-MM-dd HH:mm:ss}。 */
|
|
|
|
|
public String paidAt;
|
|
|
|
|
public String shipToContact;
|
|
|
|
|
public String shipToAddress1;
|
|
|
|
|
public String shipToAddress2;
|
|
|
|
|
public String shipToAddress3;
|
|
|
|
|
public String shipToCity;
|
|
|
|
|
public String shipToState;
|
|
|
|
|
public String shipToCountry;
|
|
|
|
|
public String shipToPostal;
|
|
|
|
|
public String shipToTelephone;
|
|
|
|
|
/** 仓 code,可能因分仓规则与下单时不同。 */
|
|
|
|
|
public String warehouseCode;
|
|
|
|
|
/** 承运商 code。 */
|
|
|
|
|
public String carrierCode;
|
|
|
|
|
public String thirdPartyAccount;
|
|
|
|
|
public String currency;
|
|
|
|
|
/** 是否签收 0 否 / 1 是。 */
|
|
|
|
|
public Integer isSignature;
|
|
|
|
|
/** 是否保价 0 否 / 1 是。 */
|
|
|
|
|
public Integer isInsure;
|
|
|
|
|
/** pending / unshipped / approved / assigned / picked / shipped / canceled / refunded。 */
|
|
|
|
|
public String orderStatusEnum;
|
|
|
|
|
/** 异常码;无异常为 {@code unexception}。 */
|
|
|
|
|
public String errorCode;
|
|
|
|
|
/** 预估运费,默认币种 USD。 */
|
|
|
|
|
public Double estimatedShippingFee;
|
|
|
|
|
public List<DetailProductItem> productItems;
|
|
|
|
|
public List<Enclosure> enclosure;
|
|
|
|
|
/** 发货信息;未发货时为 null 或空。 */
|
|
|
|
|
public List<ShipmentPackage> shipmentPackages;
|
|
|
|
|
/** SKU ORD 列表。 */
|
|
|
|
|
public List<OrdItem> ordList;
|
|
|
|
|
/** 采集 SN 信息。 */
|
|
|
|
|
public List<SnInfo> orderSnInfo;
|
|
|
|
|
|
|
|
|
|
/** 商品行。 */
|
|
|
|
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
|
|
|
|
public static final class DetailProductItem {
|
|
|
|
|
public String sku;
|
|
|
|
|
public Integer quantity;
|
|
|
|
|
public String parentErpsku;
|
|
|
|
|
/** 0 单一产品 / 2 箱产品。 */
|
|
|
|
|
public Integer saleType;
|
|
|
|
|
public Integer standardQuantity;
|
|
|
|
|
public Double skuAmount;
|
|
|
|
|
public Double insureAmount;
|
|
|
|
|
public String lineNo;
|
|
|
|
|
public BatchInfo batchInfo;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 批次信息。 */
|
|
|
|
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
|
|
|
|
public static final class BatchInfo {
|
|
|
|
|
public List<BatchItem> planBatchItems;
|
|
|
|
|
public List<BatchItem> outboundBatchItems;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 一条批次。 */
|
|
|
|
|
public static final class BatchItem {
|
|
|
|
|
public Integer qty;
|
|
|
|
|
public List<BatchParam> batchParam;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 批次属性键值。 */
|
|
|
|
|
public static final class BatchParam {
|
|
|
|
|
public String batchAttriKey;
|
|
|
|
|
public String batchAttriValue;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 附件。 */
|
|
|
|
|
public static final class Enclosure {
|
|
|
|
|
public String type;
|
|
|
|
|
public String name;
|
|
|
|
|
public String url;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 发货包裹。
|
|
|
|
|
*
|
|
|
|
|
* <p>{@code packageFlag} 0 实际包裹 / 1 面单信息;
|
|
|
|
|
* 面单信息行也有 trackingNo,拼包裹时不要重复计数。</p>
|
|
|
|
|
*/
|
|
|
|
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
|
|
|
|
public static final class ShipmentPackage {
|
|
|
|
|
public String trackingNo;
|
|
|
|
|
public String carrier;
|
|
|
|
|
public String erpSku;
|
|
|
|
|
public Double cost;
|
|
|
|
|
public Integer shipedQuantity;
|
|
|
|
|
public String shipmentDate;
|
|
|
|
|
public Integer packageFlag;
|
|
|
|
|
public String carrierCode;
|
|
|
|
|
public String carrierServiceCode;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** SKU 的 ORD 列表。 */
|
|
|
|
|
public static final class OrdItem {
|
|
|
|
|
public String sku;
|
|
|
|
|
public List<String> skuOrdList;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 采集的 SN 信息。 */
|
|
|
|
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
|
|
|
|
public static final class SnInfo {
|
|
|
|
|
public String sku;
|
|
|
|
|
public String productId;
|
|
|
|
|
public List<SnItem> snList;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 单条 SN。 */
|
|
|
|
|
public static final class SnItem {
|
|
|
|
|
public String sku;
|
|
|
|
|
public String snCode;
|
|
|
|
|
public String lineNo;
|
|
|
|
|
public Integer productId;
|
|
|
|
|
public Integer deliverOrderItemId;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 取消销售订单请求(API 122):只有 {@code orderNo}。
|
|
|
|
|
*/
|
|
|
|
|
public static final class CancelOrderRequest {
|
|
|
|
|
|
|
|
|
|
/** 订单号,即下单时的来源单号。 */
|
|
|
|
|
public String orderNo;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 商品创建 / 编辑请求(API 115,{@code /v1/product/save})。
|
|
|
|
|
*
|
|
|
|
|
* <p>必填:sku / name / nameEn / packingType / length / width / height / weight /
|
|
|
|
|
* isRequireSn。{@code customs} 数组里任一字段出现时,四项必须同时给。</p>
|
|
|
|
|
*/
|
|
|
|
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
|
|
|
|
public static final class SaveProductRequest {
|
|
|
|
|
|
|
|
|
|
/** 产品 SKU。 */
|
|
|
|
|
public String sku;
|
|
|
|
|
/** 自定义产品编码。 */
|
|
|
|
|
public String customItemNo;
|
|
|
|
|
/** UPC 编码。 */
|
|
|
|
|
public String upc;
|
|
|
|
|
/** 1 成品 / 2 配件 / 3 耗材;不传默认成品。 */
|
|
|
|
|
public Integer productType;
|
|
|
|
|
/** 中文名称。 */
|
|
|
|
|
public String name;
|
|
|
|
|
/** 英文名称。 */
|
|
|
|
|
public String nameEn;
|
|
|
|
|
/** 产品描述;不填默认取 {@link #nameEn}。 */
|
|
|
|
|
public String description;
|
|
|
|
|
/** 0 原包装发货 / 1 重新打包。 */
|
|
|
|
|
public Integer packingType;
|
|
|
|
|
/** 产品长(cm),一箱多件的尺寸。 */
|
|
|
|
|
public Double length;
|
|
|
|
|
/** 产品宽(cm)。 */
|
|
|
|
|
public Double width;
|
|
|
|
|
/** 产品高(cm)。 */
|
|
|
|
|
public Double height;
|
|
|
|
|
/** 产品重量(g)。 */
|
|
|
|
|
public Double weight;
|
|
|
|
|
/** 单品长(cm)。 */
|
|
|
|
|
public Double itemLength;
|
|
|
|
|
/** 单品宽(cm)。 */
|
|
|
|
|
public Double itemWidth;
|
|
|
|
|
/** 单品高(cm)。 */
|
|
|
|
|
public Double itemHeight;
|
|
|
|
|
/** 保质期管理 0 否 / 1 是。 */
|
|
|
|
|
public Integer expirationControl;
|
|
|
|
|
/** 保质期天数。 */
|
|
|
|
|
public Integer expirationDate;
|
|
|
|
|
/** 装箱数量。 */
|
|
|
|
|
public Integer packedQty;
|
|
|
|
|
/** 外箱长(cm)。 */
|
|
|
|
|
public Double packedLength;
|
|
|
|
|
/** 外箱宽(cm)。 */
|
|
|
|
|
public Double packedWidth;
|
|
|
|
|
/** 外箱高(cm)。 */
|
|
|
|
|
public Double packedHeight;
|
|
|
|
|
/** 外箱重量(g)。 */
|
|
|
|
|
public Double packedWeight;
|
|
|
|
|
/** 成本。 */
|
|
|
|
|
public Double cost;
|
|
|
|
|
/** 币种。 */
|
|
|
|
|
public String currency;
|
|
|
|
|
/** 是否保价 Y / N。 */
|
|
|
|
|
public String isInsuranceFlag;
|
|
|
|
|
/** 保价费用。 */
|
|
|
|
|
public Double isInsuranceRate;
|
|
|
|
|
/** 备注。 */
|
|
|
|
|
public String remark;
|
|
|
|
|
/** 报关中文名。 */
|
|
|
|
|
public String customName;
|
|
|
|
|
/** 报关英文名。 */
|
|
|
|
|
public String customNameEn;
|
|
|
|
|
/** 是否需要 SN 0 否 / 1 是。 */
|
|
|
|
|
public Integer isRequireSn;
|
|
|
|
|
/** 外包装样式 0 裸包装 / 1 销售包装 / 2 物流包装。 */
|
|
|
|
|
public Integer packageStyle;
|
|
|
|
|
/** 序列号管理方式 1 全链路 SN / 2 SN 出库采集。 */
|
|
|
|
|
public Integer snMgmtMode;
|
|
|
|
|
/** 客退处理方式 0 客户自提 / 1 拍照确认 / 2 销毁 / 5 仓库确认。 */
|
|
|
|
|
public Integer returnDealMethod;
|
|
|
|
|
/** 批次管理。 */
|
|
|
|
|
public LotControl lotControl;
|
|
|
|
|
/** 商品链接。 */
|
|
|
|
|
public String link;
|
|
|
|
|
/** 清关信息;各国一条。 */
|
|
|
|
|
public List<Customs> customs;
|
|
|
|
|
|
|
|
|
|
/** 批次管理。 */
|
|
|
|
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
|
|
|
|
public static final class LotControl {
|
|
|
|
|
/** 是否开启批次管理 0 否 / 1 是。 */
|
|
|
|
|
public Integer lotEnabled;
|
|
|
|
|
/** 开启后必填:本商品需要开启的批次属性编码。 */
|
|
|
|
|
public List<String> lotAttrCodeList;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 一条进口海关信息;四项同进同退。 */
|
|
|
|
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
|
|
|
|
public static final class Customs {
|
|
|
|
|
/** 国家编码,如 US。 */
|
|
|
|
|
public String countryCode;
|
|
|
|
|
/** HS Code。 */
|
|
|
|
|
public String customCode;
|
|
|
|
|
/** 进口申报价值。 */
|
|
|
|
|
public Double importDeclaredValue;
|
|
|
|
|
/** 进口申报价值币种,枚举仅 USD。 */
|
|
|
|
|
public String importDeclaredCurrency;
|
|
|
|
|
/** 出口申报价值。 */
|
|
|
|
|
public Double exportDeclaredValue;
|
|
|
|
|
/** 出口申报价值币种,枚举仅 USD。 */
|
|
|
|
|
public String exportDeclaredCurrency;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** 结算明细请求(API 133)。 */
|
|
|
|
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
|
|
|
|
public static final class CostDetailRequest {
|
|
|
|
|
|
|
|
|
|
/** 销售订单号(数字);作业费 / 尾程费按它查。 */
|
|
|
|
|
public Long saleOrderNo;
|
|
|
|
|
/** 结算单编号;仓储费 / 增值服务费按它查。 */
|
|
|
|
|
public String billingTransNo;
|
|
|
|
|
/** 1 作业费 / 2 仓储费 / 3 增值服务费 / 4 尾程费。 */
|
|
|
|
|
public Integer costType;
|
|
|
|
|
public String sku;
|
|
|
|
|
public String externalOrderNo;
|
|
|
|
|
/** 快照开始日期 yyyy-MM-dd;仅仓储费支持,区间不超过 30 天。 */
|
|
|
|
|
public String snapshotStartDate;
|
|
|
|
|
/** 快照结束日期 yyyy-MM-dd。 */
|
|
|
|
|
public String snapshotEndDate;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 结算明细的一条记录(API 133 {@code data[]})。 */
|
|
|
|
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
|
|
|
|
public static final class CostDetail {
|
|
|
|
|
|
|
|
|
|
/** 销售订单号(数字)。 */
|
|
|
|
|
public Long saleOrderNo;
|
|
|
|
|
public String warehouseCode;
|
|
|
|
|
/** 费用金额,币种 USD。 */
|
|
|
|
|
public Double costAmount;
|
|
|
|
|
public String costName;
|
|
|
|
|
public String settlementTime;
|
|
|
|
|
/** 1 实际结算 / 2 预估结算。 */
|
|
|
|
|
public Integer settlementType;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 库存查询的查询体(API 107 的 {@code query} 对象)。 */
|
|
|
|
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
|
|
|
|
public static final class InventoryQueryParam {
|
|
|
|
|
|
|
|
|
|
/** 仓库 CODE 列表,必填。 */
|
|
|
|
|
public List<String> warehouseCodes;
|
|
|
|
|
/** 0 可售 / 1 不可售。 */
|
|
|
|
|
public Integer inventoryType;
|
|
|
|
|
/** 页码,字符串。 */
|
|
|
|
|
public String page;
|
|
|
|
|
/** 页面大小,默认最高 500。 */
|
|
|
|
|
public Integer rows;
|
|
|
|
|
public String sidx;
|
|
|
|
|
/** asc / desc。 */
|
|
|
|
|
public String sort;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 库存分页响应(API 107)。
|
|
|
|
|
*
|
|
|
|
|
* <p>响应是 Spring Data 的分页结构:{@code data.content[]} 是数据,
|
|
|
|
|
* 翻页看 {@code data.last}。外层 {@code code} 在这个接口里是<b>字符串</b>。</p>
|
|
|
|
|
*/
|
|
|
|
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
|
|
|
|
public static final class InventoryPage {
|
|
|
|
|
|
|
|
|
|
public InventoryPageData data;
|
|
|
|
|
|
|
|
|
|
/** 分页载荷。 */
|
|
|
|
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
|
|
|
|
public static final class InventoryPageData {
|
|
|
|
|
public List<InventoryRow> content;
|
|
|
|
|
public Integer totalElements;
|
|
|
|
|
public Integer totalPages;
|
|
|
|
|
public Boolean last;
|
|
|
|
|
public Integer size;
|
|
|
|
|
public Integer number;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 一条库存记录(字段名是下划线风格,运去哪原样返回)。 */
|
|
|
|
|
@JsonInclude(JsonInclude.Include.NON_NULL)
|
|
|
|
|
public static final class InventoryRow {
|
|
|
|
|
|
|
|
|
|
@com.fasterxml.jackson.annotation.JsonProperty("warehouse_code")
|
|
|
|
|
public String warehouseCode;
|
|
|
|
|
@com.fasterxml.jackson.annotation.JsonProperty("line_name")
|
|
|
|
|
public String lineName;
|
|
|
|
|
public String sku;
|
|
|
|
|
/** 0 可售 / 1 不可售。 */
|
|
|
|
|
@com.fasterxml.jackson.annotation.JsonProperty("inventory_type")
|
|
|
|
|
public Integer inventoryType;
|
|
|
|
|
@com.fasterxml.jackson.annotation.JsonProperty("inventory_available")
|
|
|
|
|
public Integer inventoryAvailable;
|
|
|
|
|
@com.fasterxml.jackson.annotation.JsonProperty("inventory_reserved")
|
|
|
|
|
public Integer inventoryReserved;
|
|
|
|
|
@com.fasterxml.jackson.annotation.JsonProperty("inventory_transport")
|
|
|
|
|
public Integer inventoryTransport;
|
|
|
|
|
/** 当前总库存;文档标为 string。 */
|
|
|
|
|
@com.fasterxml.jackson.annotation.JsonProperty("inventory_current")
|
|
|
|
|
public String inventoryCurrent;
|
|
|
|
|
@com.fasterxml.jackson.annotation.JsonProperty("updated_at")
|
|
|
|
|
public String updatedAt;
|
|
|
|
|
@com.fasterxml.jackson.annotation.JsonProperty("is_over_warehouse")
|
|
|
|
|
public Integer isOverWarehouse;
|
|
|
|
|
@com.fasterxml.jackson.annotation.JsonProperty("parent_sku")
|
|
|
|
|
public String parentSku;
|
|
|
|
|
/** 0 单一产品 / 1 套装 / 2 箱产品。 */
|
|
|
|
|
@com.fasterxml.jackson.annotation.JsonProperty("sale_type")
|
|
|
|
|
public Integer saleType;
|
|
|
|
|
@com.fasterxml.jackson.annotation.JsonProperty("standard_quantity")
|
|
|
|
|
public Integer standardQuantity;
|
|
|
|
|
@com.fasterxml.jackson.annotation.JsonProperty("inventory_pcs_available")
|
|
|
|
|
public Integer inventoryPcsAvailable;
|
|
|
|
|
@com.fasterxml.jackson.annotation.JsonProperty("inventory_pcs_reserved")
|
|
|
|
|
public Integer inventoryPcsReserved;
|
|
|
|
|
@com.fasterxml.jackson.annotation.JsonProperty("inventory_pcs_transport")
|
|
|
|
|
public Integer inventoryPcsTransport;
|
|
|
|
|
@com.fasterxml.jackson.annotation.JsonProperty("inventory_pcs_current")
|
|
|
|
|
public Integer inventoryPcsCurrent;
|
|
|
|
|
}
|
|
|
|
|
}
|