From 89999b7df3fe28896eb98f88a147345f9573163c Mon Sep 17 00:00:00 2001 From: kanade Date: Fri, 5 Dec 2025 16:16:14 +0800 Subject: [PATCH] =?UTF-8?q?feat(k3cloud):=20=E6=9B=B4=E6=96=B0=E5=AE=A2?= =?UTF-8?q?=E6=88=B7=E5=92=8C=E4=BA=A7=E5=93=81=E6=95=B0=E6=8D=AE=E7=BB=93?= =?UTF-8?q?=E6=9E=84=E4=BB=A5=E6=94=AF=E6=8C=81=E8=81=94=E7=B3=BB=E4=BA=BA?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在自定义结构体中新增联系人字段,用于存储多个联系人信息 - 将FactoryCustomItem重命名为CustomItem,统一命名规范 - 修改产品保存参数类型ArgsProductSave为ProductSaveItem - 调整产品保存接口实现,支持批量保存产品数据 - 更新产品保存方法签名,返回实体列表而非单个实体 --- ik3cloud/custom.go | 3 ++- ik3cloud/product.go | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ik3cloud/custom.go b/ik3cloud/custom.go index 89b0ac0..977eaf5 100644 --- a/ik3cloud/custom.go +++ b/ik3cloud/custom.go @@ -18,9 +18,10 @@ type ArgsCustomSave struct { Website string // 网站 Tel string // 电话 Fax string // 传真 + Contacts []CustomItem } -type FactoryCustomItem struct { +type CustomItem struct { ContactNumber string // 联系人编号 Name string // 部门名称 Sex string // 性别 diff --git a/ik3cloud/product.go b/ik3cloud/product.go index effd1a8..27353c4 100644 --- a/ik3cloud/product.go +++ b/ik3cloud/product.go @@ -8,18 +8,18 @@ import ( type product struct { } -type ArgsProductSave struct { +type ProductSaveItem struct { ProductId int64 // 付款单id Number string // 编码 Name string // 名称 } // Save @TITLE 保存客户 -func (p *product) Save(ctx context.Context, args ArgsProductSave) (entity Entity, err error) { +func (p *product) Save(ctx context.Context, args []ProductSaveItem) (entities []Entity, err error) { xClient, err := client.GetClient(p) if err != nil { return } - err = xClient.Call(ctx, "Save", args, &entity) + err = xClient.Call(ctx, "Save", args, &entities) return }