Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录
切换导航
L
library
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
stbz
library
Commits
bb783c3d
提交
bb783c3d
authored
3月 25, 2022
作者:
zhanglibo
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
国美
上级
c62a007e
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
153 行增加
和
23 行删除
+153
-23
gome_goods.go
upstream/gome/gome_goods.go
+153
-23
没有找到文件。
upstream/gome/gome_goods.go
浏览文件 @
bb783c3d
...
...
@@ -15,7 +15,7 @@ var Goods = goodsGome{}
type
GetSkuRes
struct
{
*
CommonRes
Data
struct
{
Data
[]
struct
{
Cat1Id
string
`json:"cat1Id"`
Cat1Name
string
`json:"cat1Name"`
Cat2Id
string
`json:"cat2Id"`
...
...
@@ -26,11 +26,11 @@ type GetSkuRes struct {
SkuShortName
string
`json:"skuShortName"`
BarCode
string
`json:"barCode"`
MchSkuId
string
`json:"mchSkuId"`
SkuWeight
int
erface
{}
`json:"skuWeight"`
SkuWeight
int
64
`json:"skuWeight"`
ItemNo
string
`json:"itemNo"`
OriginalPrice
string
`json:"originalPrice"`
CostPrice
string
`json:"costPrice"`
SellPoint
interface
{}
`json:"sellPoint"`
SellPoint
string
`json:"sellPoint"`
AfterSaleAllowDays
int
`json:"afterSaleAllowDays"`
Valid
int
`json:"valid"`
SkuImgs
[]
struct
{
...
...
@@ -59,7 +59,12 @@ type SkuListRes struct {
*
CommonRes
Data
struct
{
*
CommonPageRes
Data
[]
struct
{
Result
[]
struct
{
Cat1Id
string
`json:"cat1Id"`
Cat1Name
string
`json:"cat1Name"`
Cat2Id
string
`json:"cat2Id"`
Cat2Name
string
`json:"cat2Name"`
Cat3Id
string
`json:"cat3Id"`
Cat3Name
string
`json:"cat3Name"`
SkuName
string
`json:"skuName"`
SkuShortName
string
`json:"skuShortName"`
...
...
@@ -71,6 +76,7 @@ type SkuListRes struct {
CostPrice
string
`json:"costPrice"`
SellPoint
string
`json:"sellPoint"`
AfterSaleAllowDays
int
`json:"afterSaleAllowDays"`
Valid
int
`json:"valid"`
SkuImgs
[]
struct
{
Type
int
`json:"type"`
Url
string
`json:"url"`
...
...
@@ -83,12 +89,72 @@ type SkuListRes struct {
Aname
string
`json:"aname"`
Avalue
string
`json:"avalue"`
}
`json:"attrs"`
}
`json:"
data
"`
}
`json:"
result
"`
}
`json:"data"`
}
type
GetGoodsRes
struct
{
*
CommonRes
Data
struct
{
SpuName
string
`json:"spuName"`
MchSpuId
string
`json:"mchSpuId"`
Cat1Id
string
`json:"cat1Id"`
Cat1Name
string
`json:"cat1Name"`
Cat2Id
string
`json:"cat2Id"`
Cat2Name
string
`json:"cat2Name"`
Cat3Id
string
`json:"cat3Id"`
Cat3Name
string
`json:"cat3Name"`
BrandCode
string
`json:"brandCode"`
BrandName
string
`json:"brandName"`
Unit
string
`json:"unit"`
SpuModel
string
`json:"spuModel"`
ImportFlag
int
`json:"importFlag"`
Place
string
`json:"place"`
Keyword
string
`json:"keyword"`
Adword
string
`json:"adword"`
PackingList
string
`json:"packingList"`
AfterService
string
`json:"afterService"`
AfterSaleAllowDays
int
`json:"afterSaleAllowDays"`
CreateTime
string
`json:"createTime"`
CoverImg
string
`json:"coverImg"`
MainImgs
[]
string
`json:"mainImgs"`
DetailsImgs
[]
string
`json:"detailsImgs"`
Skus
[]
struct
{
Cat1Id
string
`json:"cat1Id"`
Cat1Name
string
`json:"cat1Name"`
Cat2Id
string
`json:"cat2Id"`
Cat2Name
string
`json:"cat2Name"`
Cat3Id
string
`json:"cat3Id"`
Cat3Name
string
`json:"cat3Name"`
SkuName
string
`json:"skuName"`
SkuShortName
string
`json:"skuShortName"`
BarCode
string
`json:"barCode"`
MchSkuId
string
`json:"mchSkuId"`
SkuWeight
int64
`json:"skuWeight"`
ItemNo
string
`json:"itemNo"`
OriginalPrice
string
`json:"originalPrice"`
CostPrice
string
`json:"costPrice"`
SellPoint
string
`json:"sellPoint"`
AfterSaleAllowDays
int
`json:"afterSaleAllowDays"`
Valid
int
`json:"valid"`
SkuImgs
[]
struct
{
Type
int
`json:"type"`
Url
string
`json:"url"`
}
`json:"skuImgs"`
Props
[]
struct
{
Pname
string
`json:"pname"`
Pvalue
string
`json:"pvalue"`
}
`json:"props"`
Attrs
[]
struct
{
Aname
string
`json:"aname"`
Avalue
string
`json:"avalue"`
}
`json:"attrs"`
}
`json:"skus"`
Props
[]
struct
{
Pname
string
`json:"pname"`
Pvalue
string
`json:"pvalue"`
}
`json:"props"`
}
`json:"data"`
}
type
GoodsListReq
struct
{
...
...
@@ -100,7 +166,69 @@ type GoodsListReq struct {
type
GoodsListRes
struct
{
*
CommonRes
//todo
Data
struct
{
*
CommonPageRes
Result
[]
struct
{
SpuName
string
`json:"spuName"`
MchSpuId
string
`json:"mchSpuId"`
Cat1Id
string
`json:"cat1Id"`
Cat1Name
string
`json:"cat1Name"`
Cat2Id
string
`json:"cat2Id"`
Cat2Name
string
`json:"cat2Name"`
Cat3Id
string
`json:"cat3Id"`
Cat3Name
string
`json:"cat3Name"`
BrandCode
string
`json:"brandCode"`
BrandName
string
`json:"brandName"`
Unit
string
`json:"unit"`
SpuModel
string
`json:"spuModel"`
ImportFlag
int
`json:"importFlag"`
Place
string
`json:"place"`
Keyword
string
`json:"keyword"`
Adword
string
`json:"adword"`
PackingList
string
`json:"packingList"`
AfterService
string
`json:"afterService"`
AfterSaleAllowDays
int
`json:"afterSaleAllowDays"`
CreateTime
string
`json:"createTime"`
CoverImg
string
`json:"coverImg"`
MainImgs
[]
string
`json:"mainImgs"`
DetailsImgs
[]
string
`json:"detailsImgs"`
Skus
[]
struct
{
Cat1Id
string
`json:"cat1Id"`
Cat1Name
string
`json:"cat1Name"`
Cat2Id
string
`json:"cat2Id"`
Cat2Name
string
`json:"cat2Name"`
Cat3Id
string
`json:"cat3Id"`
Cat3Name
string
`json:"cat3Name"`
SkuName
string
`json:"skuName"`
SkuShortName
string
`json:"skuShortName"`
BarCode
string
`json:"barCode"`
MchSkuId
string
`json:"mchSkuId"`
SkuWeight
int64
`json:"skuWeight"`
ItemNo
string
`json:"itemNo"`
OriginalPrice
string
`json:"originalPrice"`
CostPrice
string
`json:"costPrice"`
SellPoint
string
`json:"sellPoint"`
AfterSaleAllowDays
int
`json:"afterSaleAllowDays"`
Valid
int
`json:"valid"`
SkuImgs
[]
struct
{
Type
int
`json:"type"`
Url
string
`json:"url"`
}
`json:"skuImgs"`
Props
[]
struct
{
Pname
string
`json:"pname"`
Pvalue
string
`json:"pvalue"`
}
`json:"props"`
Attrs
[]
struct
{
Aname
string
`json:"aname"`
Avalue
string
`json:"avalue"`
}
`json:"attrs"`
}
`json:"skus"`
Props
[]
struct
{
Pname
string
`json:"pname"`
Pvalue
string
`json:"pvalue"`
}
`json:"props"`
}
`json:"result"`
}
`json:"data"`
}
type
GoodsPriceRes
struct
{
...
...
@@ -111,6 +239,7 @@ type GoodsPriceRes struct {
}
`json:"data"`
}
//GetSku 单个 SKU 查询
func
(
goodsGome
)
GetSku
(
ctx
context
.
Context
,
sku
interface
{})
(
res
*
GetSkuRes
,
err
error
)
{
method
:=
"alamein.product.read.querySingleSku"
...
...
@@ -125,6 +254,7 @@ func (goodsGome) GetSku(ctx context.Context, sku interface{}) (res *GetSkuRes, e
return
}
//SkuList 分页 SKU 查询
func
(
goodsGome
)
SkuList
(
ctx
context
.
Context
,
req
*
SkuListReq
)
(
res
*
SkuListRes
,
err
error
)
{
method
:=
"alamein.product.read.pageQuerySku"
...
...
@@ -136,7 +266,7 @@ func (goodsGome) SkuList(ctx context.Context, req *SkuListReq) (res *SkuListRes,
return
}
// GetGoods
todo
// GetGoods
单个 SPU 查询
func
(
goodsGome
)
GetGoods
(
ctx
context
.
Context
,
GoodsID
interface
{})
(
res
*
GetGoodsRes
,
err
error
)
{
method
:=
"alamein.product.read.querySingleSpu"
...
...
@@ -151,7 +281,7 @@ func (goodsGome) GetGoods(ctx context.Context, GoodsID interface{}) (res *GetGoo
return
}
//GoodsList
todo
//GoodsList
分页 SPU 查询
func
(
goodsGome
)
GoodsList
(
ctx
context
.
Context
,
req
*
GoodsListReq
)
(
res
*
GoodsListRes
,
err
error
)
{
method
:=
"alamein.product.read.pageQuerySpu"
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论