|
|
@ -78,21 +78,60 @@ type ArgsGoodsInfo struct {
|
|
|
|
SkuId uint
|
|
|
|
SkuId uint
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//type ReplyGoodsInfo struct {
|
|
|
|
|
|
|
|
// Id uint
|
|
|
|
|
|
|
|
// Name string
|
|
|
|
|
|
|
|
// GoodsNum string
|
|
|
|
|
|
|
|
// BrandId uint
|
|
|
|
|
|
|
|
// BrandName string
|
|
|
|
|
|
|
|
// CategoryId uint
|
|
|
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
|
|
type ReplyGoodsInfo struct {
|
|
|
|
type ReplyGoodsInfo struct {
|
|
|
|
Id uint
|
|
|
|
Id uint `json:"id"`
|
|
|
|
Name string
|
|
|
|
Name string `json:"name"`
|
|
|
|
GoodsNum string
|
|
|
|
SupplierId uint `json:"supplierId"`
|
|
|
|
BrandId uint
|
|
|
|
CategoryId uint `json:"categoryId"`
|
|
|
|
BrandName string
|
|
|
|
BrandId uint `json:"brandId"`
|
|
|
|
CategoryId uint
|
|
|
|
Imgs []string `json:"imgs"`
|
|
|
|
|
|
|
|
Content string `json:"content"`
|
|
|
|
|
|
|
|
Attributes []GoodsAttributeGroup `json:"attributes"`
|
|
|
|
|
|
|
|
Skus []SkuItem `json:"skus"`
|
|
|
|
|
|
|
|
Status uint `json:"status"`
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
type GoodsAttributeGroup struct {
|
|
|
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
|
|
|
Item []GoodsAttributeItem `json:"item"`
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
type GoodsAttributeItem struct {
|
|
|
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
|
|
|
Value string `json:"value"`
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
type SkuSpecItem struct {
|
|
|
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
|
|
|
Value string `json:"value"`
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
type SkuItem struct {
|
|
|
|
|
|
|
|
Color string `json:"color"`
|
|
|
|
|
|
|
|
Size string `json:"size"`
|
|
|
|
|
|
|
|
SupplyPrice decimal.Decimal `json:"supplyPrice"`
|
|
|
|
|
|
|
|
MarketPrice decimal.Decimal `json:"marketPrice"`
|
|
|
|
|
|
|
|
UpcCode string `json:"upcCode"`
|
|
|
|
|
|
|
|
UintId uint `json:"uintId"`
|
|
|
|
|
|
|
|
TaxCategoryId uint `json:"taxCategoryId"`
|
|
|
|
|
|
|
|
Tax decimal.Decimal `json:"tax"`
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Info @Title 商品详情
|
|
|
|
// Info @Title 商品详情
|
|
|
|
func (g *goods) Info(ctx context.Context, skuId uint) (reply uint, err error) {
|
|
|
|
func (g *goods) Info(ctx context.Context, goodsId uint) (reply ReplyGoodsInfo, err error) {
|
|
|
|
xClient, err := client.GetClient(g)
|
|
|
|
xClient, err := client.GetClient(g)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
err = xClient.Call(ctx, "Info", skuId, &reply)
|
|
|
|
err = xClient.Call(ctx, "Info", goodsId, &reply)
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|