Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录
切换导航
L
library
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
stbz
library
Commits
e4be0a5f
提交
e4be0a5f
authored
8月 30, 2022
作者:
zhanglibo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
淘特
上级
76772bd0
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
127 行增加
和
12 行删除
+127
-12
itao_address.go
upstream/itao/itao_address.go
+39
-1
itao_logistics.go
upstream/itao/itao_logistics.go
+6
-8
itao_order.go
upstream/itao/itao_order.go
+82
-3
没有找到文件。
upstream/itao/itao_address.go
浏览文件 @
e4be0a5f
...
...
@@ -19,6 +19,7 @@ type AddressDivisionReq struct {
Page
int
`json:"pageIndex"`
Size
int
`json:"pageSize"`
}
type
AddressDivisionRes
struct
{
Result
struct
{
Result
struct
{
...
...
@@ -38,10 +39,13 @@ type AddressDivisionRes struct {
TotalCount
int
`json:"totalCount"`
TotalPage
int
`json:"totalPage"`
}
`json:"result"`
Success
bool
`json:"success"`
Success
bool
`json:"success"`
ErrMsg
string
`json:"errMsg"`
ErrCode
string
`json:"errCode"`
}
`json:"result"`
}
//Division 行政区划
func
(
s
addressItao
)
Division
(
ctx
context
.
Context
,
req
AddressDivisionReq
)
(
res
*
AddressDivisionRes
,
err
error
)
{
method
:=
"com.alibaba.c2m/ltao.delivery.queryDivision"
...
...
@@ -51,3 +55,37 @@ func (s addressItao) Division(ctx context.Context, req AddressDivisionReq) (res
_
=
gjson
.
New
(
result
)
.
Scan
(
&
res
)
return
}
type
AddressParseReq
struct
{
Province
string
`json:"prov"`
City
string
`json:"city"`
Detail
string
`json:"addressDetail"`
}
type
AddressParseRes
struct
{
Result
struct
{
Result
struct
{
City
string
`json:"city"`
CityId
int
`json:"cityId"`
District
string
`json:"district"`
DistrictId
int
`json:"districtId"`
Prov
string
`json:"prov"`
ProvId
int
`json:"provId"`
Town
string
`json:"town"`
TownId
int
`json:"townId"`
}
`json:"result"`
Success
bool
`json:"success"`
}
`json:"result"`
}
//Parse 地址解析
// 省、市必传
func
(
s
addressItao
)
Parse
(
ctx
context
.
Context
,
req
AddressParseReq
)
(
res
*
AddressParseRes
,
err
error
)
{
method
:=
"com.alibaba.c2m/ltao.delivery.validate"
result
,
err
:=
server
.
Post
(
ctx
,
method
,
g
.
Map
{
"param"
:
req
,
})
_
=
gjson
.
New
(
result
)
.
Scan
(
&
res
)
return
}
upstream/itao/itao_logistics.go
浏览文件 @
e4be0a5f
...
...
@@ -11,19 +11,17 @@ type logisticsItao struct {
var
Logistics
=
logisticsItao
{}
type
LogisticsDetailReq
struct
{
OrderSn
string
`json:"tradeId"`
type
LogisticsTraceRes
struct
{
}
type
LogisticsDetailRes
struct
{
}
//Detail 详情[实时]
func
(
logisticsItao
)
Detail
(
ctx
context
.
Context
,
req
LogisticsDetailReq
)
(
res
*
LogisticsDetailRes
,
err
error
)
{
//Trace 物流轨迹
func
(
logisticsItao
)
Trace
(
ctx
context
.
Context
,
req
string
)
(
res
*
LogisticsTraceRes
,
err
error
)
{
method
:=
"com.alibaba.c2m/ltao.logistics.queryDetail"
result
,
err
:=
server
.
Post
(
ctx
,
method
,
g
.
Map
{
"request"
:
req
,
"request"
:
g
.
Map
{
"tradeId"
:
req
,
},
})
_
=
gjson
.
New
(
result
)
.
Scan
(
&
res
)
return
...
...
upstream/itao/itao_order.go
浏览文件 @
e4be0a5f
...
...
@@ -79,7 +79,9 @@ type OrderBeforeRes struct {
Title
string
`json:"title"`
}
`json:"validOrderGroups"`
}
`json:"result"`
Success
bool
`json:"success"`
Success
bool
`json:"success"`
ErrMsg
string
`json:"errMsg"`
ErrCode
string
`json:"errCode"`
}
`json:"result"`
}
...
...
@@ -157,7 +159,9 @@ type OrderCreateRes struct {
PartSuccess
bool
`json:"partSuccess"`
Success
bool
`json:"success"`
}
`json:"result"`
Success
bool
`json:"success"`
Success
bool
`json:"success"`
ErrMsg
string
`json:"errMsg"`
ErrCode
string
`json:"errCode"`
}
`json:"result"`
}
...
...
@@ -238,7 +242,9 @@ type OrderDetailRes struct {
SellerToken
string
`json:"sellerToken"`
Status
int
`json:"status"`
}
`json:"result"`
Success
bool
`json:"success"`
Success
bool
`json:"success"`
ErrMsg
string
`json:"errMsg"`
ErrCode
string
`json:"errCode"`
}
`json:"result"`
}
...
...
@@ -254,3 +260,76 @@ func (s orderItao) Detail(ctx context.Context, req string) (res *OrderDetailRes,
_
=
gjson
.
New
(
result
)
.
Scan
(
&
res
)
return
}
type
OrderReflectRes
struct
{
Result
struct
{
Result
struct
{
BizOrderId
int64
`json:"bizOrderId"`
BuyAmount
int
`json:"buyAmount"`
BuyerToken
string
`json:"buyerToken"`
Detail
int
`json:"detail"`
DetailOrderList
[]
struct
{
BizOrderId
int64
`json:"bizOrderId"`
BuyAmount
int
`json:"buyAmount"`
BuyerToken
string
`json:"buyerToken"`
Detail
int
`json:"detail"`
GmtCreate
string
`json:"gmtCreate"`
ItemInfo
struct
{
ItemId
int64
`json:"itemId"`
Pic
string
`json:"pic"`
Price
string
`json:"price"`
SkuId
int
`json:"skuId"`
SkuInfoList
[]
interface
{}
`json:"skuInfoList"`
Title
string
`json:"title"`
}
`json:"itemInfo"`
LogisticsOrderId
int64
`json:"logisticsOrderId"`
LogisticsStatus
int
`json:"logisticsStatus"`
Main
int
`json:"main"`
ParentId
int64
`json:"parentId"`
PayFee
int
`json:"payFee"`
PayOrderId
int64
`json:"payOrderId"`
PayStatus
int
`json:"payStatus"`
PostFee
int
`json:"postFee"`
RefundStatus
int
`json:"refundStatus"`
SellerToken
string
`json:"sellerToken"`
Status
int
`json:"status"`
}
`json:"detailOrderList"`
GmtCreate
string
`json:"gmtCreate"`
ItemInfo
struct
{
ItemId
int64
`json:"itemId"`
Pic
string
`json:"pic"`
Price
string
`json:"price"`
SkuId
int
`json:"skuId"`
SkuInfoList
[]
interface
{}
`json:"skuInfoList"`
Title
string
`json:"title"`
}
`json:"itemInfo"`
LogisticsOrderId
int64
`json:"logisticsOrderId"`
LogisticsStatus
int
`json:"logisticsStatus"`
Main
int
`json:"main"`
ParentId
int64
`json:"parentId"`
PayFee
int
`json:"payFee"`
PayOrderId
int64
`json:"payOrderId"`
PayStatus
int
`json:"payStatus"`
PostFee
int
`json:"postFee"`
RefundStatus
int
`json:"refundStatus"`
SellerToken
string
`json:"sellerToken"`
Status
int
`json:"status"`
}
`json:"result"`
Success
bool
`json:"success"`
ErrMsg
string
`json:"errMsg"`
ErrCode
string
`json:"errCode"`
}
`json:"result"`
}
//Reflect 详情[反查]
func
(
s
orderItao
)
Reflect
(
ctx
context
.
Context
,
req
string
)
(
res
*
OrderReflectRes
,
err
error
)
{
method
:=
"com.alibaba.c2m/ltao.trade.queryOrderByOutId"
result
,
err
:=
server
.
Post
(
ctx
,
method
,
g
.
Map
{
"request"
:
g
.
Map
{
"outOrderId"
:
req
,
},
})
_
=
gjson
.
New
(
result
)
.
Scan
(
&
res
)
return
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论