Browse Source
XincangDtos 单文件 1601 行、40 个内嵌类、覆盖 14 个接口,超出 onboarding-checklist「一个接口一个文件」的约定。按接口切成 16 个文件, 最大的 XincangForecastDetailDtos 约 220 行。 - Attachment 归到 XincangUploadDtos(upload.files 返回的对象,转运 / 商品原样回传),跨文件引用用 XincangUploadDtos.Attachment 限定 - UploadResponse / UploadData 保留(此前无调用方,按约定留作已定义未接入) - 字段、@JsonProperty、@JsonInclude / @JsonIgnoreProperties 原样搬移, 序列化行为不变 - 4 处 mapper 的 javadoc 引用改为新类名;README 的 dto 目录说明同步 验证:mvn test 全量通过(信仓 118 个用例 + 3 个探针跳过)。 Co-Authored-By: Claude Code <noreply@anthropic.com>master
28 changed files with 1931 additions and 1696 deletions
@ -0,0 +1,144 @@
@@ -0,0 +1,144 @@
|
||||
package common.ecommerce.xincang.dto; |
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
||||
import com.fasterxml.jackson.annotation.JsonInclude; |
||||
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 信仓报文结构:最优渠道({@code POST api.calculate_order_v3})。 |
||||
*/ |
||||
public final class XincangChannelRecommendDtos { |
||||
|
||||
private XincangChannelRecommendDtos() { |
||||
} |
||||
|
||||
/** |
||||
* 最优渠道请求({@code GET api.calculate_order_v3} 的 JSON body)。 |
||||
* |
||||
* <p>文档写的是 GET + {@code application/json} body;信仓其它 GET 都是 query, |
||||
* 这里按文档原样用 JSON body。</p> |
||||
*/ |
||||
@JsonInclude(JsonInclude.Include.NON_NULL) |
||||
public static final class CalculateV3Request { |
||||
|
||||
/** 产品信息;必填。 */ |
||||
@JsonProperty("products") |
||||
public List<Product> products; |
||||
|
||||
/** 邮编;必填。 */ |
||||
@JsonProperty("postcode") |
||||
public String postcode; |
||||
|
||||
/** 是否签名:是 / 否;必填。 */ |
||||
@JsonProperty("is_sign") |
||||
public String isSign; |
||||
|
||||
/** 仓库代码;不传由仓择优。 */ |
||||
@JsonProperty("warehouse_code") |
||||
public String warehouseCode; |
||||
|
||||
/** 一行商品。 */ |
||||
@JsonInclude(JsonInclude.Include.NON_NULL) |
||||
public static final class Product { |
||||
|
||||
/** 产品 SKU。 */ |
||||
@JsonProperty("sku") |
||||
public String sku; |
||||
|
||||
/** 件数(字符串)。 */ |
||||
@JsonProperty("qty") |
||||
public String qty; |
||||
} |
||||
} |
||||
|
||||
/** 最优渠道响应 {@code rst}。 */ |
||||
@JsonIgnoreProperties(ignoreUnknown = true) |
||||
public static final class CalculateV3Result { |
||||
|
||||
/** 最优方案;无可用渠道时为 null。 */ |
||||
@JsonProperty("optimalPlan") |
||||
public OptimalPlan optimalPlan; |
||||
|
||||
/** 所有仓库的报价。 */ |
||||
@JsonProperty("warehouseFeeList") |
||||
public List<WarehouseFee> warehouseFeeList; |
||||
|
||||
/** 最优方案。 */ |
||||
@JsonIgnoreProperties(ignoreUnknown = true) |
||||
public static final class OptimalPlan { |
||||
|
||||
@JsonProperty("warehouse") |
||||
public String warehouse; |
||||
|
||||
/** 物流方式(渠道码)。 */ |
||||
@JsonProperty("service_code") |
||||
public String serviceCode; |
||||
|
||||
/** 总费用。 */ |
||||
@JsonProperty("sum") |
||||
public String sum; |
||||
} |
||||
|
||||
/** 单个仓库的费用列表。 */ |
||||
@JsonIgnoreProperties(ignoreUnknown = true) |
||||
public static final class WarehouseFee { |
||||
|
||||
@JsonProperty("warehouse") |
||||
public String warehouse; |
||||
|
||||
/** 库存是否足够:1 够 / 0 不够。 */ |
||||
@JsonProperty("isInventoryEnough") |
||||
public String isInventoryEnough; |
||||
|
||||
/** 库存不足原因。 */ |
||||
@JsonProperty("insufficientStockError") |
||||
public String insufficientStockError; |
||||
|
||||
/** 该仓下的渠道报价。 */ |
||||
@JsonProperty("logisticsService") |
||||
public List<LogisticsService> logisticsService; |
||||
} |
||||
|
||||
/** 单个物流渠道的报价。 */ |
||||
@JsonIgnoreProperties(ignoreUnknown = true) |
||||
public static final class LogisticsService { |
||||
|
||||
@JsonProperty("service_code") |
||||
public String serviceCode; |
||||
|
||||
/** 总费用。 */ |
||||
@JsonProperty("sum") |
||||
public String sum; |
||||
|
||||
/** 费用明细。 */ |
||||
@JsonProperty("fees") |
||||
public List<Fee> fees; |
||||
} |
||||
|
||||
/** 一条费用明细。 */ |
||||
@JsonIgnoreProperties(ignoreUnknown = true) |
||||
public static final class Fee { |
||||
|
||||
/** 一级分类,如「快递费」。 */ |
||||
@JsonProperty("big_fee_type") |
||||
public String bigFeeType; |
||||
|
||||
/** 费用项,如「燃油附加费」。 */ |
||||
@JsonProperty("fee_type") |
||||
public String feeType; |
||||
|
||||
/** 费用。 */ |
||||
@JsonProperty("customer_fee") |
||||
public String customerFee; |
||||
} |
||||
} |
||||
|
||||
/** 最优渠道响应外层。 */ |
||||
@JsonIgnoreProperties(ignoreUnknown = true) |
||||
public static final class CalculateV3Response { |
||||
|
||||
@JsonProperty("rst") |
||||
public CalculateV3Result rst; |
||||
} |
||||
} |
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,104 @@
@@ -0,0 +1,104 @@
|
||||
package common.ecommerce.xincang.dto; |
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
||||
import com.fasterxml.jackson.annotation.JsonInclude; |
||||
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
|
||||
/** |
||||
* 信仓报文结构:新增预报({@code POST forecast.do_forecast}):只建单,不带商品明细。 |
||||
*/ |
||||
public final class XincangForecastCreateDtos { |
||||
|
||||
private XincangForecastCreateDtos() { |
||||
} |
||||
|
||||
/** |
||||
* 新增预报请求({@code POST forecast.do_forecast})。 |
||||
* |
||||
* <p>只建单,不带商品明细;明细走「完善资料」。</p> |
||||
*/ |
||||
@JsonInclude(JsonInclude.Include.NON_NULL) |
||||
public static final class ForecastCreateRequest { |
||||
|
||||
/** |
||||
* 客户 id。 |
||||
* |
||||
* <p>文档标注<b>已舍弃</b>,SDK 不填;保留占位以与文档字段表对齐。</p> |
||||
*/ |
||||
@JsonProperty("customer_id") |
||||
@Deprecated |
||||
public String customerId; |
||||
|
||||
/** 目的地仓。 */ |
||||
@JsonProperty("dest_warehouse") |
||||
public String destWarehouse; |
||||
|
||||
/** 出运类型:1 空运 / 2 海运。 */ |
||||
@JsonProperty("shipment_type") |
||||
public String shipmentType; |
||||
|
||||
/** 柜型:0 20GP / 1 40GP / 2 40HQ / 3 45HQ / 4 纸箱入库 / 5 托盘入库。 */ |
||||
@JsonProperty("cabinet_type") |
||||
public String cabinetType; |
||||
|
||||
/** 柜号。 */ |
||||
@JsonProperty("cabinet_no") |
||||
public String cabinetNo; |
||||
|
||||
/** 参考发货时间。 */ |
||||
@JsonProperty("rfc_etd") |
||||
public String rfcEtd; |
||||
|
||||
/** 参考到港时间。 */ |
||||
@JsonProperty("rfc_eta") |
||||
public String rfcEta; |
||||
|
||||
/** 发货需求:1 一件代发 / 2 FBA 中转。 */ |
||||
@JsonProperty("delivery_requirements") |
||||
public String deliveryRequirements; |
||||
|
||||
/** 参考 SKU 种类数量。 */ |
||||
@JsonProperty("rfc_sku_count") |
||||
public String rfcSkuCount; |
||||
|
||||
/** 中文名称。 */ |
||||
@JsonProperty("chn_name") |
||||
public String chnName; |
||||
|
||||
/** 是否超 120cm:1 是 / 0 否。 */ |
||||
@JsonProperty("is_oversize") |
||||
public String isOversize; |
||||
|
||||
/** 超尺寸备注。 */ |
||||
@JsonProperty("oversize_val") |
||||
public String oversizeVal; |
||||
|
||||
@JsonProperty("remark") |
||||
public String remark; |
||||
|
||||
/** 船务公司 id。 */ |
||||
@JsonProperty("shipping_company_id") |
||||
public String shippingCompanyId; |
||||
|
||||
/** 预报托盘数;柜型为托盘入库时填。 */ |
||||
@JsonProperty("forecast_pallet_qty") |
||||
public String forecastPalletQty; |
||||
} |
||||
|
||||
/** 新增预报响应 {@code rst}。 */ |
||||
@JsonIgnoreProperties(ignoreUnknown = true) |
||||
public static final class ForecastCreateResult { |
||||
|
||||
/** 预报单号;完善资料与提交都用它。 */ |
||||
@JsonProperty("order_no") |
||||
public String orderNo; |
||||
} |
||||
|
||||
/** 新增预报响应外层。 */ |
||||
@JsonIgnoreProperties(ignoreUnknown = true) |
||||
public static final class ForecastCreateResponse { |
||||
|
||||
@JsonProperty("rst") |
||||
public ForecastCreateResult rst; |
||||
} |
||||
} |
||||
@ -0,0 +1,222 @@
@@ -0,0 +1,222 @@
|
||||
package common.ecommerce.xincang.dto; |
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
||||
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 信仓报文结构:预报详情({@code GET forecast.forecast_detail})。 |
||||
*/ |
||||
public final class XincangForecastDetailDtos { |
||||
|
||||
private XincangForecastDetailDtos() { |
||||
} |
||||
|
||||
/** |
||||
* 预报详情({@code GET forecast.forecast_detail})的 {@code rst}。 |
||||
* |
||||
* <p>时间字段是北京时间。</p> |
||||
*/ |
||||
@JsonIgnoreProperties(ignoreUnknown = true) |
||||
public static final class ForecastDetail { |
||||
|
||||
/** 预报单 id。 */ |
||||
@JsonProperty("id") |
||||
public String id; |
||||
|
||||
@JsonProperty("forecast_no") |
||||
public String forecastNo; |
||||
|
||||
/** 中文名称。 */ |
||||
@JsonProperty("chn_name") |
||||
public String chnName; |
||||
|
||||
/** 客户 id。 */ |
||||
@JsonProperty("customer_id") |
||||
public String customerId; |
||||
|
||||
/** 客户代码。 */ |
||||
@JsonProperty("customer_name") |
||||
public String customerName; |
||||
|
||||
/** 目的仓 id / 代码。 */ |
||||
@JsonProperty("dest_warehouse") |
||||
public String destWarehouseId; |
||||
@JsonProperty("dest_warehouse_name") |
||||
public String destWarehouseName; |
||||
|
||||
/** 出运类型。 */ |
||||
@JsonProperty("shipment_type") |
||||
public String shipmentType; |
||||
|
||||
/** 参考编号。 */ |
||||
@JsonProperty("ref_no") |
||||
public String refNo; |
||||
|
||||
/** 柜型 / 柜号。 */ |
||||
@JsonProperty("cabinet_type") |
||||
public String cabinetType; |
||||
@JsonProperty("cabinet_no") |
||||
public String cabinetNo; |
||||
|
||||
/** 预计发货 / 到港时间。 */ |
||||
@JsonProperty("rfc_etd") |
||||
public String rfcEtd; |
||||
@JsonProperty("rfc_eta") |
||||
public String rfcEta; |
||||
/** 实际发货 / 到港时间。 */ |
||||
@JsonProperty("etd") |
||||
public String etd; |
||||
@JsonProperty("eta") |
||||
public String eta; |
||||
|
||||
/** 是否超 120cm。 */ |
||||
@JsonProperty("is_oversize") |
||||
public String isOversize; |
||||
@JsonProperty("oversize_val") |
||||
public String oversizeVal; |
||||
|
||||
/** 发货需求。 */ |
||||
@JsonProperty("delivery_requirements") |
||||
public String deliveryRequirements; |
||||
|
||||
/** 预报时间。 */ |
||||
@JsonProperty("forecast_time") |
||||
public String forecastTime; |
||||
|
||||
/** 参考 SKU 种类数。 */ |
||||
@JsonProperty("rfc_sku_count") |
||||
public String rfcSkuCount; |
||||
|
||||
@JsonProperty("remark") |
||||
public String remark; |
||||
|
||||
/** 托盘数:预报 / 实收 / 上架 / 计费。 */ |
||||
@JsonProperty("forecast_pallet_qty") |
||||
public String forecastPalletQty; |
||||
@JsonProperty("receive_pallet_qty") |
||||
public String receivePalletQty; |
||||
@JsonProperty("shelf_pallet_qty") |
||||
public String shelfPalletQty; |
||||
@JsonProperty("bill_pallet_qty") |
||||
public String billPalletQty; |
||||
|
||||
/** 到仓 / 卸柜清点 / 清点完成 / 上架 / 还柜时间。 */ |
||||
@JsonProperty("receive_time") |
||||
public String receiveTime; |
||||
@JsonProperty("unlade_time") |
||||
public String unladeTime; |
||||
@JsonProperty("check_time") |
||||
public String checkTime; |
||||
@JsonProperty("putaway_time") |
||||
public String putawayTime; |
||||
@JsonProperty("leave_time") |
||||
public String leaveTime; |
||||
|
||||
/** 是否需要内箱贴 / 外箱贴:1 是 / 0 否。 */ |
||||
@JsonProperty("is_inner_box_sticker") |
||||
public String isInnerBoxSticker; |
||||
@JsonProperty("is_outer_box_sticker") |
||||
public String isOuterBoxSticker; |
||||
|
||||
@JsonProperty("other_need") |
||||
public String otherNeed; |
||||
|
||||
@JsonProperty("gmt_create") |
||||
public String gmtCreate; |
||||
@JsonProperty("gmt_modify") |
||||
public String gmtModify; |
||||
|
||||
/** 预报状态码,见 {@code XincangForecastStatus}。 */ |
||||
@JsonProperty("state") |
||||
public String state; |
||||
@JsonProperty("state_name") |
||||
public String stateName; |
||||
|
||||
@JsonProperty("products") |
||||
public List<ForecastDetailProduct> products; |
||||
} |
||||
|
||||
/** 预报详情里的产品行。 */ |
||||
@JsonIgnoreProperties(ignoreUnknown = true) |
||||
public static final class ForecastDetailProduct { |
||||
|
||||
@JsonProperty("product_no") |
||||
public String productNo; |
||||
|
||||
@JsonProperty("product_name") |
||||
public String productName; |
||||
|
||||
/** 件数。 */ |
||||
@JsonProperty("sku_count") |
||||
public String skuCount; |
||||
|
||||
/** 箱数。 */ |
||||
@JsonProperty("box_count") |
||||
public String boxCount; |
||||
|
||||
/** 清点箱数。 */ |
||||
@JsonProperty("check_box_qty") |
||||
public String checkBoxQty; |
||||
|
||||
/** 打托件数 / 上架件数。 */ |
||||
@JsonProperty("pallet_sku_count") |
||||
public String palletSkuCount; |
||||
@JsonProperty("put_on_sku_count") |
||||
public String putOnSkuCount; |
||||
|
||||
/** 装箱率。 */ |
||||
@JsonProperty("packing_rate") |
||||
public String packingRate; |
||||
|
||||
/** 体积(立方厘米)。 */ |
||||
@JsonProperty("volume_cm") |
||||
public String volumeCm; |
||||
|
||||
/** 中文名。 */ |
||||
@JsonProperty("chn_name") |
||||
public String chnName; |
||||
|
||||
/** 英文名。 */ |
||||
@JsonProperty("en_name") |
||||
public String enName; |
||||
|
||||
/** 体积(立方英寸)。 */ |
||||
@JsonProperty("volume_ln") |
||||
public String volumeLn; |
||||
|
||||
/** 长(厘米)。 */ |
||||
@JsonProperty("size_l_cm") |
||||
public String sizeLCm; |
||||
/** 宽(厘米)。 */ |
||||
@JsonProperty("size_w_cm") |
||||
public String sizeWCm; |
||||
/** 高(厘米)。 */ |
||||
@JsonProperty("size_h_cm") |
||||
public String sizeHCm; |
||||
/** 长(英寸)。 */ |
||||
@JsonProperty("size_l_ln") |
||||
public String sizeLLn; |
||||
/** 宽(英寸)。 */ |
||||
@JsonProperty("size_w_ln") |
||||
public String sizeWLn; |
||||
/** 高(英寸)。 */ |
||||
@JsonProperty("size_h_ln") |
||||
public String sizeHLn; |
||||
|
||||
/** 预报产品创建时间。 */ |
||||
@JsonProperty("gmt_create") |
||||
public String gmtCreate; |
||||
/** 预报产品最后修改时间。 */ |
||||
@JsonProperty("gmt_modify") |
||||
public String gmtModify; |
||||
} |
||||
|
||||
/** 预报详情响应外层。 */ |
||||
@JsonIgnoreProperties(ignoreUnknown = true) |
||||
public static final class ForecastDetailResponse { |
||||
|
||||
@JsonProperty("rst") |
||||
public ForecastDetail rst; |
||||
} |
||||
} |
||||
@ -0,0 +1,150 @@
@@ -0,0 +1,150 @@
|
||||
package common.ecommerce.xincang.dto; |
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude; |
||||
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
|
||||
/** |
||||
* 信仓报文结构:完善预报资料({@code POST forecast.do_improve_forecast}):商品明细整段覆盖。 |
||||
*/ |
||||
public final class XincangForecastImproveDtos { |
||||
|
||||
private XincangForecastImproveDtos() { |
||||
} |
||||
|
||||
/** |
||||
* 完善预报资料请求({@code POST forecast.do_improve_forecast})。 |
||||
* |
||||
* <p>{@code products} 是一段 JSON 字符串,新数据直接覆盖旧数据。</p> |
||||
*/ |
||||
@JsonInclude(JsonInclude.Include.NON_NULL) |
||||
public static final class ForecastImproveRequest { |
||||
|
||||
/** |
||||
* 预报单 id。 |
||||
* |
||||
* <p>文档标注<b>已舍弃</b>,SDK 不填;保留占位以与文档字段表对齐。</p> |
||||
*/ |
||||
@JsonProperty("id") |
||||
@Deprecated |
||||
public String id; |
||||
|
||||
/** |
||||
* 客户 id。 |
||||
* |
||||
* <p>文档标注<b>已舍弃</b>,SDK 不填。</p> |
||||
*/ |
||||
@JsonProperty("customer_id") |
||||
@Deprecated |
||||
public String customerId; |
||||
|
||||
@JsonProperty("forecast_no") |
||||
public String forecastNo; |
||||
|
||||
@JsonProperty("dest_warehouse") |
||||
public String destWarehouse; |
||||
|
||||
@JsonProperty("shipment_type") |
||||
public String shipmentType; |
||||
|
||||
/** 参考编号,长度上限 32。 */ |
||||
@JsonProperty("ref_no") |
||||
public String refNo; |
||||
|
||||
/** |
||||
* 新增预报柜号。 |
||||
* |
||||
* <p>文档标注<b>已舍弃</b>,SDK 不填。</p> |
||||
*/ |
||||
@JsonProperty("old_cabinet_no") |
||||
@Deprecated |
||||
public String oldCabinetNo; |
||||
|
||||
/** 柜型:0 20GP / 1 40GP / 2 40HQ / 3 45HQ / 4 纸箱入库 / 5 托盘入库。 */ |
||||
@JsonProperty("cabinet_type") |
||||
public String cabinetType; |
||||
|
||||
/** 柜号。 */ |
||||
@JsonProperty("cabinet_no") |
||||
public String cabinetNo; |
||||
|
||||
/** 发货时间。 */ |
||||
@JsonProperty("etd") |
||||
public String etd; |
||||
|
||||
/** 到港时间。 */ |
||||
@JsonProperty("eta") |
||||
public String eta; |
||||
|
||||
/** |
||||
* 最晚免费时间(提柜)。 |
||||
* |
||||
* <p>文档标注<b>已舍弃</b>,SDK 不填。</p> |
||||
*/ |
||||
@JsonProperty("lfd") |
||||
@Deprecated |
||||
public String lfd; |
||||
|
||||
@JsonProperty("delivery_requirements") |
||||
public String deliveryRequirements; |
||||
|
||||
@JsonProperty("remark") |
||||
public String remark; |
||||
|
||||
/** 其他需求,如 内箱贴,外箱贴。 */ |
||||
@JsonProperty("other_need") |
||||
public String otherNeed; |
||||
|
||||
/** |
||||
* 总件数。 |
||||
* |
||||
* <p>文档标注<b>已舍弃</b>(由 {@code products} 汇总),SDK 不填。</p> |
||||
*/ |
||||
@JsonProperty("sku_count_sum") |
||||
@Deprecated |
||||
public String skuCountSum; |
||||
|
||||
/** |
||||
* 总箱数。 |
||||
* |
||||
* <p>文档标注<b>已舍弃</b>(由 {@code products} 汇总),SDK 不填。</p> |
||||
*/ |
||||
@JsonProperty("box_count_sum") |
||||
@Deprecated |
||||
public String boxCountSum; |
||||
|
||||
/** 产品明细 JSON 字符串。 */ |
||||
@JsonProperty("products") |
||||
public String products; |
||||
|
||||
/** 船务公司 id;通过【获取船务公司】接口取得。 */ |
||||
@JsonProperty("shipping_company_id") |
||||
public String shippingCompanyId; |
||||
|
||||
/** 预报托盘数;柜型为托盘入库时填写。 */ |
||||
@JsonProperty("forecast_pallet_qty") |
||||
public String forecastPalletQty; |
||||
} |
||||
|
||||
/** 完善资料里的产品行(序列化进 {@code products} 字符串)。 */ |
||||
@JsonInclude(JsonInclude.Include.NON_NULL) |
||||
public static final class ForecastProduct { |
||||
|
||||
@JsonProperty("product_no") |
||||
public String productNo; |
||||
|
||||
/** 件数。 */ |
||||
@JsonProperty("sku_count") |
||||
public String skuCount; |
||||
|
||||
/** 箱数。 */ |
||||
@JsonProperty("box_count") |
||||
public String boxCount; |
||||
|
||||
/** 批次号;可选。 */ |
||||
@JsonProperty("batch_no") |
||||
public String batchNo; |
||||
|
||||
@JsonProperty("remark") |
||||
public String remark; |
||||
} |
||||
} |
||||
@ -0,0 +1,64 @@
@@ -0,0 +1,64 @@
|
||||
package common.ecommerce.xincang.dto; |
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
||||
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
|
||||
/** |
||||
* 信仓报文结构:登录({@code GET /api.login}):换取客户级 token。 |
||||
*/ |
||||
public final class XincangLoginDtos { |
||||
|
||||
private XincangLoginDtos() { |
||||
} |
||||
|
||||
/** |
||||
* 登录响应({@code GET /api.login})。 |
||||
* |
||||
* <p>注意与业务接口不同:登录的 {@code rst} <b>没有</b> {@code code/msg/data} 包裹, |
||||
* 而是直接给出客户与 token 字段。</p> |
||||
*/ |
||||
@JsonIgnoreProperties(ignoreUnknown = true) |
||||
public static final class LoginResponse { |
||||
|
||||
/** 登录结果;业务失败时可能为 null。 */ |
||||
@JsonProperty("rst") |
||||
public LoginResult rst; |
||||
|
||||
/** 0 表示成功。 */ |
||||
@JsonProperty("errno") |
||||
public Integer errno; |
||||
|
||||
/** 错误描述;成功时为空串。 */ |
||||
@JsonProperty("err") |
||||
public String err; |
||||
|
||||
/** 信仓侧链路号。 */ |
||||
@JsonProperty("trace_id") |
||||
public String traceId; |
||||
} |
||||
|
||||
/** 登录结果的 {@code rst} 部分。 */ |
||||
@JsonIgnoreProperties(ignoreUnknown = true) |
||||
public static final class LoginResult { |
||||
|
||||
/** 客户 id。 */ |
||||
@JsonProperty("id") |
||||
public String customerId; |
||||
|
||||
/** 回显的 APIKEY,正常等于登录用的 appkey。 */ |
||||
@JsonProperty("api_client_id") |
||||
public String apiClientId; |
||||
|
||||
/** 回显的 APISECRET;不需要也不应落盘,仅用于排障时核对身份。 */ |
||||
@JsonProperty("api_client_secret") |
||||
public String apiClientSecret; |
||||
|
||||
/** 过期时间,北京时间 {@code yyyy-MM-dd HH:mm:ss}。 */ |
||||
@JsonProperty("token_expire_time") |
||||
public String tokenExpireTime; |
||||
|
||||
/** 令牌本体(形如 {@code {D0A7A4FB-...}})。 */ |
||||
@JsonProperty("token") |
||||
public String token; |
||||
} |
||||
} |
||||
@ -0,0 +1,49 @@
@@ -0,0 +1,49 @@
|
||||
package common.ecommerce.xincang.dto; |
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
||||
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 信仓报文结构:客户承运商列表({@code GET api.get_customer_logistics})。 |
||||
*/ |
||||
public final class XincangLogisticsDtos { |
||||
|
||||
private XincangLogisticsDtos() { |
||||
} |
||||
|
||||
/** 客户承运商列表响应 {@code rst}({@code GET api.get_customer_logistics})。 */ |
||||
@JsonIgnoreProperties(ignoreUnknown = true) |
||||
public static final class LogisticsListResult { |
||||
|
||||
@JsonProperty("code") |
||||
public String code; |
||||
|
||||
@JsonProperty("msg") |
||||
public String msg; |
||||
|
||||
@JsonProperty("data") |
||||
public List<LogisticsRow> data; |
||||
|
||||
/** 总条数(字符串)。 */ |
||||
@JsonProperty("count") |
||||
public String count; |
||||
|
||||
/** 一行承运商。 */ |
||||
@JsonIgnoreProperties(ignoreUnknown = true) |
||||
public static final class LogisticsRow { |
||||
|
||||
/** 物流方式代码,如 {@code FEDEX-G}。 */ |
||||
@JsonProperty("logistics_type") |
||||
public String logisticsType; |
||||
} |
||||
} |
||||
|
||||
/** 客户承运商列表响应外层。 */ |
||||
@JsonIgnoreProperties(ignoreUnknown = true) |
||||
public static final class LogisticsListResponse { |
||||
|
||||
@JsonProperty("rst") |
||||
public LogisticsListResult rst; |
||||
} |
||||
} |
||||
@ -0,0 +1,55 @@
@@ -0,0 +1,55 @@
|
||||
package common.ecommerce.xincang.dto; |
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
||||
import com.fasterxml.jackson.annotation.JsonInclude; |
||||
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
|
||||
/** |
||||
* 信仓报文结构:新增订单 / 一单多件({@code POST api.add_order_multiple})。 |
||||
*/ |
||||
public final class XincangOrderCreateDtos { |
||||
|
||||
private XincangOrderCreateDtos() { |
||||
} |
||||
|
||||
/** |
||||
* 新增订单(一单多件)请求中的一条商品。 |
||||
* |
||||
* <p>信仓把整组商品 JSON 序列化后放进 multipart 的 {@code products} 字段。</p> |
||||
*/ |
||||
@JsonInclude(JsonInclude.Include.NON_NULL) |
||||
public static final class OrderProduct { |
||||
|
||||
/** 产品 SKU。 */ |
||||
@JsonProperty("product_sku") |
||||
public String productSku; |
||||
|
||||
/** 数量(字符串)。 */ |
||||
@JsonProperty("sku_count") |
||||
public String skuCount; |
||||
} |
||||
|
||||
/** |
||||
* 新增订单(一单多件)响应中的 {@code rst}。 |
||||
*/ |
||||
@JsonIgnoreProperties(ignoreUnknown = true) |
||||
public static final class OrderResult { |
||||
|
||||
/** 信仓系统单号(DS-...)。 */ |
||||
@JsonProperty("order_no") |
||||
public String orderNo; |
||||
|
||||
/** 信仓内部订单 id。 */ |
||||
@JsonProperty("order_id") |
||||
public String orderId; |
||||
} |
||||
|
||||
/** 新增订单响应外层,用于取 {@code rst}。 */ |
||||
@JsonIgnoreProperties(ignoreUnknown = true) |
||||
public static final class OrderResponse { |
||||
|
||||
/** 下单结果;业务失败时为 null。 */ |
||||
@JsonProperty("rst") |
||||
public OrderResult rst; |
||||
} |
||||
} |
||||
@ -0,0 +1,173 @@
@@ -0,0 +1,173 @@
|
||||
package common.ecommerce.xincang.dto; |
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
||||
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 信仓报文结构:订单详情({@code GET api.get_order})。 |
||||
*/ |
||||
public final class XincangOrderDetailDtos { |
||||
|
||||
private XincangOrderDetailDtos() { |
||||
} |
||||
|
||||
/** |
||||
* 订单详情({@code GET api.get_order})的 {@code rst}。 |
||||
* |
||||
* <p>字段名以文档为准;时间均为北京时间 {@code yyyy-MM-dd HH:mm:ss}(日期字段为 |
||||
* {@code yyyy-MM-dd})。空值可能是空串,适配器里统一转 null。</p> |
||||
*/ |
||||
@JsonIgnoreProperties(ignoreUnknown = true) |
||||
public static final class OrderDetail { |
||||
|
||||
/** 订单 id。 */ |
||||
@JsonProperty("id") |
||||
public String id; |
||||
|
||||
/** 信仓系统单号(DS-...)。 */ |
||||
@JsonProperty("order_no") |
||||
public String orderNo; |
||||
|
||||
/** 订单状态码,见 {@code XincangOrderStatus}。 */ |
||||
@JsonProperty("state") |
||||
public String state; |
||||
|
||||
/** 状态名。 */ |
||||
@JsonProperty("state_name") |
||||
public String stateName; |
||||
|
||||
/** 仓侧报错信息;正常为空。 */ |
||||
@JsonProperty("api_error") |
||||
public String apiError; |
||||
|
||||
/** 跟踪号。 */ |
||||
@JsonProperty("gzh") |
||||
public String trackingNumber; |
||||
|
||||
/** 面单 URL。 */ |
||||
@JsonProperty("face_url") |
||||
public String faceUrl; |
||||
|
||||
/** 参考号,即我们下发的 {@code ckh}。 */ |
||||
@JsonProperty("ckh") |
||||
public String ckh; |
||||
|
||||
/** 订单类型:common / wayfair。 */ |
||||
@JsonProperty("order_type") |
||||
public String orderType; |
||||
|
||||
/** 产品明细(一票多件)。 */ |
||||
@JsonProperty("products") |
||||
public List<OrderDetailProduct> products; |
||||
|
||||
/** 件数。 */ |
||||
@JsonProperty("sku_count") |
||||
public String skuCount; |
||||
|
||||
@JsonProperty("dim_length") |
||||
public String dimLength; |
||||
@JsonProperty("dim_width") |
||||
public String dimWidth; |
||||
@JsonProperty("dim_height") |
||||
public String dimHeight; |
||||
@JsonProperty("dim_divisor") |
||||
public String dimDivisor; |
||||
|
||||
/** 实重(磅)。 */ |
||||
@JsonProperty("weight_lbs") |
||||
public String weightLbs; |
||||
/** 计费重(磅)。 */ |
||||
@JsonProperty("billing_weight_lbs") |
||||
public String billingWeightLbs; |
||||
/** 体积重(磅)。 */ |
||||
@JsonProperty("volume_weight_lbs") |
||||
public String volumeWeightLbs; |
||||
|
||||
@JsonProperty("product_sku") |
||||
public String productSku; |
||||
@JsonProperty("product_name") |
||||
public String productName; |
||||
@JsonProperty("source_sku") |
||||
public String sourceSku; |
||||
|
||||
@JsonProperty("warehouse_id") |
||||
public String warehouseId; |
||||
@JsonProperty("warehouse_code") |
||||
public String warehouseCode; |
||||
|
||||
@JsonProperty("country") |
||||
public String country; |
||||
@JsonProperty("province") |
||||
public String province; |
||||
@JsonProperty("city") |
||||
public String city; |
||||
@JsonProperty("address") |
||||
public String address; |
||||
@JsonProperty("address2") |
||||
public String address2; |
||||
@JsonProperty("postcode") |
||||
public String postcode; |
||||
@JsonProperty("receive_user") |
||||
public String receiveUser; |
||||
@JsonProperty("phone") |
||||
public String phone; |
||||
@JsonProperty("email") |
||||
public String email; |
||||
|
||||
/** 物流方式字典值。 */ |
||||
@JsonProperty("logistics_type") |
||||
public String logisticsType; |
||||
@JsonProperty("is_sign") |
||||
public String isSign; |
||||
@JsonProperty("zone") |
||||
public String zone; |
||||
|
||||
/** 总费用。 */ |
||||
@JsonProperty("total_amount") |
||||
public String totalAmount; |
||||
@JsonProperty("repair_amount") |
||||
public String repairAmount; |
||||
|
||||
@JsonProperty("approve_time") |
||||
public String approveTime; |
||||
/** 发货时间。 */ |
||||
@JsonProperty("delivered_time") |
||||
public String deliveredTime; |
||||
@JsonProperty("shop_name") |
||||
public String shopName; |
||||
@JsonProperty("gmt_create") |
||||
public String gmtCreate; |
||||
@JsonProperty("gmt_modify") |
||||
public String gmtModify; |
||||
@JsonProperty("gmt_cancel") |
||||
public String gmtCancel; |
||||
/** 截单时间。 */ |
||||
@JsonProperty("intercept_time") |
||||
public String interceptTime; |
||||
} |
||||
|
||||
/** 订单详情里的产品行。 */ |
||||
@JsonIgnoreProperties(ignoreUnknown = true) |
||||
public static final class OrderDetailProduct { |
||||
|
||||
@JsonProperty("product_id") |
||||
public String productId; |
||||
/** 产品 SKU。 */ |
||||
@JsonProperty("sku") |
||||
public String sku; |
||||
/** 数量。 */ |
||||
@JsonProperty("qty") |
||||
public String qty; |
||||
@JsonProperty("name_zh_cn") |
||||
public String nameZhCn; |
||||
} |
||||
|
||||
/** 订单详情响应外层,用于取 {@code rst}。 */ |
||||
@JsonIgnoreProperties(ignoreUnknown = true) |
||||
public static final class OrderDetailResponse { |
||||
|
||||
@JsonProperty("rst") |
||||
public OrderDetail rst; |
||||
} |
||||
} |
||||
@ -0,0 +1,30 @@
@@ -0,0 +1,30 @@
|
||||
package common.ecommerce.xincang.dto; |
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
||||
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
|
||||
/** |
||||
* 信仓报文结构:产品列表({@code GET api.productlist})。 |
||||
*/ |
||||
public final class XincangProductListDtos { |
||||
|
||||
private XincangProductListDtos() { |
||||
} |
||||
|
||||
/** |
||||
* 产品列表响应({@code GET api.productlist})中 {@code rst.data[]} 的元素。 |
||||
* |
||||
* <p>只声明判断「是否已存在、处于什么状态」需要的字段。</p> |
||||
*/ |
||||
@JsonIgnoreProperties(ignoreUnknown = true) |
||||
public static final class ProductListItem { |
||||
|
||||
/** 产品 SKU。 */ |
||||
@JsonProperty("product_no") |
||||
public String productNo; |
||||
|
||||
/** 产品状态:0 临时产品 / 1 正式产品。 */ |
||||
@JsonProperty("state") |
||||
public String state; |
||||
} |
||||
} |
||||
@ -0,0 +1,138 @@
@@ -0,0 +1,138 @@
|
||||
package common.ecommerce.xincang.dto; |
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude; |
||||
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
import java.math.BigDecimal; |
||||
|
||||
/** |
||||
* 信仓报文结构:新增 / 更新产品({@code POST api.add_product} / {@code api.update_product})。 |
||||
* |
||||
* <p>两个接口共用同一套请求 schema,所以放在同一个文件。</p> |
||||
*/ |
||||
public final class XincangProductSaveDtos { |
||||
|
||||
private XincangProductSaveDtos() { |
||||
} |
||||
|
||||
/** |
||||
* 新增 / 更新产品请求({@code POST api.add_product} / {@code api.update_product})。 |
||||
* |
||||
* <p>信仓这两个接口的 {@code token} 放在 <b>请求体</b>里(文档 required 列表含 {@code token}); |
||||
* 新增接口的 query 里同时也收一份,见 {@code XincangRequestFactory}。</p> |
||||
* |
||||
* <p>单位:金额美元、尺寸英寸、重量磅;与统一模型(cm / g)的换算在 |
||||
* {@code XincangProductMapper}。</p> |
||||
*/ |
||||
@JsonInclude(JsonInclude.Include.NON_NULL) |
||||
public static final class ProductRequest { |
||||
|
||||
/** 令牌。 */ |
||||
@JsonProperty("token") |
||||
public String token; |
||||
|
||||
/** 产品 SKU。 */ |
||||
@JsonProperty("product_no") |
||||
public String productNo; |
||||
|
||||
/** 中文名。 */ |
||||
@JsonProperty("chn_name") |
||||
public String chnName; |
||||
|
||||
/** 金额,美元,最长两位小数。 */ |
||||
@JsonProperty("amount") |
||||
public BigDecimal amount; |
||||
|
||||
/** 产品条码。 */ |
||||
@JsonProperty("bar_code") |
||||
public String barCode; |
||||
|
||||
/** 毛重,磅,最长四位小数。 */ |
||||
@JsonProperty("weight_lbs") |
||||
public BigDecimal weightLbs; |
||||
|
||||
/** 装箱率 / 箱率。 */ |
||||
@JsonProperty("packing_rate") |
||||
public Integer packingRate; |
||||
|
||||
/** 长,英寸,最长四位小数。 */ |
||||
@JsonProperty("size_l_ln") |
||||
public BigDecimal sizeLLn; |
||||
|
||||
/** 宽,英寸,最长四位小数。 */ |
||||
@JsonProperty("size_w_ln") |
||||
public BigDecimal sizeWLn; |
||||
|
||||
/** 高,英寸,最长四位小数。 */ |
||||
@JsonProperty("size_h_ln") |
||||
public BigDecimal sizeHLn; |
||||
|
||||
/** 备注。 */ |
||||
@JsonProperty("remark") |
||||
public String remark; |
||||
|
||||
/** 仓库码(信仓 {@code ckm})。 */ |
||||
@JsonProperty("ckm") |
||||
public String ckm; |
||||
|
||||
/** 产品类型:1 普货 / 2 配件 / 3 危险品;不传默认 1。 */ |
||||
@JsonProperty("product_type") |
||||
public Integer productType; |
||||
|
||||
/** 产品品类:0 其它 / 1 家具 / 2 食品 / 3 汽配 / 4 服饰 / 5 化妆品 / 6 鞋类 / 7 玩具 / 8 电子 / 9 数码。 */ |
||||
@JsonProperty("product_category") |
||||
public Integer productCategory; |
||||
|
||||
/** 产品图片;需先调 {@code upload.files}。统一模型暂不承载图片,通常为 null。 */ |
||||
@JsonProperty("product_image") |
||||
public ProductImage productImage; |
||||
|
||||
/** |
||||
* AHS 计费重量。 |
||||
* |
||||
* <p>文档标注<b>已废弃</b>:具体值由各服务商参数自动计算。SDK 不填, |
||||
* 保留占位只为与文档字段表对齐。</p> |
||||
*/ |
||||
@JsonProperty("ahs_weight") |
||||
@Deprecated |
||||
public String ahsWeight; |
||||
|
||||
/** |
||||
* AHS 计费尺寸。 |
||||
* |
||||
* <p>文档标注<b>已废弃</b>:具体值由各服务商参数自动计算。SDK 不填。</p> |
||||
*/ |
||||
@JsonProperty("ahs_dimensions") |
||||
@Deprecated |
||||
public String ahsDimensions; |
||||
|
||||
/** |
||||
* 是否超尺寸。 |
||||
* |
||||
* <p>文档标注<b>已废弃</b>:具体值由各服务商参数自动计算。SDK 不填。</p> |
||||
*/ |
||||
@JsonProperty("oversize") |
||||
@Deprecated |
||||
public String oversize; |
||||
} |
||||
|
||||
/** 产品图片(OSS 元数据)。 */ |
||||
@JsonInclude(JsonInclude.Include.NON_NULL) |
||||
public static final class ProductImage { |
||||
|
||||
/** 存储类型,如 {@code aliyun_oss}。 */ |
||||
@JsonProperty("type") |
||||
public String type; |
||||
|
||||
/** bucket 名。 */ |
||||
@JsonProperty("bucket") |
||||
public String bucket; |
||||
|
||||
/** 对象键。 */ |
||||
@JsonProperty("file_name") |
||||
public String fileName; |
||||
|
||||
/** 可访问 URL。 */ |
||||
@JsonProperty("file_url") |
||||
public String fileUrl; |
||||
} |
||||
} |
||||
@ -0,0 +1,88 @@
@@ -0,0 +1,88 @@
|
||||
package common.ecommerce.xincang.dto; |
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
||||
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 信仓报文结构:库龄列表({@code GET api.stockagelist})。 |
||||
*/ |
||||
public final class XincangStockAgeListDtos { |
||||
|
||||
private XincangStockAgeListDtos() { |
||||
} |
||||
|
||||
/** 库龄列表响应 {@code rst}({@code GET api.stockagelist})。 */ |
||||
@JsonIgnoreProperties(ignoreUnknown = true) |
||||
public static final class StockAgeListResult { |
||||
|
||||
@JsonProperty("code") |
||||
public String code; |
||||
|
||||
@JsonProperty("msg") |
||||
public String msg; |
||||
|
||||
@JsonProperty("data") |
||||
public List<AgeRow> data; |
||||
|
||||
/** 总条数(字符串)。 */ |
||||
@JsonProperty("count") |
||||
public String count; |
||||
|
||||
/** 一行库龄。 */ |
||||
@JsonIgnoreProperties(ignoreUnknown = true) |
||||
public static final class AgeRow { |
||||
|
||||
/** 计费日期 {@code yyyy-MM-dd}。 */ |
||||
@JsonProperty("dt") |
||||
public String dt; |
||||
|
||||
@JsonProperty("warehouse_code") |
||||
public String warehouseCode; |
||||
|
||||
/** 产品 SKU。 */ |
||||
@JsonProperty("product_sku") |
||||
public String productSku; |
||||
|
||||
/** 入库柜号。 */ |
||||
@JsonProperty("cabinet_no") |
||||
public String cabinetNo; |
||||
|
||||
/** 当日费用。 */ |
||||
@JsonProperty("sum_fee") |
||||
public String sumFee; |
||||
|
||||
/** 计费总体积(立方米)。 */ |
||||
@JsonProperty("total_volume_cbm") |
||||
public String totalVolumeCbm; |
||||
|
||||
/** 库存数量。 */ |
||||
@JsonProperty("sku_count") |
||||
public String skuCount; |
||||
|
||||
/** 入库时间 {@code yyyy-MM-dd HH:mm:ss}。 */ |
||||
@JsonProperty("in_stock_time") |
||||
public String inStockTime; |
||||
|
||||
/** 库龄天数。 */ |
||||
@JsonProperty("fee_days") |
||||
public String feeDays; |
||||
|
||||
/** 费率。 */ |
||||
@JsonProperty("config_price") |
||||
public String configPrice; |
||||
|
||||
/** 计费数量。 */ |
||||
@JsonProperty("fee_count") |
||||
public String feeCount; |
||||
} |
||||
} |
||||
|
||||
/** 库龄列表响应外层。 */ |
||||
@JsonIgnoreProperties(ignoreUnknown = true) |
||||
public static final class StockAgeListResponse { |
||||
|
||||
@JsonProperty("rst") |
||||
public StockAgeListResult rst; |
||||
} |
||||
} |
||||
@ -0,0 +1,84 @@
@@ -0,0 +1,84 @@
|
||||
package common.ecommerce.xincang.dto; |
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
||||
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 信仓报文结构:实时库存({@code GET api.stocklist})。 |
||||
*/ |
||||
public final class XincangStockListDtos { |
||||
|
||||
private XincangStockListDtos() { |
||||
} |
||||
|
||||
/** 实时库存响应 {@code rst}({@code GET api.stocklist})。 */ |
||||
@JsonIgnoreProperties(ignoreUnknown = true) |
||||
public static final class StockListResult { |
||||
|
||||
@JsonProperty("code") |
||||
public String code; |
||||
|
||||
@JsonProperty("msg") |
||||
public String msg; |
||||
|
||||
@JsonProperty("data") |
||||
public List<StockRow> data; |
||||
|
||||
/** 总条数(字符串)。 */ |
||||
@JsonProperty("count") |
||||
public String count; |
||||
|
||||
/** 一行库存。 */ |
||||
@JsonIgnoreProperties(ignoreUnknown = true) |
||||
public static final class StockRow { |
||||
|
||||
@JsonProperty("warehouse_code") |
||||
public String warehouseCode; |
||||
|
||||
/** 产品 SKU。 */ |
||||
@JsonProperty("product_sku") |
||||
public String productSku; |
||||
|
||||
/** 实时库存。 */ |
||||
@JsonProperty("real_stock") |
||||
public String realStock; |
||||
|
||||
/** 可售数量。 */ |
||||
@JsonProperty("cansale_sku_count") |
||||
public String canSaleSkuCount; |
||||
|
||||
/** 占用数量。 */ |
||||
@JsonProperty("use_sku_count") |
||||
public String useSkuCount; |
||||
|
||||
/** 待出库数量。 */ |
||||
@JsonProperty("wait_sku_count") |
||||
public String waitSkuCount; |
||||
|
||||
/** 在海上数量。 */ |
||||
@JsonProperty("ship_sku_count") |
||||
public String shipSkuCount; |
||||
|
||||
/** 预警数量。 */ |
||||
@JsonProperty("alerm_count") |
||||
public String alarmCount; |
||||
|
||||
/** 商品名。 */ |
||||
@JsonProperty("chn_name") |
||||
public String chnName; |
||||
|
||||
/** 体积(立方厘米)。 */ |
||||
@JsonProperty("volume_cm") |
||||
public String volumeCm; |
||||
} |
||||
} |
||||
|
||||
/** 实时库存响应外层。 */ |
||||
@JsonIgnoreProperties(ignoreUnknown = true) |
||||
public static final class StockListResponse { |
||||
|
||||
@JsonProperty("rst") |
||||
public StockListResult rst; |
||||
} |
||||
} |
||||
@ -0,0 +1,160 @@
@@ -0,0 +1,160 @@
|
||||
package common.ecommerce.xincang.dto; |
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
||||
import com.fasterxml.jackson.annotation.JsonInclude; |
||||
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 信仓报文结构:新增转运({@code POST fba.do_fba})。 |
||||
*/ |
||||
public final class XincangTransferCreateDtos { |
||||
|
||||
private XincangTransferCreateDtos() { |
||||
} |
||||
|
||||
/** |
||||
* 新增转运请求({@code POST fba.do_fba})。 |
||||
* |
||||
* <p>附件字段(产品贴 / 外箱贴 / 托盘贴 / BOL)要求先用 {@code upload.files} 上传, |
||||
* 再把返回的 {@code data.data} 对象原样放进来;SDK 只做字段搬运。</p> |
||||
*/ |
||||
@JsonInclude(JsonInclude.Include.NON_NULL) |
||||
public static final class TransferRequest { |
||||
|
||||
/** 转运单号(业务侧),必填。 */ |
||||
@JsonProperty("fba_no") |
||||
public String fbaNo; |
||||
|
||||
/** PO 号,必填。 */ |
||||
@JsonProperty("po") |
||||
public String po; |
||||
|
||||
/** 发货仓(仓方字典名称),必填。 */ |
||||
@JsonProperty("from_warehouse_name") |
||||
public String fromWarehouseName; |
||||
|
||||
/** 目的仓(仓方字典名称),必填。 */ |
||||
@JsonProperty("dest_warehouse_name") |
||||
public String destWarehouseName; |
||||
|
||||
/** 其它仓库名;目的仓选「其他仓库」时填。 */ |
||||
@JsonProperty("other_warehouse") |
||||
public String otherWarehouse; |
||||
|
||||
/** 转运类型(订单类型字典值),必填。 */ |
||||
@JsonProperty("order_type") |
||||
public String orderType; |
||||
|
||||
/** 转运类型(转运类型字典值),必填。 */ |
||||
@JsonProperty("delivery_mode") |
||||
public String deliveryMode; |
||||
|
||||
/** 转运方式 / 配送方式(字典值),必填。 */ |
||||
@JsonProperty("delivery_way") |
||||
public String deliveryWay; |
||||
|
||||
/** 预约发货时间 {@code yyyy-MM-dd}。 */ |
||||
@JsonProperty("pre_send_time") |
||||
public String preSendTime; |
||||
|
||||
/** 标签需求,多选用英文逗号分隔,如 {@code 产品贴,外箱标签}。 */ |
||||
@JsonProperty("label_requirement") |
||||
public String labelRequirement; |
||||
|
||||
/** 备注。 */ |
||||
@JsonProperty("remark") |
||||
public String remark; |
||||
|
||||
/** 是否需要打托:{@code 是} / {@code 否}。 */ |
||||
@JsonProperty("is_pallet") |
||||
public String isPallet; |
||||
|
||||
/** 产品明细 JSON 字符串。 */ |
||||
@JsonProperty("products") |
||||
public String products; |
||||
|
||||
/** 产品贴打印份数。 */ |
||||
@JsonProperty("product_print_copies") |
||||
public String productPrintCopies; |
||||
|
||||
/** 外箱贴打印份数。 */ |
||||
@JsonProperty("ctn_print_copies") |
||||
public String ctnPrintCopies; |
||||
|
||||
/** 快递面单打印份数。 */ |
||||
@JsonProperty("express_print_copies") |
||||
public String expressPrintCopies; |
||||
|
||||
/** 托盘贴打印份数。 */ |
||||
@JsonProperty("pallet_print_copies") |
||||
public String palletPrintCopies; |
||||
|
||||
/** 产品贴附件;{@code label_requirement} 含「产品贴」时必传。 */ |
||||
@JsonProperty("product_label_att") |
||||
public XincangUploadDtos.Attachment productLabelAtt; |
||||
|
||||
/** 外箱贴附件;{@code label_requirement} 含「外箱标签」时必传。 */ |
||||
@JsonProperty("ctn_label_att") |
||||
public XincangUploadDtos.Attachment ctnLabelAtt; |
||||
|
||||
/** 快递面单附件;{@code delivery_way} 为快递发货类型时必传。 */ |
||||
@JsonProperty("express_label_att") |
||||
public XincangUploadDtos.Attachment expressLabelAtt; |
||||
|
||||
/** 托盘贴附件;卡车 + 打托 + 含「托盘标签」三条件同时满足时必传。 */ |
||||
@JsonProperty("pallet_label_att") |
||||
public XincangUploadDtos.Attachment palletLabelAtt; |
||||
|
||||
/** 其他附件(数组)。 */ |
||||
@JsonProperty("other_att") |
||||
public List<XincangUploadDtos.Attachment> otherAtt; |
||||
|
||||
/** BOL 附件(数组)。 */ |
||||
@JsonProperty("bol_att") |
||||
public List<XincangUploadDtos.Attachment> bolAtt; |
||||
} |
||||
|
||||
/** 转运请求里的产品明细(序列化进 {@code products} 字符串)。 */ |
||||
@JsonInclude(JsonInclude.Include.NON_NULL) |
||||
public static final class TransferProduct { |
||||
|
||||
/** 产品 SKU,必填。 */ |
||||
@JsonProperty("product_no") |
||||
public String productNo; |
||||
|
||||
/** 数量(字符串),必填。 */ |
||||
@JsonProperty("sku_count") |
||||
public String skuCount; |
||||
|
||||
/** 三方 SKU(可选)。 */ |
||||
@JsonProperty("fn_sku") |
||||
public String fnSku; |
||||
|
||||
/** 箱标 SKU(可选)。 */ |
||||
@JsonProperty("ctn_sku") |
||||
public String ctnSku; |
||||
|
||||
/** 备注。 */ |
||||
@JsonProperty("remark") |
||||
public String remark; |
||||
} |
||||
|
||||
/** 转运单创建结果 {@code rst}。 */ |
||||
@JsonIgnoreProperties(ignoreUnknown = true) |
||||
public static final class TransferResult { |
||||
|
||||
/** 信仓转运单号(LTL...),审核时传它。 */ |
||||
@JsonProperty("order_no") |
||||
public String orderNo; |
||||
} |
||||
|
||||
/** 新增转运响应外层,用于取 {@code rst}。 */ |
||||
@JsonIgnoreProperties(ignoreUnknown = true) |
||||
public static final class TransferResponse { |
||||
|
||||
/** 转运结果;业务失败时为 null。 */ |
||||
@JsonProperty("rst") |
||||
public TransferResult rst; |
||||
} |
||||
} |
||||
@ -0,0 +1,198 @@
@@ -0,0 +1,198 @@
|
||||
package common.ecommerce.xincang.dto; |
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
||||
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 信仓报文结构:转运详情({@code GET fba.fba_detail})。 |
||||
*/ |
||||
public final class XincangTransferDetailDtos { |
||||
|
||||
private XincangTransferDetailDtos() { |
||||
} |
||||
|
||||
/** |
||||
* 转运单详情({@code GET fba.fba_detail})的 {@code rst}。 |
||||
* |
||||
* <p>只声明统一模型用得上的字段与排查必需的字段;附件同时给了对象和 |
||||
* {@code *_url}(签名后可直接下载),这里两者都保留。</p> |
||||
*/ |
||||
@JsonIgnoreProperties(ignoreUnknown = true) |
||||
public static final class TransferDetail { |
||||
|
||||
@JsonProperty("id") |
||||
public String id; |
||||
/** 转运单号(LTL...);审核与后续查询都用它。 */ |
||||
@JsonProperty("order_no") |
||||
public String orderNo; |
||||
/** 业务侧转运单号(我们下发的 {@code fba_no})。 */ |
||||
@JsonProperty("fba_no") |
||||
public String fbaNo; |
||||
@JsonProperty("po") |
||||
public String po; |
||||
|
||||
/** 客户 id。 */ |
||||
@JsonProperty("customer_id") |
||||
public String customerId; |
||||
|
||||
/** 客户代码。 */ |
||||
@JsonProperty("customer_no") |
||||
public String customerNo; |
||||
|
||||
/** 发货仓 id / 代码。 */ |
||||
@JsonProperty("from_warehouse") |
||||
public String fromWarehouseId; |
||||
@JsonProperty("from_warehouse_name") |
||||
public String fromWarehouseName; |
||||
/** 目的仓 id / 代码。 */ |
||||
@JsonProperty("dest_warehouse") |
||||
public String destWarehouseId; |
||||
@JsonProperty("dest_warehouse_name") |
||||
public String destWarehouseName; |
||||
|
||||
/** 预约发货时间 {@code yyyy-MM-dd}。 */ |
||||
@JsonProperty("pre_send_time") |
||||
public String preSendTime; |
||||
/** 状态码,见 {@code XincangTransferState}。 */ |
||||
@JsonProperty("state") |
||||
public String state; |
||||
@JsonProperty("state_name") |
||||
public String stateName; |
||||
|
||||
/** 是否需要产品贴 / 外箱贴 / 托盘贴:0 否 / 1 是。 */ |
||||
@JsonProperty("is_product_label") |
||||
public String isProductLabel; |
||||
@JsonProperty("is_ctn_label") |
||||
public String isCtnLabel; |
||||
@JsonProperty("is_pallet_label") |
||||
public String isPalletLabel; |
||||
/** 是否打托:0 否 / 1 是。 */ |
||||
@JsonProperty("is_pallet") |
||||
public String isPallet; |
||||
|
||||
@JsonProperty("remark") |
||||
public String remark; |
||||
@JsonProperty("picking_time") |
||||
public String pickingTime; |
||||
@JsonProperty("picked_time") |
||||
public String pickedTime; |
||||
@JsonProperty("palleted_time") |
||||
public String palletedTime; |
||||
/** 发货时间。 */ |
||||
@JsonProperty("send_time") |
||||
public String sendTime; |
||||
@JsonProperty("approve_time") |
||||
public String approveTime; |
||||
@JsonProperty("shipping_id") |
||||
public String shippingId; |
||||
|
||||
/** 转运类型(字典值)。 */ |
||||
@JsonProperty("delivery_mode") |
||||
public String deliveryMode; |
||||
/** 转运方式(字典值)。 */ |
||||
@JsonProperty("delivery_way") |
||||
public String deliveryWay; |
||||
/** 订单类型(字典值)。 */ |
||||
@JsonProperty("order_type") |
||||
public String orderType; |
||||
@JsonProperty("other_warehouse") |
||||
public String otherWarehouse; |
||||
/** 标签需求,逗号分隔。 */ |
||||
@JsonProperty("label_requirement") |
||||
public String labelRequirement; |
||||
|
||||
/** 附件对象。 */ |
||||
@JsonProperty("product_label_att") |
||||
public XincangUploadDtos.Attachment productLabelAtt; |
||||
@JsonProperty("ctn_label_att") |
||||
public XincangUploadDtos.Attachment ctnLabelAtt; |
||||
@JsonProperty("pallet_label_att") |
||||
public XincangUploadDtos.Attachment palletLabelAtt; |
||||
@JsonProperty("bol_att") |
||||
public List<XincangUploadDtos.Attachment> bolAtt; |
||||
@JsonProperty("signature_bol_att") |
||||
public List<XincangUploadDtos.Attachment> signatureBolAtt; |
||||
@JsonProperty("express_label_att") |
||||
public XincangUploadDtos.Attachment expressLabelAtt; |
||||
@JsonProperty("other_att") |
||||
public List<XincangUploadDtos.Attachment> otherAtt; |
||||
|
||||
/** 附件签名 URL(可直接下载)。 */ |
||||
@JsonProperty("product_label_att_url") |
||||
public String productLabelAttUrl; |
||||
@JsonProperty("ctn_label_att_url") |
||||
public String ctnLabelAttUrl; |
||||
@JsonProperty("pallet_label_att_url") |
||||
public String palletLabelAttUrl; |
||||
@JsonProperty("bol_att_url") |
||||
public String bolAttUrl; |
||||
@JsonProperty("signature_bol_file") |
||||
public String signatureBolFile; |
||||
@JsonProperty("express_label_att_url") |
||||
public String expressLabelAttUrl; |
||||
@JsonProperty("other_att_url") |
||||
public String otherAttUrl; |
||||
|
||||
/** 总费用。 */ |
||||
@JsonProperty("total_amount") |
||||
public String totalAmount; |
||||
|
||||
@JsonProperty("gmt_create") |
||||
public String gmtCreate; |
||||
@JsonProperty("gmt_modify") |
||||
public String gmtModify; |
||||
|
||||
/** 产品明细。 */ |
||||
@JsonProperty("products") |
||||
public List<TransferDetailProduct> products; |
||||
} |
||||
|
||||
/** 转运详情里的产品行。 */ |
||||
@JsonIgnoreProperties(ignoreUnknown = true) |
||||
public static final class TransferDetailProduct { |
||||
|
||||
@JsonProperty("product_no") |
||||
public String productNo; |
||||
/** 件数。 */ |
||||
@JsonProperty("sku_count") |
||||
public String skuCount; |
||||
/** 箱数。 */ |
||||
@JsonProperty("box_count") |
||||
public String boxCount; |
||||
@JsonProperty("chn_name") |
||||
public String chnName; |
||||
@JsonProperty("packing_rate") |
||||
public String packingRate; |
||||
@JsonProperty("remark") |
||||
public String remark; |
||||
@JsonProperty("weight_lbs") |
||||
public String weightLbs; |
||||
@JsonProperty("weight_kg") |
||||
public String weightKg; |
||||
|
||||
/** 产品中文名(文档字段 {@code chn_name} 的语义;与 {@link #chnName} 同值来源)。 */ |
||||
@JsonProperty("product_name") |
||||
public String productName; |
||||
|
||||
/** 清点箱数。 */ |
||||
@JsonProperty("check_box_qty") |
||||
public String checkBoxQty; |
||||
|
||||
/** 打托件数。 */ |
||||
@JsonProperty("pallet_sku_count") |
||||
public String palletSkuCount; |
||||
|
||||
/** 上架件数。 */ |
||||
@JsonProperty("put_on_sku_count") |
||||
public String putOnSkuCount; |
||||
} |
||||
|
||||
/** 转运详情响应外层。 */ |
||||
@JsonIgnoreProperties(ignoreUnknown = true) |
||||
public static final class TransferDetailResponse { |
||||
|
||||
@JsonProperty("rst") |
||||
public TransferDetail rst; |
||||
} |
||||
} |
||||
@ -0,0 +1,85 @@
@@ -0,0 +1,85 @@
|
||||
package common.ecommerce.xincang.dto; |
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
||||
import com.fasterxml.jackson.annotation.JsonInclude; |
||||
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
|
||||
/** |
||||
* 信仓报文结构:文件上传({@code POST upload.files})。 |
||||
* |
||||
* <p>{@code Attachment} 是上传返回的 {@code data.data},原样回传给转运的 |
||||
* {@code *_att} 字段,所以由本文件持有。</p> |
||||
*/ |
||||
public final class XincangUploadDtos { |
||||
|
||||
private XincangUploadDtos() { |
||||
} |
||||
|
||||
/** |
||||
* 附件元数据({@code upload.files} 返回的 {@code data.data} 原样回传)。 |
||||
* |
||||
* <p>字段名与上传接口返回保持一致,包括 {@code file_url} 与 {@code fileType} 的 |
||||
* 大小写差异——信仓文档里就是这么写的。</p> |
||||
*/ |
||||
@JsonInclude(JsonInclude.Include.NON_NULL) |
||||
public static final class Attachment { |
||||
|
||||
/** 存储类型,如 {@code aliyun_oss}。 */ |
||||
@JsonProperty("type") |
||||
public String type; |
||||
|
||||
/** bucket 名。 */ |
||||
@JsonProperty("bucket") |
||||
public String bucket; |
||||
|
||||
/** 对象键。 */ |
||||
@JsonProperty("file_name") |
||||
public String fileName; |
||||
|
||||
/** 可访问 URL。 */ |
||||
@JsonProperty("file_url") |
||||
public String fileUrl; |
||||
|
||||
/** 文件类型(信仓原文是 camelCase)。 */ |
||||
@JsonProperty("fileType") |
||||
public String fileType; |
||||
|
||||
/** 原始文件名。 */ |
||||
@JsonProperty("name") |
||||
public String name; |
||||
|
||||
/** 上传接口返回的 uid,通常为空串。 */ |
||||
@JsonProperty("uid") |
||||
public String uid; |
||||
|
||||
/** 上传接口返回的 url(与 file_url 同值)。 */ |
||||
@JsonProperty("url") |
||||
public String url; |
||||
} |
||||
|
||||
/** 文件上传响应({@code POST upload.files}):{@code {code,msg,data:{data:{...}}}}。 */ |
||||
@JsonIgnoreProperties(ignoreUnknown = true) |
||||
public static final class UploadResponse { |
||||
|
||||
/** 业务数据外层。 */ |
||||
@JsonProperty("data") |
||||
public UploadData data; |
||||
|
||||
/** 200 表示成功。 */ |
||||
@JsonProperty("code") |
||||
public Integer code; |
||||
|
||||
/** 描述。 */ |
||||
@JsonProperty("msg") |
||||
public String msg; |
||||
} |
||||
|
||||
/** 上传响应的 {@code data} 层。 */ |
||||
@JsonIgnoreProperties(ignoreUnknown = true) |
||||
public static final class UploadData { |
||||
|
||||
/** 附件元数据;直接作为 {@code *_att} 传参。 */ |
||||
@JsonProperty("data") |
||||
public Attachment data; |
||||
} |
||||
} |
||||
@ -0,0 +1,64 @@
@@ -0,0 +1,64 @@
|
||||
package common.ecommerce.xincang.dto; |
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties; |
||||
import com.fasterxml.jackson.annotation.JsonProperty; |
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 信仓报文结构:客户仓库列表({@code GET api.get_customer_warehouses})。 |
||||
*/ |
||||
public final class XincangWarehouseDtos { |
||||
|
||||
private XincangWarehouseDtos() { |
||||
} |
||||
|
||||
/** 客户仓库列表响应 {@code rst}({@code GET api.get_customer_warehouses})。 */ |
||||
@JsonIgnoreProperties(ignoreUnknown = true) |
||||
public static final class WarehouseListResult { |
||||
|
||||
@JsonProperty("code") |
||||
public String code; |
||||
|
||||
@JsonProperty("msg") |
||||
public String msg; |
||||
|
||||
@JsonProperty("data") |
||||
public List<WarehouseRow> data; |
||||
|
||||
/** 总条数(字符串)。 */ |
||||
@JsonProperty("count") |
||||
public String count; |
||||
|
||||
/** 一行仓库。 */ |
||||
@JsonIgnoreProperties(ignoreUnknown = true) |
||||
public static final class WarehouseRow { |
||||
|
||||
/** 仓方内部 id。 */ |
||||
@JsonProperty("id") |
||||
public String id; |
||||
|
||||
/** 仓代码。 */ |
||||
@JsonProperty("warehouse_code") |
||||
public String warehouseCode; |
||||
|
||||
@JsonProperty("country") |
||||
public String country; |
||||
@JsonProperty("province") |
||||
public String province; |
||||
@JsonProperty("city") |
||||
public String city; |
||||
@JsonProperty("street") |
||||
public String street; |
||||
@JsonProperty("postcode") |
||||
public String postcode; |
||||
} |
||||
} |
||||
|
||||
/** 客户仓库列表响应外层。 */ |
||||
@JsonIgnoreProperties(ignoreUnknown = true) |
||||
public static final class WarehouseListResponse { |
||||
|
||||
@JsonProperty("rst") |
||||
public WarehouseListResult rst; |
||||
} |
||||
} |
||||
Loading…
Reference in new issue