Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录
切换导航
L
library
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
stbz
library
Commits
6d2a2dd7
提交
6d2a2dd7
authored
4月 23, 2023
作者:
赵雪如
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
查询零售价tmNew
上级
28f70e4b
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
55 行增加
和
0 行删除
+55
-0
tm_goods.go
upstream/tmNew/tm_goods.go
+55
-0
没有找到文件。
upstream/tmNew/tm_goods.go
浏览文件 @
6d2a2dd7
...
...
@@ -165,6 +165,31 @@ type ListDistributionItemRes struct {
Success
bool
`json:"Success"`
TotalCount
int
`json:"TotalCount"`
}
type
QueryItemGuIDeRetailPriceRes
struct
{
RequestId
string
`json:"RequestId"`
Message
string
`json:"Message"`
Model
[]
struct
{
SkuModels
[]
struct
{
Status
int
`json:"Status"`
GuideRetailPrice
int
`json:"GuideRetailPrice"`
PriceCent
int
`json:"PriceCent"`
LmItemId
string
`json:"LmItemId"`
SkuId
int64
`json:"SkuId"`
DistributionMallId
string
`json:"DistributionMallId"`
ItemId
int64
`json:"ItemId"`
ReservedPrice
int
`json:"ReservedPrice"`
}
`json:"SkuModels"`
ReservedPriceScope
string
`json:"ReservedPriceScope"`
ItemTitle
string
`json:"ItemTitle"`
LmItemId
string
`json:"LmItemId"`
DistributionMallId
string
`json:"DistributionMallId"`
ItemId
int64
`json:"ItemId"`
GuideRetailPriceScope
string
`json:"GuideRetailPriceScope"`
ReservedPrice
int
`json:"ReservedPrice"`
}
`json:"Model"`
Code
string
`json:"Code"`
Success
bool
`json:"Success"`
}
//区域库存商品详情
func
(
s
*
goodsTmNew
)
QueryItemDetailWithDivision
(
ctx
context
.
Context
,
addr
string
,
item
string
)
(
res
*
QueryItemDetailWithDivisionRes
,
err
error
)
{
client
,
err
:=
initClient
()
...
...
@@ -226,6 +251,36 @@ func (s *goodsTmNew) ListDistributionItem(ctx context.Context,item *ListDistribu
return
}
//查询零售价
func
(
s
*
goodsTmNew
)
QueryItemGuIDeRetailPrice
(
ctx
context
.
Context
,
item
[]
string
)
(
res
*
QueryItemGuIDeRetailPriceRes
,
err
error
)
{
client
,
err
:=
initClient
()
if
err
!=
nil
{
return
}
if
client
==
nil
{
return
}
result
,
err
:=
client
.
QueryItemGuideRetailPrice
(
&
link
.
QueryItemGuideRetailPriceRequest
{
DistributionMallId
:
tea
.
String
(
server
.
DistributionMallId
),
DistributorId
:
tea
.
String
(
server
.
DistributorId
),
TenantId
:
tea
.
String
(
server
.
TenantId
),
LmItemIds
:
tea
.
StringSlice
(
item
),
})
if
result
==
nil
{
return
}
log
(
ctx
,
gjson
.
New
(
item
)
.
MustToJsonString
(),
result
.
Body
,
err
)
if
*
result
.
Body
.
Success
==
false
{
return
}
a
,
_
:=
json
.
Marshal
(
result
.
Body
)
if
err
=
json
.
Unmarshal
([]
byte
(
a
),
&
res
);
err
!=
nil
{
return
}
return
}
//Detail 详情 todo 该接口正确通过,由于订单部分接口不通过天猫技术不支持对接,后续有时间再自己写
//func (*goodsTmNew) QueryItemDetailWithDivision(ctx context.Context, req string) (res *QueryItemDetailWithDivisionRes, err error) {
// method := "QueryItemDetailWithDivision"
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论