Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录
切换导航
L
library
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
stbz
library
Commits
1636a677
提交
1636a677
authored
6月 26, 2025
作者:
张立波
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
hcw
上级
78755fda
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
77 行增加
和
24 行删除
+77
-24
hcw_addesss.go
upstream/hcw/hcw_addesss.go
+44
-0
hcw_order.go
upstream/hcw/hcw_order.go
+33
-24
没有找到文件。
upstream/hcw/hcw_addesss.go
0 → 100644
浏览文件 @
1636a677
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
}
upstream/hcw/hcw_order.go
浏览文件 @
1636a677
...
...
@@ -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
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论