提交 1636a677 authored 作者: 张立波's avatar 张立波

hcw

上级 78755fda
package hcw
import (
"context"
"github.com/gogf/gf/encoding/gjson"
)
type AddressParseReq struct {
// 京东区域ID
AreaID string `json:"area_id"`
// 京东区域名称
AreaName string `json:"area_name"`
// 京东市区ID
CityID string `json:"city_id"`
// 京东市区名称
CityName string `json:"city_name"`
// 京东省份ID
ProvinceID string `json:"province_id"`
// 京东省份名称
ProvinceName string `json:"province_name"`
// 渠道来源(meide美的,aux奥克斯,myx美云销,mb美邦,hair海尔,skyworth创维,konka康佳)
Source string `json:"source"`
}
type AddressParseRes struct {
Id int `json:"id"`
Code string `json:"code"`
Parent string `json:"parent"`
Source string `json:"source"`
Level int `json:"level"`
Name string `json:"name"`
NameRaw string `json:"name_raw"`
FullPath string `json:"full_path"`
}
func (s *HcwClient) AddressParse(ctx context.Context, req *AddressParseReq) (res *AddressParseRes, err error) {
var method = "/address/match"
result, err := s.post(ctx, method, req)
if nil != err {
return
}
_ = gjson.New(result).Scan(&res)
return
}
......@@ -7,30 +7,39 @@ import (
)
type OrderCreateReq struct {
Order struct {
Id int `json:"id"`
ParentOrderSn string `json:"parent_order_sn"`
OrderSn string `json:"order_sn"`
ThirdOrderSn string `json:"third_order_sn"`
CreatedTime string `json:"created_time"`
OrderPayTime string `json:"order_pay_time"`
DispatchPrice int `json:"dispatch_price"`
OrderTotalPrice int `json:"order_total_price"`
Remark string `json:"remark"`
RealName string `json:"real_name"`
Mobile string `json:"mobile"`
Provice string `json:"provice"`
City string `json:"city"`
District string `json:"district"`
Street string `json:"street"`
Address string `json:"address"`
ProvinceId int `json:"province_id"`
CityId int `json:"city_id"`
DistrictId int `json:"district_id"`
StreetId int `json:"street_id"`
SupplyType string `json:"supply_type"`
} `json:"order"`
OrderGoodsDetail []*OrderGoodsDetailList `json:"order_goods_detail"`
OrderSn string `json:"order_sn"`
OrderPrice int `json:"order_price"`
OrderDiscountPrice int `json:"order_discount_price"`
OrderFreightPrice int `json:"order_freight_price"`
OrderPayPrice int `json:"order_pay_price"`
OrderPayTime string `json:"order_pay_time"`
OrderRemark string `json:"order_remark"`
Source string `json:"source"`
Address *OrderAddress `json:"address"`
Goods []*OrderGoods `json:"goods"`
}
type OrderGoods struct {
Id int `json:"goods_id"` //商品ID
Num int `json:"goods_num"` //商品购买数量
BuyPrice int `json:"goods_buy_price"` //商品购买价格
PayPrice string `json:"goods_pay_price"` //商品支付价格
GoodsPrice int `json:"goods_goods_price"` //商品单价
SkuNo string `json:"goods_sku_no"` //商品sku
}
type OrderAddress struct {
Name string `json:"receive_name"` //收货人名称
Mobile string `json:"receive_mobile"` //收货人手机
ProvinceName string `json:"receive_provice_name"` //收货人省份
CityName string `json:"receive_city_name"` //收货人城市
DistrictName string `json:"receive_district_name"` //收货人区
StreetName string `json:"receive_street_name"` //收货人街道
Address string `json:"receive_address"` //收货人具体地址
ProvinceId string `json:"receive_province_id"` //收货人省份ID
CityId string `json:"receive_city_id"` //收货人城市ID
AreaId string `json:"receive_area_id"` //收货人区ID
StreetId string `json:"receive_street_id"` //收货人街道ID
}
type OrderGoodsDetailList struct {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论