|
|
|
@ -78,21 +78,60 @@ type ArgsGoodsInfo struct {
|
|
|
|
|
SkuId uint
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//type ReplyGoodsInfo struct {
|
|
|
|
|
// Id uint
|
|
|
|
|
// Name string
|
|
|
|
|
// GoodsNum string
|
|
|
|
|
// BrandId uint
|
|
|
|
|
// BrandName string
|
|
|
|
|
// CategoryId uint
|
|
|
|
|
//}
|
|
|
|
|
|
|
|
|
|
type ReplyGoodsInfo struct {
|
|
|
|
|
Id uint
|
|
|
|
|
Name string
|
|
|
|
|
GoodsNum string
|
|
|
|
|
BrandId uint
|
|
|
|
|
BrandName string
|
|
|
|
|
CategoryId uint
|
|
|
|
|
Id uint `json:"id"`
|
|
|
|
|
Name string `json:"name"`
|
|
|
|
|
SupplierId uint `json:"supplierId"`
|
|
|
|
|
CategoryId uint `json:"categoryId"`
|
|
|
|
|
BrandId uint `json:"brandId"`
|
|
|
|
|
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 商品详情
|
|
|
|
|
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)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
err = xClient.Call(ctx, "Info", skuId, &reply)
|
|
|
|
|
err = xClient.Call(ctx, "Info", goodsId, &reply)
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|