From 337065d09402f35ccbe2a812896f378d0b7e68cd Mon Sep 17 00:00:00 2001 From: kanade Date: Thu, 24 Oct 2024 14:00:46 +0800 Subject: [PATCH] =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- erp/product.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/erp/product.go b/erp/product.go index d5e4c8c..987544e 100644 --- a/erp/product.go +++ b/erp/product.go @@ -261,3 +261,19 @@ func (p *product) Delete(ctx context.Context, productIds []int64) (err error) { reply := 0 return xClient.Call(ctx, "Delete", productIds, &reply) } + +type ArgsProductClone struct { + StaffId int64 // 员工id + DepartmentId int64 // 部门id + ProductId int64 // 产品ID +} + +// Clone @TITLE 复制产品 +func (p *product) Clone(ctx context.Context, args ArgsProductClone) (newProductId int64, err error) { + xClient, err := client.GetClient(p) + if err != nil { + return + } + err = xClient.Call(ctx, "Clone", args, &newProductId) + return +}