提交 e4be0a5f authored 作者: zhanglibo's avatar zhanglibo

淘特

上级 76772bd0
......@@ -19,6 +19,7 @@ type AddressDivisionReq struct {
Page int `json:"pageIndex"`
Size int `json:"pageSize"`
}
type AddressDivisionRes struct {
Result struct {
Result struct {
......@@ -38,10 +39,13 @@ type AddressDivisionRes struct {
TotalCount int `json:"totalCount"`
TotalPage int `json:"totalPage"`
} `json:"result"`
Success bool `json:"success"`
Success bool `json:"success"`
ErrMsg string `json:"errMsg"`
ErrCode string `json:"errCode"`
} `json:"result"`
}
//Division 行政区划
func (s addressItao) Division(ctx context.Context, req AddressDivisionReq) (res *AddressDivisionRes, err error) {
method := "com.alibaba.c2m/ltao.delivery.queryDivision"
......@@ -51,3 +55,37 @@ func (s addressItao) Division(ctx context.Context, req AddressDivisionReq) (res
_ = gjson.New(result).Scan(&res)
return
}
type AddressParseReq struct {
Province string `json:"prov"`
City string `json:"city"`
Detail string `json:"addressDetail"`
}
type AddressParseRes struct {
Result struct {
Result struct {
City string `json:"city"`
CityId int `json:"cityId"`
District string `json:"district"`
DistrictId int `json:"districtId"`
Prov string `json:"prov"`
ProvId int `json:"provId"`
Town string `json:"town"`
TownId int `json:"townId"`
} `json:"result"`
Success bool `json:"success"`
} `json:"result"`
}
//Parse 地址解析
// 省、市必传
func (s addressItao) Parse(ctx context.Context, req AddressParseReq) (res *AddressParseRes, err error) {
method := "com.alibaba.c2m/ltao.delivery.validate"
result, err := server.Post(ctx, method, g.Map{
"param": req,
})
_ = gjson.New(result).Scan(&res)
return
}
......@@ -11,19 +11,17 @@ type logisticsItao struct {
var Logistics = logisticsItao{}
type LogisticsDetailReq struct {
OrderSn string `json:"tradeId"`
type LogisticsTraceRes struct {
}
type LogisticsDetailRes struct {
}
//Detail 详情[实时]
func (logisticsItao) Detail(ctx context.Context, req LogisticsDetailReq) (res *LogisticsDetailRes, err error) {
//Trace 物流轨迹
func (logisticsItao) Trace(ctx context.Context, req string) (res *LogisticsTraceRes, err error) {
method := "com.alibaba.c2m/ltao.logistics.queryDetail"
result, err := server.Post(ctx, method, g.Map{
"request": req,
"request": g.Map{
"tradeId": req,
},
})
_ = gjson.New(result).Scan(&res)
return
......
......@@ -79,7 +79,9 @@ type OrderBeforeRes struct {
Title string `json:"title"`
} `json:"validOrderGroups"`
} `json:"result"`
Success bool `json:"success"`
Success bool `json:"success"`
ErrMsg string `json:"errMsg"`
ErrCode string `json:"errCode"`
} `json:"result"`
}
......@@ -157,7 +159,9 @@ type OrderCreateRes struct {
PartSuccess bool `json:"partSuccess"`
Success bool `json:"success"`
} `json:"result"`
Success bool `json:"success"`
Success bool `json:"success"`
ErrMsg string `json:"errMsg"`
ErrCode string `json:"errCode"`
} `json:"result"`
}
......@@ -238,7 +242,9 @@ type OrderDetailRes struct {
SellerToken string `json:"sellerToken"`
Status int `json:"status"`
} `json:"result"`
Success bool `json:"success"`
Success bool `json:"success"`
ErrMsg string `json:"errMsg"`
ErrCode string `json:"errCode"`
} `json:"result"`
}
......@@ -254,3 +260,76 @@ func (s orderItao) Detail(ctx context.Context, req string) (res *OrderDetailRes,
_ = gjson.New(result).Scan(&res)
return
}
type OrderReflectRes struct {
Result struct {
Result struct {
BizOrderId int64 `json:"bizOrderId"`
BuyAmount int `json:"buyAmount"`
BuyerToken string `json:"buyerToken"`
Detail int `json:"detail"`
DetailOrderList []struct {
BizOrderId int64 `json:"bizOrderId"`
BuyAmount int `json:"buyAmount"`
BuyerToken string `json:"buyerToken"`
Detail int `json:"detail"`
GmtCreate string `json:"gmtCreate"`
ItemInfo struct {
ItemId int64 `json:"itemId"`
Pic string `json:"pic"`
Price string `json:"price"`
SkuId int `json:"skuId"`
SkuInfoList []interface{} `json:"skuInfoList"`
Title string `json:"title"`
} `json:"itemInfo"`
LogisticsOrderId int64 `json:"logisticsOrderId"`
LogisticsStatus int `json:"logisticsStatus"`
Main int `json:"main"`
ParentId int64 `json:"parentId"`
PayFee int `json:"payFee"`
PayOrderId int64 `json:"payOrderId"`
PayStatus int `json:"payStatus"`
PostFee int `json:"postFee"`
RefundStatus int `json:"refundStatus"`
SellerToken string `json:"sellerToken"`
Status int `json:"status"`
} `json:"detailOrderList"`
GmtCreate string `json:"gmtCreate"`
ItemInfo struct {
ItemId int64 `json:"itemId"`
Pic string `json:"pic"`
Price string `json:"price"`
SkuId int `json:"skuId"`
SkuInfoList []interface{} `json:"skuInfoList"`
Title string `json:"title"`
} `json:"itemInfo"`
LogisticsOrderId int64 `json:"logisticsOrderId"`
LogisticsStatus int `json:"logisticsStatus"`
Main int `json:"main"`
ParentId int64 `json:"parentId"`
PayFee int `json:"payFee"`
PayOrderId int64 `json:"payOrderId"`
PayStatus int `json:"payStatus"`
PostFee int `json:"postFee"`
RefundStatus int `json:"refundStatus"`
SellerToken string `json:"sellerToken"`
Status int `json:"status"`
} `json:"result"`
Success bool `json:"success"`
ErrMsg string `json:"errMsg"`
ErrCode string `json:"errCode"`
} `json:"result"`
}
//Reflect 详情[反查]
func (s orderItao) Reflect(ctx context.Context, req string) (res *OrderReflectRes, err error) {
method := "com.alibaba.c2m/ltao.trade.queryOrderByOutId"
result, err := server.Post(ctx, method, g.Map{
"request": g.Map{
"outOrderId": req,
},
})
_ = gjson.New(result).Scan(&res)
return
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论