Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录
切换导航
L
library
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
stbz
library
Commits
c184ac1f
提交
c184ac1f
authored
6月 09, 2022
作者:
zhanglibo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
京东增加字段
上级
081c051c
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
19 行增加
和
10 行删除
+19
-10
jingdong_order.go
upstream/jingdong/jingdong_order.go
+19
-10
没有找到文件。
upstream/jingdong/jingdong_order.go
浏览文件 @
c184ac1f
...
@@ -74,9 +74,13 @@ type OrderDetailBase struct {
...
@@ -74,9 +74,13 @@ type OrderDetailBase struct {
}
}
//OrderDetailRes 订单详情
//OrderDetailRes 订单详情
// jdOrderState 京东状态
// 1.新单 2.等待支付 3.等待支付确认 4.延迟付款确认 5.订单暂停 6.店长最终审核 7.等待打印 8.等待出库 9.等待打包 10.等待发货
// 11.自提途中 12.上门提货 13.自提退货 14.确认自提 16.等待确认收货 17.配送退货 18.货到付款确认 19.已完成 21.收款确认 22.锁定
type
OrderDetailRes
struct
{
type
OrderDetailRes
struct
{
CommonRes
CommonRes
Result
struct
{
Result
struct
{
JdOrderState
int
`json:"jdOrderState"`
//京东状态
SubmitState
int
`json:"submitState"`
//预占确认状态。0没确认预占。 1已确认预占。
SubmitState
int
`json:"submitState"`
//预占确认状态。0没确认预占。 1已确认预占。
Type
int
`json:"type"`
//订单类型。1是父订单 2是子订单
Type
int
`json:"type"`
//订单类型。1是父订单 2是子订单
OrderState
int
`json:"orderState"`
//订单状态。0为取消订单 1为有效
OrderState
int
`json:"orderState"`
//订单状态。0为取消订单 1为有效
...
@@ -90,8 +94,8 @@ type OrderDetailPOrder struct {
...
@@ -90,8 +94,8 @@ type OrderDetailPOrder struct {
Freight
float64
`json:"freight"`
//运费
Freight
float64
`json:"freight"`
//运费
OrderPrice
float64
`json:"orderPrice"`
//订单总金额
OrderPrice
float64
`json:"orderPrice"`
//订单总金额
OrderNakedPrice
float64
`json:"orderNakedPrice"`
//订单未含税金额
OrderNakedPrice
float64
`json:"orderNakedPrice"`
//订单未含税金额
Sku
[]
OrderSkuItem
`json:"sku"`
//商品列表
OrderTaxPrice
float64
`json:"orderTaxPrice"`
//订单税额
OrderTaxPrice
float64
`json:"orderTaxPrice"`
//订单税额
Sku
[]
OrderSkuItem
`json:"sku"`
//商品列表
}
}
type
OrderDetailCOrder
struct
{
type
OrderDetailCOrder
struct
{
...
@@ -104,13 +108,16 @@ type OrderDetailCOrder struct {
...
@@ -104,13 +108,16 @@ type OrderDetailCOrder struct {
OrderPrice
float64
`json:"orderPrice"`
OrderPrice
float64
`json:"orderPrice"`
OrderNakedPrice
float64
`json:"orderNakedPrice"`
OrderNakedPrice
float64
`json:"orderNakedPrice"`
Type
int
`json:"type"`
//商品类型。 0 普通、1 附件、2 赠品、3延保
Type
int
`json:"type"`
//商品类型。 0 普通、1 附件、2 赠品、3延保
Sku
[]
OrderSkuItem
`json:"sku"`
OrderTaxPrice
float64
`json:"orderTaxPrice"`
OrderTaxPrice
float64
`json:"orderTaxPrice"`
Sku
[]
OrderSkuItem
`json:"sku"`
}
}
type
OrderDetailChild
struct
{
type
OrderDetailChild
struct
{
CommonRes
CommonRes
Result
OrderDetailCOrder
`json:"result"`
Result
struct
{
JdOrderState
int
`json:"jdOrderState"`
//京东状态
OrderDetailCOrder
}
`json:"result"`
}
}
//OrderFreightRes 运费
//OrderFreightRes 运费
...
@@ -182,6 +189,7 @@ func (*orderJD) Detail(ctx context.Context, OrderID string) (res *OrderDetailRes
...
@@ -182,6 +189,7 @@ func (*orderJD) Detail(ctx context.Context, OrderID string) (res *OrderDetailRes
method
:=
"order/selectJdOrder"
method
:=
"order/selectJdOrder"
param
:=
g
.
Map
{
param
:=
g
.
Map
{
"jdOrderId"
:
OrderID
,
"jdOrderId"
:
OrderID
,
"queryExts"
:
"jdOrderState"
,
}
}
result
,
err
:=
server
.
requestApi
(
ctx
,
method
,
param
)
result
,
err
:=
server
.
requestApi
(
ctx
,
method
,
param
)
...
@@ -201,7 +209,7 @@ func (*orderJD) Detail(ctx context.Context, OrderID string) (res *OrderDetailRes
...
@@ -201,7 +209,7 @@ func (*orderJD) Detail(ctx context.Context, OrderID string) (res *OrderDetailRes
res
.
CommonRes
=
child
.
CommonRes
res
.
CommonRes
=
child
.
CommonRes
res
.
Result
.
Type
=
child
.
Result
.
Type
res
.
Result
.
Type
=
child
.
Result
.
Type
res
.
Result
.
SubmitState
=
child
.
Result
.
SubmitState
res
.
Result
.
SubmitState
=
child
.
Result
.
SubmitState
res
.
Result
.
OrderState
=
child
.
Result
.
OrderState
res
.
Result
.
JdOrderState
=
child
.
Result
.
Jd
OrderState
res
.
Result
.
POrder
=
OrderDetailPOrder
{
res
.
Result
.
POrder
=
OrderDetailPOrder
{
JdOrderId
:
child
.
Result
.
JdOrderId
,
JdOrderId
:
child
.
Result
.
JdOrderId
,
...
@@ -211,7 +219,8 @@ func (*orderJD) Detail(ctx context.Context, OrderID string) (res *OrderDetailRes
...
@@ -211,7 +219,8 @@ func (*orderJD) Detail(ctx context.Context, OrderID string) (res *OrderDetailRes
OrderTaxPrice
:
child
.
Result
.
OrderTaxPrice
,
OrderTaxPrice
:
child
.
Result
.
OrderTaxPrice
,
Sku
:
child
.
Result
.
Sku
,
Sku
:
child
.
Result
.
Sku
,
}
}
res
.
Result
.
COrder
=
append
(
res
.
Result
.
COrder
,
child
.
Result
)
child
.
Result
.
OrderDetailCOrder
.
POrder
=
child
.
Result
.
OrderDetailCOrder
.
JdOrderId
res
.
Result
.
COrder
=
append
(
res
.
Result
.
COrder
,
child
.
Result
.
OrderDetailCOrder
)
}
}
return
return
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论