Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录
切换导航
L
library
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
stbz
library
Commits
91d815c7
提交
91d815c7
authored
7月 21, 2022
作者:
zhanglibo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
天猫匿名账号
上级
f54764ad
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
20 行增加
和
22 行删除
+20
-22
tm_account.go
upstream/tm/tm_account.go
+2
-3
tm_deliver.go
upstream/tm/tm_deliver.go
+2
-3
tm_order.go
upstream/tm/tm_order.go
+6
-6
tm_refund.go
upstream/tm/tm_refund.go
+10
-10
没有找到文件。
upstream/tm/tm_account.go
浏览文件 @
91d815c7
...
...
@@ -3,7 +3,6 @@ package tm
import
(
"context"
"encoding/json"
"github.com/gogf/gf/util/gconv"
)
type
accountTm
struct
{
...
...
@@ -12,11 +11,11 @@ type accountTm struct {
var
Account
=
accountTm
{}
//Regist 注册单个淘宝账号接口(同步)
func
(
s
*
accountTm
)
Regist
(
ctx
context
.
Context
,
AppID
interface
{}
)
(
res
*
CommonRes
,
err
error
)
{
func
(
s
*
accountTm
)
Regist
(
ctx
context
.
Context
,
UserId
string
)
(
res
*
CommonRes
,
err
error
)
{
method
:=
"RegistAnonymousTbAccount"
result
,
err
:=
post
(
ctx
,
method
,
map
[
string
]
string
{
"BizUid"
:
server
.
BizUid
,
"ThirdPartyUserId"
:
gconv
.
String
(
AppID
)
,
"ThirdPartyUserId"
:
UserId
,
})
_
=
json
.
Unmarshal
([]
byte
(
result
),
&
res
)
return
...
...
upstream/tm/tm_deliver.go
浏览文件 @
91d815c7
...
...
@@ -3,7 +3,6 @@ package tm
import
(
"context"
"encoding/json"
"github.com/gogf/gf/util/gconv"
)
type
deliverTm
struct
{
...
...
@@ -33,7 +32,7 @@ type DeliverInfoRes struct {
}
//Info 物流查询接口
func
(
s
*
deliverTm
)
Info
(
ctx
context
.
Context
,
AppID
interface
{}
,
LmOrderId
string
)
(
res
*
DeliverInfoRes
,
err
error
)
{
func
(
s
*
deliverTm
)
Info
(
ctx
context
.
Context
,
UserId
,
LmOrderId
string
)
(
res
*
DeliverInfoRes
,
err
error
)
{
method
:=
"queryLogistics"
...
...
@@ -41,7 +40,7 @@ func (s *deliverTm) Info(ctx context.Context, AppID interface{}, LmOrderId strin
"BizUid"
:
server
.
BizUid
,
"LmOrderId"
:
LmOrderId
,
"AccountType"
:
"ANONY"
,
"ThirdPartyUserId"
:
gconv
.
String
(
AppID
)
,
"ThirdPartyUserId"
:
UserId
,
}
result
,
err
:=
post
(
ctx
,
method
,
request
)
...
...
upstream/tm/tm_order.go
浏览文件 @
91d815c7
...
...
@@ -73,7 +73,7 @@ func (s *orderTm) Before(ctx context.Context, addr OrderAddress, itemLists []Ord
}
type
OrderCreateReq
struct
{
AppID
interface
{}
UserId
string
ChannelOrder
string
Address
OrderAddress
ItemLists
[]
OrderGoodsItem
...
...
@@ -108,7 +108,7 @@ func (s *orderTm) Create(ctx context.Context, req OrderCreateReq) (res *OrderCre
request
[
"BizUid"
]
=
server
.
BizUid
request
[
"OutTradeId"
]
=
req
.
ChannelOrder
request
[
"AccountType"
]
=
typeAnony
request
[
"ThirdPartyUserId"
]
=
gconv
.
String
(
req
.
AppID
)
request
[
"ThirdPartyUserId"
]
=
req
.
UserId
result
,
err
:=
post
(
ctx
,
method
,
request
)
_
=
json
.
Unmarshal
([]
byte
(
result
),
&
res
)
...
...
@@ -136,7 +136,7 @@ func (s *orderTm) Pay(ctx context.Context, req OrderPayReq) (res *OrderCreateRes
}
type
OrderListReq
struct
{
AppID
interface
{}
UserId
string
ChannelOrder
string
LmOrderId
string
LogisticsStatus
string
...
...
@@ -231,7 +231,7 @@ func (s *orderTm) List(ctx context.Context, req OrderListReq) (res *OrderListRes
"PageNumber"
:
"1"
,
"PageSize"
:
"20"
,
"AccountType"
:
typeAnony
,
"ThirdPartyUserId"
:
gconv
.
String
(
req
.
AppID
)
,
"ThirdPartyUserId"
:
req
.
UserId
,
}
result
,
err
:=
post
(
ctx
,
method
,
request
)
...
...
@@ -240,7 +240,7 @@ func (s *orderTm) List(ctx context.Context, req OrderListReq) (res *OrderListRes
}
type
OrderCancelReq
struct
{
AppID
interface
{}
UserId
string
LmOrderId
string
}
...
...
@@ -252,7 +252,7 @@ func (s *orderTm) Cancel(ctx context.Context, req OrderCancelReq) (res *OrderLis
"BizUid"
:
server
.
BizUid
,
"LmOrderId"
:
req
.
LmOrderId
,
"AccountType"
:
typeAnony
,
"ThirdPartyUserId"
:
gconv
.
String
(
req
.
AppID
)
,
"ThirdPartyUserId"
:
req
.
UserId
,
})
_
=
json
.
Unmarshal
([]
byte
(
result
),
&
res
)
return
...
...
upstream/tm/tm_refund.go
浏览文件 @
91d815c7
...
...
@@ -12,7 +12,7 @@ type refundTm struct {
var
Refund
=
refundTm
{}
type
RefundSubmitReq
struct
{
AppID
interface
{}
UserId
string
SubLmOrderId
string
//子订单号
DisputeId
string
//售后ID
CpCode
string
//物流编码
...
...
@@ -29,7 +29,7 @@ func (s *refundTm) Submit(ctx context.Context, req RefundSubmitReq) (res *Common
"DisputeId"
:
req
.
DisputeId
,
"CpCode"
:
req
.
CpCode
,
"LogisticsNo"
:
req
.
LogisticsNo
,
"ThirdPartyUserId"
:
gconv
.
String
(
req
.
AppID
)
,
"ThirdPartyUserId"
:
req
.
UserId
,
"AccountType"
:
typeAnony
,
}
...
...
@@ -39,14 +39,14 @@ func (s *refundTm) Submit(ctx context.Context, req RefundSubmitReq) (res *Common
}
//Cancel 取消退款申请接口
func
(
s
*
refundTm
)
Cancel
(
ctx
context
.
Context
,
AppID
uint
,
subLmOrderId
,
disputeId
string
)
(
res
*
CommonRes
,
err
error
)
{
func
(
s
*
refundTm
)
Cancel
(
ctx
context
.
Context
,
UserId
,
subLmOrderId
,
disputeId
string
)
(
res
*
CommonRes
,
err
error
)
{
method
:=
"cancelRefund"
request
:=
map
[
string
]
string
{
"BizUid"
:
server
.
BizUid
,
"SubLmOrderId"
:
subLmOrderId
,
"DisputeId"
:
disputeId
,
"ThirdPartyUserId"
:
gconv
.
String
(
AppID
)
,
"ThirdPartyUserId"
:
UserId
,
"AccountType"
:
typeAnony
,
}
...
...
@@ -56,7 +56,7 @@ func (s *refundTm) Cancel(ctx context.Context, AppID uint, subLmOrderId, dispute
}
type
RefundBeforeReq
struct
{
AppID
interface
{}
UserId
string
ChannelOrder
string
SubLmOrderId
string
BizClaimType
string
...
...
@@ -93,7 +93,7 @@ func (s *refundTm) Before(ctx context.Context, req RefundBeforeReq) (res *Refund
"SubLmOrderId"
:
req
.
SubLmOrderId
,
"GoodsStatus"
:
req
.
GoodsStatus
,
"BizClaimType"
:
req
.
BizClaimType
,
"ThirdPartyUserId"
:
gconv
.
String
(
req
.
AppID
)
,
"ThirdPartyUserId"
:
req
.
UserId
,
"AccountType"
:
typeAnony
,
}
...
...
@@ -103,7 +103,7 @@ func (s *refundTm) Before(ctx context.Context, req RefundBeforeReq) (res *Refund
}
type
RefundApplyReq
struct
{
AppID
interface
{}
UserId
string
SubLmOrderId
string
//子订单号
BizClaimType
string
//退款类型
ApplyRefundFee
string
//申请退款金额
...
...
@@ -144,7 +144,7 @@ func (s *refundTm) Apply(ctx context.Context, req *RefundApplyReq) (res *RefundA
request
[
"GoodsStatus"
]
=
req
.
GoodsStatus
request
[
"BizUid"
]
=
server
.
BizUid
request
[
"AccountType"
]
=
typeAnony
request
[
"ThirdPartyUserId"
]
=
gconv
.
String
(
req
.
AppID
)
request
[
"ThirdPartyUserId"
]
=
req
.
UserId
result
,
err
:=
post
(
ctx
,
method
,
request
)
_
=
json
.
Unmarshal
([]
byte
(
result
),
&
res
)
...
...
@@ -186,13 +186,13 @@ type RefundInfoRes struct {
}
//Info 详情
func
(
s
*
refundTm
)
Info
(
ctx
context
.
Context
,
AppID
uint
,
subLmOrderId
string
)
(
res
*
RefundInfoRes
,
err
error
)
{
func
(
s
*
refundTm
)
Info
(
ctx
context
.
Context
,
UserId
,
subLmOrderId
string
)
(
res
*
RefundInfoRes
,
err
error
)
{
method
:=
"queryRefundApplicationDetail"
request
:=
map
[
string
]
string
{
"BizUid"
:
server
.
BizUid
,
"SubLmOrderId"
:
subLmOrderId
,
"ThirdPartyUserId"
:
gconv
.
String
(
AppID
)
,
"ThirdPartyUserId"
:
UserId
,
"AccountType"
:
typeAnony
,
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论