- 在自定义结构体中新增联系人字段,用于存储多个联系人信息 - 将FactoryCustomItem重命名为CustomItem,统一命名规范 - 修改产品保存参数类型ArgsProductSave为ProductSaveItem - 调整产品保存接口实现,支持批量保存产品数据 - 更新产品保存方法签名,返回实体列表而非单个实体
26 lines
481 B
Go
26 lines
481 B
Go
package ik3cloud
|
|
|
|
import (
|
|
"context"
|
|
|
|
"git.kumo.work/shama/service/client"
|
|
)
|
|
|
|
type product struct {
|
|
}
|
|
type ProductSaveItem struct {
|
|
ProductId int64 // 付款单id
|
|
Number string // 编码
|
|
Name string // 名称
|
|
}
|
|
|
|
// Save @TITLE 保存客户
|
|
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, &entities)
|
|
return
|
|
}
|