Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录
切换导航
L
library
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
stbz
library
Commits
1a97c8e2
提交
1a97c8e2
authored
9月 05, 2022
作者:
zhanglibo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
淘特
上级
d2a8f3a4
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
35 行增加
和
28 行删除
+35
-28
itao.go
upstream/itao/itao.go
+0
-2
itao_order.go
upstream/itao/itao_order.go
+35
-26
没有找到文件。
upstream/itao/itao.go
浏览文件 @
1a97c8e2
...
@@ -65,9 +65,7 @@ func (s *Config) sign(method string, param g.Map) g.Map {
...
@@ -65,9 +65,7 @@ func (s *Config) sign(method string, param g.Map) g.Map {
}
}
//拼接参数
//拼接参数
signStr
=
"param2/1/"
+
method
+
"/"
+
s
.
AppKey
+
signStr
signStr
=
"param2/1/"
+
method
+
"/"
+
s
.
AppKey
+
signStr
g
.
Dump
(
signStr
)
param
[
"_aop_signature"
]
=
s
.
CreateSign
(
signStr
)
param
[
"_aop_signature"
]
=
s
.
CreateSign
(
signStr
)
//param["_aop_signature"] = "A4D5F82A89A7515CB66A1AF3AC97C02AF6223C90"
return
param
return
param
}
}
...
...
upstream/itao/itao_order.go
浏览文件 @
1a97c8e2
...
@@ -4,6 +4,7 @@ import (
...
@@ -4,6 +4,7 @@ import (
"context"
"context"
"github.com/gogf/gf/encoding/gjson"
"github.com/gogf/gf/encoding/gjson"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/frame/g"
"github.com/gogf/gf/util/gconv"
)
)
type
orderItao
struct
{
type
orderItao
struct
{
...
@@ -66,12 +67,12 @@ type OrderBeforeRes struct {
...
@@ -66,12 +67,12 @@ type OrderBeforeRes struct {
Image
string
`json:"image"`
Image
string
`json:"image"`
OrderLineRenders
[]
struct
{
OrderLineRenders
[]
struct
{
ItemInfo
struct
{
ItemInfo
struct
{
ItemId
int64
`json:"itemId"`
ItemId
string
`json:"itemId"`
SkuId
int
`json:"skuId"`
SkuId
string
`json:"skuId"`
}
`json:"itemInfo"`
}
`json:"itemInfo"`
ItemPayPrice
int
`json:"itemPayPrice"`
ItemPayPrice
int
`json:"itemPayPrice"`
OrderLineId
int
`json:"orderLineId"`
OrderLineId
string
`json:"orderLineId"`
Quantity
int
`json:"quantity"`
Quantity
int
`json:"quantity"`
}
`json:"orderLineRenders"`
}
`json:"orderLineRenders"`
OrderPayPrice
int
`json:"orderPayPrice"`
OrderPayPrice
int
`json:"orderPayPrice"`
Quantity
int
`json:"quantity"`
Quantity
int
`json:"quantity"`
...
@@ -97,7 +98,7 @@ type OrderPromotion struct {
...
@@ -97,7 +98,7 @@ type OrderPromotion struct {
HasPromotion
bool
`json:"hasPromotion"`
HasPromotion
bool
`json:"hasPromotion"`
IdValues
[]
interface
{
IdValues
[]
interface
{
}
`json:"idValues"`
}
`json:"idValues"`
OrderLineId
int
`json:"orderLineId"`
OrderLineId
string
`json:"orderLineId"`
PromotionPriceMap
struct
{
PromotionPriceMap
struct
{
LtaoMonthPkCard
int
`json:"ltaoMonthPkCard"`
LtaoMonthPkCard
int
`json:"ltaoMonthPkCard"`
}
`json:"promotionPriceMap"`
}
`json:"promotionPriceMap"`
...
@@ -120,7 +121,9 @@ func (s orderItao) Before(ctx context.Context, req OrderBeforeReq) (res *OrderBe
...
@@ -120,7 +121,9 @@ func (s orderItao) Before(ctx context.Context, req OrderBeforeReq) (res *OrderBe
result
,
err
:=
server
.
Post
(
ctx
,
method
,
g
.
Map
{
result
,
err
:=
server
.
Post
(
ctx
,
method
,
g
.
Map
{
"request"
:
req
,
"request"
:
req
,
})
})
_
=
gjson
.
New
(
result
)
.
Scan
(
&
res
)
_
=
gjson
.
NewWithOptions
(
result
,
gjson
.
Options
{
StrNumber
:
true
,
})
.
Scan
(
&
res
)
return
return
}
}
...
@@ -149,7 +152,7 @@ type OrderCreateRes struct {
...
@@ -149,7 +152,7 @@ type OrderCreateRes struct {
EnablingOrdersResult
struct
{
EnablingOrdersResult
struct
{
Model
struct
{
Model
struct
{
AlipayTradeIds
[]
string
`json:"alipayTradeIds"`
AlipayTradeIds
[]
string
`json:"alipayTradeIds"`
OrderIds
[]
int64
`json:"orderIds"`
OrderIds
[]
string
`json:"orderIds"`
RedirectUrl
string
`json:"redirectUrl"`
RedirectUrl
string
`json:"redirectUrl"`
}
`json:"model"`
}
`json:"model"`
}
`json:"enablingOrdersResult"`
}
`json:"enablingOrdersResult"`
...
@@ -172,7 +175,9 @@ func (s orderItao) Create(ctx context.Context, req OrderCreateReq) (res *OrderCr
...
@@ -172,7 +175,9 @@ func (s orderItao) Create(ctx context.Context, req OrderCreateReq) (res *OrderCr
result
,
err
:=
server
.
Post
(
ctx
,
method
,
g
.
Map
{
result
,
err
:=
server
.
Post
(
ctx
,
method
,
g
.
Map
{
"request"
:
req
,
"request"
:
req
,
})
})
_
=
gjson
.
New
(
result
)
.
Scan
(
&
res
)
_
=
gjson
.
NewWithOptions
(
result
,
gjson
.
Options
{
StrNumber
:
true
,
})
.
Scan
(
&
res
)
return
return
}
}
...
@@ -184,16 +189,16 @@ type OrderDetailRes struct {
...
@@ -184,16 +189,16 @@ type OrderDetailRes struct {
BuyerToken
string
`json:"buyerToken"`
BuyerToken
string
`json:"buyerToken"`
Detail
int
`json:"detail"`
Detail
int
`json:"detail"`
DetailOrderList
[]
struct
{
DetailOrderList
[]
struct
{
BizOrderId
int64
`json:"bizOrderId"`
BizOrderId
string
`json:"bizOrderId"`
BuyAmount
int
`json:"buyAmount"`
BuyAmount
int
`json:"buyAmount"`
BuyerToken
string
`json:"buyerToken"`
BuyerToken
string
`json:"buyerToken"`
Detail
int
`json:"detail"`
Detail
int
`json:"detail"`
GmtCreate
string
`json:"gmtCreate"`
GmtCreate
string
`json:"gmtCreate"`
ItemInfo
struct
{
ItemInfo
struct
{
ItemId
int64
`json:"itemId"`
ItemId
string
`json:"itemId"`
Pic
string
`json:"pic"`
Pic
string
`json:"pic"`
Price
string
`json:"price"`
Price
string
`json:"price"`
SkuId
int
`json:"skuId"`
SkuId
string
`json:"skuId"`
Title
string
`json:"title"`
Title
string
`json:"title"`
}
`json:"itemInfo"`
}
`json:"itemInfo"`
LogisticsOrderId
int64
`json:"logisticsOrderId"`
LogisticsOrderId
int64
`json:"logisticsOrderId"`
...
@@ -210,10 +215,10 @@ type OrderDetailRes struct {
...
@@ -210,10 +215,10 @@ type OrderDetailRes struct {
}
`json:"detailOrderList"`
}
`json:"detailOrderList"`
GmtCreate
string
`json:"gmtCreate"`
GmtCreate
string
`json:"gmtCreate"`
ItemInfo
struct
{
ItemInfo
struct
{
ItemId
int64
`json:"itemId"`
ItemId
string
`json:"itemId"`
Pic
string
`json:"pic"`
Pic
string
`json:"pic"`
Price
string
`json:"price"`
Price
string
`json:"price"`
SkuId
int
`json:"skuId"`
SkuId
string
`json:"skuId"`
Title
string
`json:"title"`
Title
string
`json:"title"`
}
`json:"itemInfo"`
}
`json:"itemInfo"`
LogisticsOrderId
int64
`json:"logisticsOrderId"`
LogisticsOrderId
int64
`json:"logisticsOrderId"`
...
@@ -249,36 +254,38 @@ type OrderDetailRes struct {
...
@@ -249,36 +254,38 @@ type OrderDetailRes struct {
}
}
//Detail 详情
//Detail 详情
func
(
s
orderItao
)
Detail
(
ctx
context
.
Context
,
req
string
)
(
res
*
OrderDetailRes
,
err
error
)
{
func
(
s
orderItao
)
Detail
(
ctx
context
.
Context
,
req
interface
{}
)
(
res
*
OrderDetailRes
,
err
error
)
{
method
:=
"com.alibaba.c2m/ltao.trade.queryOrder"
method
:=
"com.alibaba.c2m/ltao.trade.queryOrder"
result
,
err
:=
server
.
Post
(
ctx
,
method
,
g
.
Map
{
result
,
err
:=
server
.
Post
(
ctx
,
method
,
g
.
Map
{
"request"
:
g
.
Map
{
"request"
:
g
.
Map
{
"bizOrderId"
:
req
,
"bizOrderId"
:
gconv
.
Int64
(
req
)
,
},
},
})
})
_
=
gjson
.
New
(
result
)
.
Scan
(
&
res
)
_
=
gjson
.
NewWithOptions
(
result
,
gjson
.
Options
{
StrNumber
:
true
,
})
.
Scan
(
&
res
)
return
return
}
}
type
OrderReflectRes
struct
{
type
OrderReflectRes
struct
{
Result
struct
{
Result
struct
{
Result
struct
{
Result
struct
{
BizOrderId
int64
`json:"bizOrderId"`
BizOrderId
string
`json:"bizOrderId"`
BuyAmount
int
`json:"buyAmount"`
BuyAmount
int
`json:"buyAmount"`
BuyerToken
string
`json:"buyerToken"`
BuyerToken
string
`json:"buyerToken"`
Detail
int
`json:"detail"`
Detail
int
`json:"detail"`
DetailOrderList
[]
struct
{
DetailOrderList
[]
struct
{
BizOrderId
int64
`json:"bizOrderId"`
BizOrderId
string
`json:"bizOrderId"`
BuyAmount
int
`json:"buyAmount"`
BuyAmount
int
`json:"buyAmount"`
BuyerToken
string
`json:"buyerToken"`
BuyerToken
string
`json:"buyerToken"`
Detail
int
`json:"detail"`
Detail
int
`json:"detail"`
GmtCreate
string
`json:"gmtCreate"`
GmtCreate
string
`json:"gmtCreate"`
ItemInfo
struct
{
ItemInfo
struct
{
ItemId
int64
`json:"itemId"`
ItemId
string
`json:"itemId"`
Pic
string
`json:"pic"`
Pic
string
`json:"pic"`
Price
string
`json:"price"`
Price
string
`json:"price"`
SkuId
int
`json:"skuId"`
SkuId
string
`json:"skuId"`
SkuInfoList
[]
interface
{}
`json:"skuInfoList"`
SkuInfoList
[]
interface
{}
`json:"skuInfoList"`
Title
string
`json:"title"`
Title
string
`json:"title"`
}
`json:"itemInfo"`
}
`json:"itemInfo"`
...
@@ -296,19 +303,19 @@ type OrderReflectRes struct {
...
@@ -296,19 +303,19 @@ type OrderReflectRes struct {
}
`json:"detailOrderList"`
}
`json:"detailOrderList"`
GmtCreate
string
`json:"gmtCreate"`
GmtCreate
string
`json:"gmtCreate"`
ItemInfo
struct
{
ItemInfo
struct
{
ItemId
int64
`json:"itemId"`
ItemId
string
`json:"itemId"`
Pic
string
`json:"pic"`
Pic
string
`json:"pic"`
Price
string
`json:"price"`
Price
string
`json:"price"`
SkuId
int
`json:"skuId"`
SkuId
string
`json:"skuId"`
SkuInfoList
[]
interface
{}
`json:"skuInfoList"`
SkuInfoList
[]
interface
{}
`json:"skuInfoList"`
Title
string
`json:"title"`
Title
string
`json:"title"`
}
`json:"itemInfo"`
}
`json:"itemInfo"`
LogisticsOrderId
int64
`json:"logisticsOrderId"`
LogisticsOrderId
int64
`json:"logisticsOrderId"`
LogisticsStatus
int
`json:"logisticsStatus"`
LogisticsStatus
int
`json:"logisticsStatus"`
Main
int
`json:"main"`
Main
int
`json:"main"`
ParentId
int64
`json:"parentId"`
ParentId
string
`json:"parentId"`
PayFee
int
`json:"payFee"`
PayFee
int
`json:"payFee"`
PayOrderId
int64
`json:"payOrderId"`
PayOrderId
string
`json:"payOrderId"`
PayStatus
int
`json:"payStatus"`
PayStatus
int
`json:"payStatus"`
PostFee
int
`json:"postFee"`
PostFee
int
`json:"postFee"`
RefundStatus
int
`json:"refundStatus"`
RefundStatus
int
`json:"refundStatus"`
...
@@ -330,6 +337,8 @@ func (s orderItao) Reflect(ctx context.Context, req string) (res *OrderReflectRe
...
@@ -330,6 +337,8 @@ func (s orderItao) Reflect(ctx context.Context, req string) (res *OrderReflectRe
"outOrderId"
:
req
,
"outOrderId"
:
req
,
},
},
})
})
_
=
gjson
.
New
(
result
)
.
Scan
(
&
res
)
_
=
gjson
.
NewWithOptions
(
result
,
gjson
.
Options
{
StrNumber
:
true
,
})
.
Scan
(
&
res
)
return
return
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论