提交 3cad5d9d authored 作者: 张立波's avatar 张立波

hcw

上级 7a474ad2
...@@ -33,7 +33,7 @@ type AddressParseRes struct { ...@@ -33,7 +33,7 @@ type AddressParseRes struct {
FullPath string `json:"full_path"` FullPath string `json:"full_path"`
} }
func (s *HcwClient) AddressParse(ctx context.Context, req *AddressParseReq) (res *AddressParseRes, err error) { func (s *HcwClient) AddressParse(ctx context.Context, req *AddressParseReq) (res []*AddressParseRes, err error) {
var method = "/address/match" var method = "/address/match"
result, err := s.post(ctx, method, req) result, err := s.post(ctx, method, req)
if nil != err { if nil != err {
......
...@@ -38,7 +38,7 @@ type OrderAddress struct { ...@@ -38,7 +38,7 @@ type OrderAddress struct {
Address string `json:"receive_address"` //收货人具体地址 Address string `json:"receive_address"` //收货人具体地址
ProvinceId string `json:"receive_province_id"` //收货人省份ID ProvinceId string `json:"receive_province_id"` //收货人省份ID
CityId string `json:"receive_city_id"` //收货人城市ID CityId string `json:"receive_city_id"` //收货人城市ID
AreaId string `json:"receive_area_id"` //收货人区ID DistrictId string `json:"receive_area_id"` //收货人区ID
StreetId string `json:"receive_street_id"` //收货人街道ID StreetId string `json:"receive_street_id"` //收货人街道ID
} }
...@@ -60,7 +60,7 @@ type OrderCreateRes struct { ...@@ -60,7 +60,7 @@ type OrderCreateRes struct {
Code int `json:"code"` Code int `json:"code"`
Message string `json:"message"` Message string `json:"message"`
Data struct { Data struct {
OrderId int `json:"order_id"` OrderSn string `json:"order_sn"`
} `json:"data"` } `json:"data"`
} }
...@@ -193,17 +193,18 @@ func (s *HcwClient) OrderDetail(ctx context.Context, orderSn string) (res *Order ...@@ -193,17 +193,18 @@ func (s *HcwClient) OrderDetail(ctx context.Context, orderSn string) (res *Order
} }
type OrderCheckReq struct { type OrderCheckReq struct {
GoodsId int `json:"goods_id"` GoodsNo string `json:"goods_no"`
BuyNum int `json:"buy_num"` SkuNo string `json:"sku_no"`
SupplyType string `json:"supply_type"` BuyNum string `json:"buy_num"`
Source string `json:"source"`
ProvinceID string `json:"province_id"`
CityID string `json:"city_id"`
AreaID string `json:"area_id"`
} }
type OrderCheckRes struct { type OrderCheckRes struct {
Code int `json:"code"` Code int `json:"code"`
Message string `json:"message"` Message string `json:"message"`
Data struct {
OrderId int `json:"order_id"`
} `json:"data"`
} }
func (s *HcwClient) OrderCheck(ctx context.Context, req *OrderCheckReq) (res *OrderCheckRes, err error) { func (s *HcwClient) OrderCheck(ctx context.Context, req *OrderCheckReq) (res *OrderCheckRes, err error) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论