diff --git a/supplier/goods/goods.go b/supplier/goods.go similarity index 90% rename from supplier/goods/goods.go rename to supplier/goods.go index 5c96844..49bcc0e 100644 --- a/supplier/goods/goods.go +++ b/supplier/goods.go @@ -1,4 +1,4 @@ -package goods +package supplier import ( "context" @@ -13,7 +13,7 @@ const ( SkuStatusReject = 3 // 废弃商品 ) -type Goods struct { +type goods struct { } type GoodsSearch struct { Name string // 商品名称 @@ -32,9 +32,8 @@ type GoodsItem struct { Img string `json:"img"` GoodsNum string `json:"goodsNum"` CategoryId uint `json:"categoryId"` - Category string `json:"category"` BrandId uint `json:"brandId"` - Brand string `json:"brand"` + BrandName string `json:"brandName"` GoodsSpecs []GoodsSpecificationItem `json:"goodsSpecs"` SkuItems []GoodsItemLists `json:"skuItems"` StockCount uint `json:"stockCount"` @@ -67,7 +66,7 @@ type ReplyGoodsLists struct { } // Lists @Title 获取商品列表 -func (s *Goods) Lists(ctx context.Context, args ArgsGoodsList) (reply ReplyGoodsLists, err error) { +func (s *goods) Lists(ctx context.Context, args ArgsGoodsList) (reply ReplyGoodsLists, err error) { xClient, err := client.GetClient(s) if err != nil { return diff --git a/supplier/supplier.go b/supplier/supplier.go index 668ec73..b4e134b 100644 --- a/supplier/supplier.go +++ b/supplier/supplier.go @@ -1,7 +1,5 @@ package supplier -import "git.oa00.com/supply-chain/service/supplier/goods" - type Supplier struct { - Goods goods.Goods + Goods goods }