1
This commit is contained in:
79
platformapi/ali_logistics_query/logistics_model.go
Normal file
79
platformapi/ali_logistics_query/logistics_model.go
Normal file
@@ -0,0 +1,79 @@
|
||||
package ali_logistics_query
|
||||
|
||||
// LogisticsStatusReceive 物流状态标签说明
|
||||
// https://market.aliyun.com/products/57126001/cmapi00054243.html?spm=5176.2020520132.101.2.3c557218Al5EBA#sku=yuncode4824300001
|
||||
const (
|
||||
// 揽件
|
||||
LogisticsStatusRECEVIE = "RECEVIE" // 接单中
|
||||
LogisticsStatusWAIT_ACCEPT = "WAIT_ACCEPT" // 待揽件
|
||||
LogisticsStatusACCEPT = "ACCEPT" // 已揽收
|
||||
|
||||
// 运输中
|
||||
LogisticsStatusTRANSPORT = "TRANSPORT" // 运输中
|
||||
LogisticsStatusSEND_ON = "SEND_ON" // 转单或修改地址
|
||||
LogisticsStatusARRIVE_CITY = "ARRIVE_CITY" // 到达目的城市
|
||||
|
||||
// 派件
|
||||
LogisticsStatusDELIVERING = "DELIVERING" // 派件中
|
||||
LogisticsStatusSTA_INBOUND = "STA_INBOUND" // 已放入快递柜或者驿站
|
||||
|
||||
// 签收
|
||||
LogisticsStatusAGENT_SIGN = "AGENT_SIGN" // 已代签收
|
||||
LogisticsStatusSIGN = "SIGN" // 已签收
|
||||
LogisticsStatusSTA_SIGN = "STA_SIGN" // 从快递柜或驿站取出
|
||||
LogisticsStatusRETURN_SIGN = "RETURN_SIGN" // 退回签收
|
||||
|
||||
// 包裹异常
|
||||
LogisticsStatusFAILED = "FAILED" // 包裹异常
|
||||
LogisticsStatusREFUSE_SIGN = "REFUSE_SIGN" // 拒收
|
||||
LogisticsStatusDELIVER_ABNORMAL = "DELIVER_ABNORMAL" // 派件异常
|
||||
LogisticsStatusRETENTION = "RETENTION" // 滞留件
|
||||
LogisticsStatusISSUE = "ISSUE" // 问题件
|
||||
LogisticsStatusRETURN = "RETURN" // 退回件
|
||||
LogisticsStatusDAMAGE = "DAMAGE" // 破损
|
||||
LogisticsStatusCANCEL_ORDER = "CANCEL_ORDER" // 揽件取消
|
||||
)
|
||||
|
||||
// BaseModel 基础物流返回值
|
||||
type BaseModel struct {
|
||||
Msg string `json:"msg"` // 请求返回通知
|
||||
Success bool `json:"success"` // 是否成功
|
||||
Code int `json:"code"` // 返回code
|
||||
}
|
||||
|
||||
// OrderDetail 物流订单详情
|
||||
type OrderDetail struct {
|
||||
OrderNo string `json:"orderNo"` // 订单id
|
||||
Info []struct { // 物流详情
|
||||
TheLastTime string `json:"theLastTime"` // 运单号物流流转当前最新变更时间
|
||||
CpCode string `json:"cpCode"` // 快递公司代号
|
||||
MailNo string `json:"mailNo"` // 快递单号
|
||||
CpMobile string `json:"cpMobile"` // 快递公司电话
|
||||
TheLastMessage string `json:"theLastMessage"` // 运单号物流流转当前最新描述
|
||||
LogisticsCompanyName string `json:"logisticsCompanyName"` // 快递公司名称
|
||||
CpUrl string `json:"cpUrl"` // 快递公司官网
|
||||
Courier string `json:"courier"` // 配送人名称
|
||||
LogisticsStatusDesc string `json:"logisticsStatusDesc"` // 运单号当前物流状态文字描述
|
||||
LogisticsTraceDetailList []struct {
|
||||
AreaCode string `json:"areaCode,omitempty"` // 当前节点所在地址行政编码
|
||||
AreaName string `json:"areaName,omitempty"` // 当前节点所在地区,省,市,区或省,市
|
||||
SubLogisticsStatus string `json:"subLogisticsStatus"` // 物流流转子状态,详见:物流状态编码对照表
|
||||
Time int64 `json:"time"` // 时间,单位毫秒
|
||||
LogisticsStatus string `json:"logisticsStatus"` // 物流流转状态,详见:物流状态编码对照表
|
||||
Desc string `json:"desc"` // 物流流转描述
|
||||
Courier string `json:"courier,omitempty"` // 配送人名称
|
||||
CourierPhone string `json:"courierPhone,omitempty"` // 配送人电话
|
||||
} `json:"logisticsTraceDetailList"`
|
||||
CourierPhone string `json:"courierPhone"` // 配送人电话
|
||||
LogisticsStatus string `json:"logisticsStatus"` // 物流流转状态
|
||||
} `json:"info"`
|
||||
}
|
||||
|
||||
/************************************************************************************/
|
||||
|
||||
type GetOrderDetail struct {
|
||||
Msg string `json:"msg"` // 请求返回通知
|
||||
Success bool `json:"success"` // 是否成功
|
||||
Code int `json:"code"` // 返回code
|
||||
Data *OrderDetail `json:"data"`
|
||||
}
|
||||
Reference in New Issue
Block a user