添加国美api,删除老版本蜂鸟API,添加抖音授权api、
This commit is contained in:
327
platformapi/gome_live_show/store_model.go
Normal file
327
platformapi/gome_live_show/store_model.go
Normal file
@@ -0,0 +1,327 @@
|
||||
package gome_live_show
|
||||
|
||||
import "time"
|
||||
|
||||
//#region 获取商铺详情
|
||||
|
||||
// 查询商铺列表
|
||||
type GetStoreListReq struct {
|
||||
Page
|
||||
StoreName string `json:"storeName"`
|
||||
}
|
||||
|
||||
// 查询商品列表返回值
|
||||
type GetStoreListRes struct {
|
||||
SystemParameterRes
|
||||
Data *StoreListRecords
|
||||
}
|
||||
|
||||
type StoreListRecords struct {
|
||||
Records []*RecordsList `json:"records"`
|
||||
SystemRecordDataDetailRes
|
||||
}
|
||||
|
||||
type RecordsList struct {
|
||||
StoreName string `json:"storeName"` // 店铺名称
|
||||
StoreAlias string `json:"storeAlias"` // 店铺别名
|
||||
StoreStatus int `json:"storeStatus"` // 店铺营业状态 1 待开店;2 已开店;3 临时闭店;4已闭店
|
||||
StoreCode string `json:"storeCode"` // 平台店铺编码
|
||||
}
|
||||
|
||||
//#endregion
|
||||
|
||||
//#region 店铺商品分类列表查询
|
||||
|
||||
// 请求参数
|
||||
type QueryStoreGoodsCategoryListReq struct {
|
||||
Page
|
||||
StoreCode string `json:"storeCode"` // 平台店铺编码
|
||||
}
|
||||
|
||||
// 返回参数
|
||||
type QueryStoreGoodsCategoryListRes struct {
|
||||
SystemParameterRes
|
||||
Data *QueryStoreGoodsCategoryListRecord
|
||||
}
|
||||
|
||||
type QueryStoreGoodsCategoryListRecord struct {
|
||||
SystemRecordDataDetailRes
|
||||
Records []*StoreGoodsCategoryListRecord
|
||||
}
|
||||
type StoreGoodsCategoryListRecord struct {
|
||||
CategoryCode string `json:"categoryCode"` // 店铺分类编码
|
||||
CategoryName string `json:"categoryName"` // 店铺分类名称
|
||||
Rank int `json:"rank"` // 排序
|
||||
}
|
||||
|
||||
//#endregion
|
||||
|
||||
//#region 店铺分类新增
|
||||
|
||||
// 店铺商品分类新增
|
||||
type StoreAddGoodsCategory struct {
|
||||
StoreCode string `json:"storeCode"` // 平台店铺编码[必填]
|
||||
CategoryName string `json:"categoryName"` // 分类名称[必填]
|
||||
Rank int `json:"rank"` // 排序
|
||||
}
|
||||
|
||||
// 店铺商品分类修改
|
||||
type StoreModifyGoodsCategory struct {
|
||||
StoreCode string `json:"storeCode"` // 平台店铺编码[必填]
|
||||
CategoryCode string `json:"categoryCode"` // 店铺商品分类编码[必填]
|
||||
CategoryName string `json:"categoryName"` // 分类名称[必填]
|
||||
Rank int `json:"rank"` // 排序[必填]
|
||||
}
|
||||
|
||||
//#endregion
|
||||
|
||||
//#region 商户商品列表
|
||||
|
||||
// 商户商品列表查询参数
|
||||
type QueryStoreGoodsListReq struct {
|
||||
GoodsName string `json:"goodsName"` // 商品名称[非必填]
|
||||
Cat3Code string `json:"cat3Code"` // 三级品类[非必填]
|
||||
Page
|
||||
}
|
||||
|
||||
// 返回结构体
|
||||
type QueryStoreGoodsListRes struct {
|
||||
SystemParameterRes
|
||||
Data *QueryStoreGoodsListRecord
|
||||
}
|
||||
|
||||
type QueryStoreGoodsListRecord struct {
|
||||
SystemRecordDataDetailRes
|
||||
Records []*struct {
|
||||
SpuCode string `json:"spuCode"` // 三级品类
|
||||
GoodsName string `json:"goodsName"` // 商品名称
|
||||
MainPictureUrl string `json:"mainPictureUrl"` // 商品主图
|
||||
FullCatName string `json:"fullCatName"` // 商品所属品类 零售/美妆护肤/面部护肤
|
||||
CreateTime string `json:"createTime"` // 创建时间
|
||||
}
|
||||
}
|
||||
|
||||
type QueryStoreGoodsListData struct {
|
||||
SpuCode string `json:"spuCode"` // 三级品类
|
||||
GoodsName string `json:"goodsName"` // 商品名称
|
||||
MainPictureUrl string `json:"mainPictureUrl"` // 商品主图
|
||||
FullCatName string `json:"fullCatName"` // 商品所属品类
|
||||
CreateTime string `json:"createTime"` // 创建时间
|
||||
}
|
||||
|
||||
//#endregion
|
||||
|
||||
//#region 商户商品详情
|
||||
|
||||
// 商品详情请求参数
|
||||
type QueryStoreGoodsDetailsRes struct {
|
||||
SystemParameterRes
|
||||
Data *QueryStoreGoodsDetailsData
|
||||
}
|
||||
|
||||
type QueryStoreGoodsDetailsData struct {
|
||||
SystemRecordDataDetailRes
|
||||
Records *QueryStoreGoodsDetailsRecords
|
||||
}
|
||||
|
||||
type QueryStoreGoodsDetailsRecords struct {
|
||||
GoodsName string `json:"goodsName"` // 商品名称
|
||||
MainPictureUrl string `json:"mainPictureUrl"` // 商品主图
|
||||
OtherPictureUrl string `json:"otherPictureUrl"` // 商品其他图
|
||||
VideoUrl string `json:"videoUrl"` // 商品视频
|
||||
Detail string `json:"detail"` // 商品详情
|
||||
Cat1Code string `json:"cat1Code"` // 一级目录id
|
||||
Cat2Code string `json:"cat2Code"` // 二级目录id
|
||||
Cat3Code string `json:"cat3Code"` // 三级目录id
|
||||
Cat1Name string `json:"cat1Name"` // 一级目录名称
|
||||
Cat2Name string `json:"cat2Name"` // 二级目录名称
|
||||
Cat3Name string `json:"cat3Name"` // 三级目录名称
|
||||
SpecProperty []*SpecPropertyList `json:"specProperty"` // 商品支持的规格,最多支持5个。
|
||||
SkuSaleList []*SkuSaleList `json:"skuSaleList"` // 不同规格组合是一个sku,示例:颜色:红
|
||||
}
|
||||
|
||||
// 商品规格
|
||||
type SpecPropertyList struct {
|
||||
SpecCode string `json:"specCode"` // 规格id
|
||||
SpecName string `json:"specName"` // 规格名称(颜色)
|
||||
SpecValues []*SpecValues
|
||||
}
|
||||
|
||||
// sku
|
||||
type SkuSaleList struct {
|
||||
SkuCode string `json:"skuCode"` // 颜色名称(红色)
|
||||
Specification string `json:"specification"` // 颜色名称(红色)
|
||||
MarketPrice float64 `json:"marketPrice"` // 颜色名称(红色)
|
||||
ThirdSkuCode string `json:"thirdSkuCode"` // 颜色名称(红色)
|
||||
|
||||
}
|
||||
|
||||
//#endregion
|
||||
|
||||
//#region 商户创建商品
|
||||
|
||||
type CreateGoodsListToStore struct {
|
||||
GoodsName string `json:"goodsName"` // 商品名称[必填]
|
||||
MainPictureURL string `json:"mainPictureUrl"` // 商品主图[必填] 格式:png,jpeg大小:3 兆以下,宽高强制比例3:4 像素750px
|
||||
Detail string `json:"detail"` // 详情[必填]
|
||||
Cat3Code string `json:"cat3Code"` // 三级类目[必填]
|
||||
SpecProperty []*SpecProperty `json:"specProperty"` // 规格集合[必填]
|
||||
SkuSaleList []*SkuSaleListData `json:"skuSaleList"` // sku 售卖组[必填]
|
||||
GoodsType string `json:"goodsType"` // 商品类型[必填]
|
||||
|
||||
OtherPictureURL []string `json:"otherPictureUrl"` // 商品其他图【最多四张】
|
||||
VideoURL string `json:"videoUrl"` // 格式mp4, 大小:20兆以下,时长30秒以下。
|
||||
SpecCode string `json:"specCode"` // 规格
|
||||
SpecName string `json:"specName"` // 规格名称
|
||||
SpecValues string `json:"specValues"` // 规格值集合
|
||||
SpecValueCode string `json:"specValueCode"` // 规格值 ID
|
||||
SpecValueName string `json:"specValueName"` // 规格值
|
||||
Specification string `json:"specification"` // 规格id集合逗号间隔
|
||||
MarketPrice float64 `json:"marketPrice"` // 参考价
|
||||
ThirdSkuCode string `json:"thirdSkuCode"` // 第三方业务编码
|
||||
}
|
||||
|
||||
type SpecValues struct {
|
||||
SpecValueCode string `json:"specValueCode"` // 规格code
|
||||
SpecValueName string `json:"specValueName"` // 规格值
|
||||
}
|
||||
|
||||
type SpecProperty struct {
|
||||
SpecCode string `json:"specCode"` // 规格
|
||||
SpecName string `json:"specName"` // 规格名称
|
||||
SpecValues []*SpecValues `json:"specValues"` // 规格值集合
|
||||
}
|
||||
|
||||
type SkuSaleListData struct {
|
||||
Specification string `json:"specification"` // 规格id集合, 逗号间隔
|
||||
MarketPrice float64 `json:"marketPrice"` // 参考价
|
||||
ThirdSkuCode string `json:"thirdSkuCode"` // 第三方业务
|
||||
}
|
||||
|
||||
//#endregion
|
||||
|
||||
//#region 批量查询门店商品
|
||||
|
||||
// 批量查询门店商品请求参数
|
||||
type QueryGoodsListForStoreReq struct {
|
||||
storeCode string `json:"storeCode"` // 平台店铺编码 [必填]
|
||||
Page
|
||||
shelveStatus string `json:"shelveStatus"` // 可过滤商品上架状态枚举值;不传递返回全部
|
||||
Cat1Code string `json:"cat1Code"` // 一级目录id
|
||||
Cat2Code string `json:"cat2Code"` // 二级目录id
|
||||
Cat3Code string `json:"cat3Code"` // 三级目录id
|
||||
}
|
||||
|
||||
// 批量查询门店商品请求参数 返回参数
|
||||
type QueryGoodsListForStoreRes struct {
|
||||
SystemParameterRes
|
||||
Data *QueryGoodsListForStoreDataRes
|
||||
}
|
||||
|
||||
type QueryGoodsListForStoreDataRes struct {
|
||||
SystemRecordDataDetailRes
|
||||
Records []*QueryGoodsListForStoreRecordRes
|
||||
}
|
||||
|
||||
type QueryGoodsListForStoreRecordRes struct {
|
||||
SkuCode string `json:"skuCode"`
|
||||
SpuCode string `json:"spuCode"`
|
||||
ThirdSkuCode string `json:"thirdSkuCode"`
|
||||
GoodsName string `json:"goodsName"`
|
||||
Alias string `json:"alias"`
|
||||
SalePrice float64 `json:"salePrice"`
|
||||
MarketPrice float64 `json:"marketPrice"`
|
||||
GoodsType string `json:"goodsType"`
|
||||
ShelveStatus string `json:"shelveStatus"`
|
||||
ShelveDate string `json:"shelveDate"`
|
||||
UnshelveDate string `json:"unshelveDate"`
|
||||
StockNum int `json:"stockNum"`
|
||||
}
|
||||
|
||||
//#endregion
|
||||
|
||||
//#region 查询单个门店
|
||||
|
||||
type QueryStoreOneGoodsRes struct {
|
||||
SystemParameterRes
|
||||
Data *QueryStoreOneGoodsDataRes
|
||||
}
|
||||
|
||||
type QueryStoreOneGoodsDataRes struct {
|
||||
SystemRecordDataDetailRes
|
||||
Records *QueryStoreOneGoodsRecordRes
|
||||
}
|
||||
|
||||
type QueryStoreOneGoodsRecordRes struct {
|
||||
SkuCode string `json:"skuCode"` // 平台 sku 编码
|
||||
SpuCode string `json:"spuCode"` // 平台 spu 编码,乐活秀
|
||||
ThirdSkuCode string `json:"thirdSkuCode"` // 第三方平台sku 编码
|
||||
GoodsName string `json:"goodsName"` // 商品名称
|
||||
Alias string `json:"alias"` // 商品别名或简称
|
||||
SalePrice float64 `json:"salePrice"` // 商品售价
|
||||
MarketPrice float64 `json:"marketPrice"` // 参考价
|
||||
GoodsType string `json:"goodsType"` // 商品类型
|
||||
FullCatName string `json:"fullCatName"` // 商品所属分类
|
||||
ShelveDate time.Time `json:"shelveDate"` // 上架时间
|
||||
UnshelveDate time.Time `json:"unshelveDate"` // 下架时间
|
||||
StockNum int `json:"stockNum"` // 库存数量
|
||||
ShelveStatus string `json:"shelveStatus"` // 商品上下架状态
|
||||
Isshow int `json:"isshow"` // c端隐藏或显示
|
||||
DeliverType string `json:"deliverType"` // 配送方式
|
||||
DeliverTemplateCode string `json:"deliverTemplateCode"` // 运费模板
|
||||
CategoryCodes string `json:"categoryCodes"` // 分类id
|
||||
CategoryNames string `json:"categoryNames"` // 分类名称
|
||||
MainPictureURL string `json:"mainPictureUrl"` // 商品主图
|
||||
OtherPictureURL []string `json:"otherPictureUrl"` // 商品其他图
|
||||
Specification []string `json:"specification"` // 商品规格属性
|
||||
FullSpecName string `json:"fullSpecName"` // 商品规格名称
|
||||
VideoUrls string `json:"videoUrls"` // 商品视频
|
||||
Detail string `json:"detail"` // 商品详情
|
||||
}
|
||||
|
||||
//#endregion
|
||||
|
||||
//#region 平台商品上下架
|
||||
|
||||
type ShelfGoodsForStoreReq struct {
|
||||
StoreCode string `json:"storeCode"` // 平台店铺编码[必填]
|
||||
SkuCode []string `json:"SkuCode"` // 平台 sku编码[必填]
|
||||
ShelveStatus string `json:"SkuCode"` // 商品上架状态[必填]
|
||||
}
|
||||
|
||||
//#endregion
|
||||
|
||||
//#region 平台商品价格修改
|
||||
|
||||
type StoreGoodsPriceUpdateReq struct {
|
||||
StoreCode string `json:"storeCode"` // 平台店铺编码[必填]
|
||||
SkuCode string `json:"SkuCode"` // 平台 sku编码[必填]
|
||||
SalePrice float64 `json:"salePrice"` // 品商上品架售状价,枚两举位值小数,示例:2.51元[必填]
|
||||
}
|
||||
|
||||
//#endregion
|
||||
|
||||
//#region 平台商品库存修改
|
||||
|
||||
type StoreGoodsStockUpdateReq struct {
|
||||
StoreCode string `json:"storeCode"` // 平台店铺编码[必填]
|
||||
ItemStocks []*StoreSkuNum
|
||||
}
|
||||
type StoreSkuNum struct {
|
||||
SkuCode string `json:"skuCode"` // 平台店铺编码
|
||||
StockNum int64 `json:"stockNum"` // 库存数量
|
||||
}
|
||||
|
||||
//#endregion
|
||||
|
||||
//#region 新增平台商品
|
||||
|
||||
type CreateGoodsForStoreReq struct {
|
||||
StoreCode string `json:"storeCode"` // 平台店铺编码[必填]
|
||||
SkuCode string `json:"SkuCode"` // 平台 sku编码[必填]
|
||||
SalePrice float64 `json:"salePrice"` // 品商上品架售状价,枚两举位值小数,示例:2.51元[必填]
|
||||
DeliverType string `json:"deliverType"` // 配送方式[必填]
|
||||
DeliverTemplateCode string `json:"deliverTemplateCode"` // 运费模板 运费模板信息id,调用查询接口
|
||||
}
|
||||
|
||||
//#endregion
|
||||
Reference in New Issue
Block a user