From 27e2c299ec658a1352728f397a61993990035c4e Mon Sep 17 00:00:00 2001 From: sian Date: Fri, 29 Jul 2022 09:29:15 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jd/brand.go | 11 +++++++++++ jd/sku.go | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/jd/brand.go b/jd/brand.go index ea7bf24..64f607f 100644 --- a/jd/brand.go +++ b/jd/brand.go @@ -39,3 +39,14 @@ func (b *brand) Edit(ctx context.Context, args ArgsBrandEdit) error { reply := 0 return client.GetClient(b).Call(ctx, "Edit", args, &reply) } + +type ArgsImport struct { + Name string // 品牌名称 + SupplyBrandId uint // 匹配的品牌Id + SupplyBrandName string // 匹配的品牌名称 +} + +func (b *brand) Import(ctx context.Context, args []ArgsImport) error { + reply := 0 + return client.GetClient(b).Call(ctx, "Import", args, &reply) +} diff --git a/jd/sku.go b/jd/sku.go index 2a1550f..3a85cd2 100644 --- a/jd/sku.go +++ b/jd/sku.go @@ -94,7 +94,7 @@ type SkuImg struct { } // GetImgs @Title 获取预览图 -func (s *sku) GetImgs(ctx context.Context, skuId uint) (reply []SkuImg, err error) { +func (s *sku) GetImgs(ctx context.Context, skuId uint) (reply SkuImg, err error) { err = client.GetClient(s).Call(ctx, "GetImgs", skuId, &reply) return } From 87ccb6c84077e68227b84e5308408368261f02aa Mon Sep 17 00:00:00 2001 From: sian Date: Fri, 29 Jul 2022 09:38:28 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jd/brand.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/jd/brand.go b/jd/brand.go index 64f607f..1ae1ad7 100644 --- a/jd/brand.go +++ b/jd/brand.go @@ -41,9 +41,8 @@ func (b *brand) Edit(ctx context.Context, args ArgsBrandEdit) error { } type ArgsImport struct { - Name string // 品牌名称 - SupplyBrandId uint // 匹配的品牌Id - SupplyBrandName string // 匹配的品牌名称 + Name string // 品牌名称 + SupplyBrandId uint // 匹配的品牌Id } func (b *brand) Import(ctx context.Context, args []ArgsImport) error { From c65751bb443d07ea6d5d098947dbbde1f8e699b5 Mon Sep 17 00:00:00 2001 From: sian Date: Fri, 29 Jul 2022 11:35:28 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jd/brand.go | 1 + 1 file changed, 1 insertion(+) diff --git a/jd/brand.go b/jd/brand.go index 1ae1ad7..f8366f1 100644 --- a/jd/brand.go +++ b/jd/brand.go @@ -9,6 +9,7 @@ import ( type brand struct { } type ArgsBrandList struct { + Name string Page bean.Page } From 62f9938c962cf9c3ff8970f503f1fdd10a148328 Mon Sep 17 00:00:00 2001 From: sian Date: Fri, 29 Jul 2022 13:49:41 +0800 Subject: [PATCH 4/6] bug fix --- jd/sku.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jd/sku.go b/jd/sku.go index 3a85cd2..bc34def 100644 --- a/jd/sku.go +++ b/jd/sku.go @@ -148,7 +148,7 @@ type AdoptItem struct { } // Adopt @Title 入库 -func (s *sku) Adopt(ctx context.Context, skuIds []uint) (err error) { - reply := 0 - return client.GetClient(s).Call(ctx, "Adopt", skuIds, &reply) +func (s *sku) Adopt(ctx context.Context, skuIds []uint) (reply []AdoptItem, err error) { + err = client.GetClient(s).Call(ctx, "Adopt", skuIds, &reply) + return } From 264495960b268a9dda0504419773eaf3de57f6ee Mon Sep 17 00:00:00 2001 From: sian Date: Fri, 29 Jul 2022 14:48:58 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jd/category.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/jd/category.go b/jd/category.go index b505293..8b0fd20 100644 --- a/jd/category.go +++ b/jd/category.go @@ -9,7 +9,8 @@ import ( type category struct { } type ArgsCategoryList struct { - Page bean.Page + ThirdCategoryId uint + Page bean.Page } type CategoryItem struct { From 47da9f1ce094eb2da1ddf3dd46f8e4adce56ab2c Mon Sep 17 00:00:00 2001 From: sian Date: Fri, 29 Jul 2022 15:55:49 +0800 Subject: [PATCH 6/6] bug fix --- jd/sku.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jd/sku.go b/jd/sku.go index bc34def..4b6776d 100644 --- a/jd/sku.go +++ b/jd/sku.go @@ -94,7 +94,7 @@ type SkuImg struct { } // GetImgs @Title 获取预览图 -func (s *sku) GetImgs(ctx context.Context, skuId uint) (reply SkuImg, err error) { +func (s *sku) GetImgs(ctx context.Context, skuId uint) (reply []SkuImg, err error) { err = client.GetClient(s).Call(ctx, "GetImgs", skuId, &reply) return }