feat(k3cloud): 更新客户和产品数据结构以支持联系人信息
- 在自定义结构体中新增联系人字段,用于存储多个联系人信息 - 将FactoryCustomItem重命名为CustomItem,统一命名规范 - 修改产品保存参数类型ArgsProductSave为ProductSaveItem - 调整产品保存接口实现,支持批量保存产品数据 - 更新产品保存方法签名,返回实体列表而非单个实体
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user