From 59be592ae6d427a456146b217c35683ba728f8b0 Mon Sep 17 00:00:00 2001 From: sian Date: Fri, 3 Feb 2023 09:24:19 +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 --- supply/category.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/supply/category.go b/supply/category.go index 0795cfc..95b4416 100644 --- a/supply/category.go +++ b/supply/category.go @@ -40,6 +40,21 @@ func (c *category) Add(ctx context.Context, args ArgsCategoryAdd) (err error) { return xClient.Call(ctx, "Add", args, &reply) } +type ReplyCategoryAddError struct { + CategoryName string + ErrMsg string +} + +// Adds @Title 添加分类 +func (c *category) Adds(ctx context.Context, args []ArgsCategoryAdd) (reply []ReplyCategoryAddError, err error) { + xClient, err := client.GetClient(c) + if err != nil { + return + } + err = xClient.Call(ctx, "Adds", args, &reply) + return +} + type ArgsCategoryEdit struct { CategoryId uint // 分类id Name string // 分类名称