From 81c9e9fb4429aaf7808a3398b50a1f0bf387e328 Mon Sep 17 00:00:00 2001 From: sian Date: Mon, 29 Aug 2022 18:36:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supplier/{goods => }/goods.go | 9 ++++----- supplier/supplier.go | 4 +--- 2 files changed, 5 insertions(+), 8 deletions(-) rename supplier/{goods => }/goods.go (90%) 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 }