|
|
@@ -5,184 +5,332 @@ import lombok.Data;
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
|
- * 订单详情(对应推送示例中的订单对象)
|
|
|
- * 字段与推送数据中的订单主体一致,但无 app_key 和 action
|
|
|
+ * 聚好麦订单详情(对应 /open-api/order/info 响应中的订单对象)
|
|
|
+ * 字段完全参照官方文档定义
|
|
|
*/
|
|
|
@Data
|
|
|
public class JHMOrderDetail {
|
|
|
|
|
|
+ // ==================== 订单基本信息 ====================
|
|
|
@JsonProperty("union_id")
|
|
|
- private String unionId;
|
|
|
+ private String unionId; // 用户ID
|
|
|
|
|
|
@JsonProperty("order_num")
|
|
|
- private String orderNum;
|
|
|
+ private String orderNum; // 订单号
|
|
|
|
|
|
- /** 订单主状态:-1取消,1待支付,2待发货,3待收货,4已完成 */
|
|
|
+ /** 订单状态:-1已取消,1待支付,2待发货,3待收货,4已完成,5售后中,6支付失败 */
|
|
|
private Integer status;
|
|
|
|
|
|
- /** 售后状态:1待处理,2待退货,3待收货,6退款完成,7关闭,8退款中,9极速退款,12失败,13用户取消 */
|
|
|
+ /** 售后状态:1待处理,2待买家退货,3待商家收货,4换货待商家发货,5待买家收货,6退款完成,7售后关闭,8退款中,9极速退款成功,10售后完成,11待买家处理,12退款失败 */
|
|
|
@JsonProperty("after_status")
|
|
|
private Integer afterStatus;
|
|
|
|
|
|
@JsonProperty("after_status_remark")
|
|
|
- private String afterStatusRemark;
|
|
|
+ private String afterStatusRemark; // 售后状态备注
|
|
|
|
|
|
@JsonProperty("cancel_type")
|
|
|
- private Integer cancelType;
|
|
|
+ private Integer cancelType; // 取消类型:1库存不足,2地址不全,3区域库存不足,4买家不想买,5协商取消,6其他,7用户取消
|
|
|
|
|
|
@JsonProperty("total_money")
|
|
|
- private Integer totalMoney;
|
|
|
+ private Integer totalMoney; // 订单总金额(分)
|
|
|
|
|
|
- private Integer money;
|
|
|
- private Integer discount;
|
|
|
+ private Integer money; // 订单支付金额(分)
|
|
|
+
|
|
|
+ private Integer discount; // 优惠金额(分)
|
|
|
|
|
|
@JsonProperty("freight_money")
|
|
|
- private Integer freightMoney;
|
|
|
+ private Integer freightMoney; // 运费(分)
|
|
|
+
|
|
|
+ @JsonProperty("channel_type")
|
|
|
+ private Integer channelType; // 渠道类型:1,2,3=广点通,4=磁力,5=bilibili,6=巨量,7=百度
|
|
|
|
|
|
@JsonProperty("order_source")
|
|
|
- private Integer orderSource;
|
|
|
+ private Integer orderSource; // 订单来源:1自然流量,2广告引流,3回传流量
|
|
|
|
|
|
@JsonProperty("pay_mode")
|
|
|
- private Integer payMode;
|
|
|
+ private Integer payMode; // 支付方式:1余额,2微信支付,3支付宝
|
|
|
|
|
|
@JsonProperty("pay_sn")
|
|
|
- private String paySn;
|
|
|
+ private String paySn; // 支付单号
|
|
|
|
|
|
@JsonProperty("pay_time")
|
|
|
- private Long payTime;
|
|
|
+ private Long payTime; // 支付时间(时间戳)
|
|
|
|
|
|
@JsonProperty("pay_money")
|
|
|
- private Integer payMoney;
|
|
|
+ private Integer payMoney; // 支付金额(分)
|
|
|
|
|
|
@JsonProperty("pay_state_desc")
|
|
|
- private String payStateDesc;
|
|
|
+ private String payStateDesc; // 支付状态描述
|
|
|
|
|
|
@JsonProperty("transaction_id")
|
|
|
- private String transactionId;
|
|
|
+ private String transactionId; // 微信支付订单号
|
|
|
|
|
|
@JsonProperty("complete_time")
|
|
|
- private Long completeTime;
|
|
|
+ private Long completeTime; // 订单完成时间
|
|
|
|
|
|
@JsonProperty("receipt_time")
|
|
|
- private Long receiptTime;
|
|
|
+ private Long receiptTime; // 快递签收时间
|
|
|
|
|
|
@JsonProperty("deliver_time")
|
|
|
- private Long deliverTime;
|
|
|
+ private Long deliverTime; // 发货时间
|
|
|
+
|
|
|
+ @JsonProperty("is_callback")
|
|
|
+ private Integer isCallback; // 是否回传(1是,0否)
|
|
|
|
|
|
@JsonProperty("ad_account_id")
|
|
|
- private Long adAccountId;
|
|
|
+ private Integer adAccountId; // 广告账号ID
|
|
|
+
|
|
|
+ @JsonProperty("ad_plan_id")
|
|
|
+ private String adPlanId; // 广告计划ID
|
|
|
|
|
|
@JsonProperty("shop_remark")
|
|
|
- private String shopRemark;
|
|
|
+ private String shopRemark; // 商家备注
|
|
|
|
|
|
@JsonProperty("user_remark")
|
|
|
- private String userRemark;
|
|
|
+ private String userRemark; // 用户备注
|
|
|
|
|
|
@JsonProperty("updated_at")
|
|
|
- private Long updatedAt;
|
|
|
+ private Long updatedAt; // 订单更新时间
|
|
|
|
|
|
@JsonProperty("created_at")
|
|
|
- private Long createdAt;
|
|
|
+ private Long createdAt; // 订单创建时间
|
|
|
+
|
|
|
+ @JsonProperty("parent_order_num")
|
|
|
+ private String parentOrderNum; // 父级订单号
|
|
|
+
|
|
|
+ @JsonProperty("order_type")
|
|
|
+ private Integer orderType; // 订单类型:1普通,2全球购,3香港直邮,4微信小店
|
|
|
|
|
|
- /** 商品信息 */
|
|
|
- private Goods goods;
|
|
|
+ @JsonProperty("activity_type")
|
|
|
+ private Integer activityType; // 活动类型
|
|
|
|
|
|
- /** 买家/收货信息 */
|
|
|
- private Buyer buyer;
|
|
|
+ @JsonProperty("app_name")
|
|
|
+ private String appName; // 应用名称
|
|
|
+
|
|
|
+ // ==================== 嵌套对象 ====================
|
|
|
+ private Goods goods; // 商品信息
|
|
|
+
|
|
|
+ private Buyer buyer; // 买家/收货信息
|
|
|
|
|
|
- /** 售后单列表(可能有多个) */
|
|
|
@JsonProperty("after_sales")
|
|
|
- private List<AfterSale> afterSales;
|
|
|
+ private List<AfterSale> afterSales; // 售后单列表
|
|
|
+
|
|
|
+ @JsonProperty("ad_info")
|
|
|
+ private AdInfo adInfo; // 广告信息
|
|
|
|
|
|
- // ---------- 内部类 ----------
|
|
|
+ // ==================== 内部类定义 ====================
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 商品信息
|
|
|
+ */
|
|
|
@Data
|
|
|
public static class Goods {
|
|
|
@JsonProperty("product_id")
|
|
|
- private String productId;
|
|
|
+ private String productId; // 商品ID
|
|
|
+
|
|
|
@JsonProperty("product_code")
|
|
|
- private String productCode; // 商家商品编码
|
|
|
+ private String productCode; // 商品编码(商家自定义)
|
|
|
+
|
|
|
@JsonProperty("sku_id")
|
|
|
- private Integer skuId; // 0表示无规格
|
|
|
+ private Integer skuId; // SKU ID(0表示无规格)
|
|
|
+
|
|
|
@JsonProperty("sku_code")
|
|
|
- private String skuCode; // SKU编码
|
|
|
- private Integer price;
|
|
|
- private Integer num;
|
|
|
- private String image;
|
|
|
- private String name;
|
|
|
+ private String skuCode; // SKU编码
|
|
|
+
|
|
|
+ private Integer price; // 单价(分)
|
|
|
+
|
|
|
+ private Integer num; // 购买数量
|
|
|
+
|
|
|
+ private String image; // 商品封面图
|
|
|
+
|
|
|
+ private String name; // 商品名称
|
|
|
+
|
|
|
@JsonProperty("sku_name")
|
|
|
- private String skuName;
|
|
|
+ private String skuName; // 规格名称
|
|
|
+
|
|
|
@JsonProperty("created_at")
|
|
|
private Long createdAt;
|
|
|
+
|
|
|
@JsonProperty("updated_at")
|
|
|
private Long updatedAt;
|
|
|
+
|
|
|
@JsonProperty("after_num")
|
|
|
- private Integer afterNum;
|
|
|
+ private Integer afterNum; // 已售后数量
|
|
|
+
|
|
|
+ @JsonProperty("active_type")
|
|
|
+ private Integer activeType; // 商品类型:0普通,1顺手买
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 买家/收货信息
|
|
|
+ */
|
|
|
@Data
|
|
|
public static class Buyer {
|
|
|
- private String express;
|
|
|
+ private String express; // 快递公司名称
|
|
|
+
|
|
|
@JsonProperty("express_number")
|
|
|
- private String expressNumber;
|
|
|
- private String consignee;
|
|
|
+ private String expressNumber; // 快递单号
|
|
|
+
|
|
|
+ private String consignee; // 收货人姓名
|
|
|
+
|
|
|
@JsonProperty("receive_phone")
|
|
|
- private String receivePhone;
|
|
|
- private String address;
|
|
|
- private String province;
|
|
|
- private String city;
|
|
|
- private String area;
|
|
|
+ private String receivePhone; // 收货人手机号
|
|
|
+
|
|
|
+ private String address; // 完整地址
|
|
|
+
|
|
|
+ private String province; // 省份
|
|
|
+
|
|
|
+ private String city; // 城市
|
|
|
+
|
|
|
+ private String area; // 区/县
|
|
|
+
|
|
|
@JsonProperty("address_detail")
|
|
|
- private String addressDetail;
|
|
|
+ private String addressDetail; // 详细地址
|
|
|
+
|
|
|
@JsonProperty("area_id")
|
|
|
- private Integer areaId;
|
|
|
+ private Integer areaId; // 区域ID
|
|
|
+
|
|
|
@JsonProperty("area_ids")
|
|
|
- private String areaIds;
|
|
|
+ private String areaIds; // 地址层级ID(逗号分隔)
|
|
|
+
|
|
|
@JsonProperty("edit_address_code")
|
|
|
- private Integer editAddressCode;
|
|
|
+ private Integer editAddressCode; // 地址修改标记:0未修改,2用户修改,3商家修改,5都修改
|
|
|
+
|
|
|
@JsonProperty("is_update")
|
|
|
- private Integer isUpdate;
|
|
|
+ private Integer isUpdate; // 是否修改过物流:0否,1是
|
|
|
+
|
|
|
@JsonProperty("express_update_time")
|
|
|
- private Long expressUpdateTime;
|
|
|
+ private Long expressUpdateTime; // 快递单号修改时间
|
|
|
+
|
|
|
@JsonProperty("created_at")
|
|
|
private Long createdAt;
|
|
|
+
|
|
|
@JsonProperty("updated_at")
|
|
|
private Long updatedAt;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 售后信息
|
|
|
+ */
|
|
|
@Data
|
|
|
public static class AfterSale {
|
|
|
@JsonProperty("refund_sn")
|
|
|
- private String refundSn;
|
|
|
+ private String refundSn; // 退款单号
|
|
|
+
|
|
|
@JsonProperty("after_sale_status")
|
|
|
- private Integer afterSaleStatus;
|
|
|
+ private Integer afterSaleStatus; // 售后状态(同订单中的 after_status)
|
|
|
+
|
|
|
@JsonProperty("after_sale_type")
|
|
|
- private Integer afterSaleType;
|
|
|
- private String reason;
|
|
|
- private Integer number;
|
|
|
- private Integer price;
|
|
|
+ private Integer afterSaleType; // 业务类型:1仅退款,2退货退款,3换货,4极速退款
|
|
|
+
|
|
|
+ private String reason; // 售后原因
|
|
|
+
|
|
|
+ private Integer number; // 退货数量
|
|
|
+
|
|
|
+ private Integer price; // 退款单价(分)
|
|
|
+
|
|
|
@JsonProperty("refund_money")
|
|
|
- private Integer refundMoney;
|
|
|
+ private Integer refundMoney; // 实际申请退款金额(分)
|
|
|
+
|
|
|
@JsonProperty("refuse_reason")
|
|
|
- private String refuseReason;
|
|
|
+ private String refuseReason; // 拒绝原因
|
|
|
+
|
|
|
@JsonProperty("refuse_fail")
|
|
|
- private String refuseFail;
|
|
|
+ private String refuseFail; // 微信退款失败原因
|
|
|
+
|
|
|
@JsonProperty("apply_at")
|
|
|
- private Long applyAt;
|
|
|
+ private Long applyAt; // 申请时间
|
|
|
+
|
|
|
@JsonProperty("confirm_at")
|
|
|
- private Long confirmAt;
|
|
|
+ private Long confirmAt; // 确认时间
|
|
|
+
|
|
|
@JsonProperty("audit_at")
|
|
|
- private Long auditAt;
|
|
|
+ private Long auditAt; // 审核时间
|
|
|
+
|
|
|
@JsonProperty("cancel_at")
|
|
|
- private Long cancelAt;
|
|
|
+ private Long cancelAt; // 取消时间
|
|
|
+
|
|
|
@JsonProperty("updated_at")
|
|
|
- private Long updatedAt;
|
|
|
+ private Long updatedAt; // 更新时间
|
|
|
+
|
|
|
@JsonProperty("success_at")
|
|
|
- private Long successAt;
|
|
|
+ private Long successAt; // 退款成功时间
|
|
|
+
|
|
|
@JsonProperty("refuse_at")
|
|
|
- private Long refuseAt;
|
|
|
+ private Long refuseAt; // 拒绝时间
|
|
|
+
|
|
|
@JsonProperty("after_sale")
|
|
|
- private Integer afterSale;
|
|
|
+ private Integer afterSale; // 是否极速退款:1开启,2关闭
|
|
|
+
|
|
|
+ @JsonProperty("express_name")
|
|
|
+ private String expressName; // 退货物流公司
|
|
|
+
|
|
|
+ @JsonProperty("express_number")
|
|
|
+ private String expressNumber; // 退货物流单号
|
|
|
+
|
|
|
+ private String consignee; // 申请人姓名
|
|
|
+
|
|
|
+ @JsonProperty("user_send_time")
|
|
|
+ private Long userSendTime; // 用户发货时间
|
|
|
+
|
|
|
+ @JsonProperty("cancel_source")
|
|
|
+ private Integer cancelSource; // 取消来源:1商家后台取消
|
|
|
+
|
|
|
@JsonProperty("after_status_remark")
|
|
|
- private String afterStatusRemark;
|
|
|
+ private String afterStatusRemark; // 售后状态说明
|
|
|
+
|
|
|
+ @JsonProperty("change_product")
|
|
|
+ private ChangeProduct changeProduct; // 换货商品信息(当售后类型为换货时)
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 换货商品信息(仅在换货售后中返回)
|
|
|
+ */
|
|
|
+ @Data
|
|
|
+ public static class ChangeProduct {
|
|
|
+ @JsonProperty("product_id")
|
|
|
+ private String productId; // 换货商品ID
|
|
|
+
|
|
|
+ @JsonProperty("product_code")
|
|
|
+ private String productCode; // 换货商品编码
|
|
|
+
|
|
|
+ @JsonProperty("sku_id")
|
|
|
+ private Integer skuId; // 换货SKU ID
|
|
|
+
|
|
|
+ @JsonProperty("sku_code")
|
|
|
+ private String skuCode; // 换货SKU编码
|
|
|
+
|
|
|
+ private String name; // 换货商品名称
|
|
|
+
|
|
|
+ @JsonProperty("sku_name")
|
|
|
+ private String skuName; // 换货规格名称
|
|
|
+
|
|
|
+ private Integer price; // 换货单价(分)
|
|
|
+
|
|
|
+ private Integer num; // 换货数量
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 广告信息
|
|
|
+ */
|
|
|
+ @Data
|
|
|
+ public static class AdInfo {
|
|
|
+ @JsonProperty("ad_account_id")
|
|
|
+ private String adAccountId; // 广告主ID
|
|
|
+
|
|
|
+ @JsonProperty("campaign_id")
|
|
|
+ private String campaignId; // 计划ID
|
|
|
+
|
|
|
+ @JsonProperty("ad_group_id")
|
|
|
+ private String adGroupId; // 项目ID(广告组)
|
|
|
+
|
|
|
+ @JsonProperty("creative_id")
|
|
|
+ private String creativeId; // 创意ID
|
|
|
+
|
|
|
+ @JsonProperty("click_id")
|
|
|
+ private String clickId; // 点击ID
|
|
|
+
|
|
|
+ @JsonProperty("req_id")
|
|
|
+ private String reqId; // 请求ID
|
|
|
}
|
|
|
}
|