diff --git a/supplier/supplier.go b/supplier/supplier.go index b4e134b..af8a165 100644 --- a/supplier/supplier.go +++ b/supplier/supplier.go @@ -1,5 +1,31 @@ package supplier +import ( + "context" + "git.oa00.com/supply-chain/service/client" +) + type Supplier struct { Goods goods } + +type ArgsSupplierAdd struct { + SupplierName string // 供应商名称 + Account string // 账户 + Password string // 密码 + PayType uint // 结算类型 + Liaison string // 联系人 + Phone string // 手机号 + Annex string // 附件 + ApplyUserId uint // 申请人Id +} + +// Add @Title 添加供应商 +func (s *Supplier) Add(ctx context.Context, args ArgsSupplierAdd) error { + xClient, err := client.GetClient(s) + if err != nil { + return err + } + reply := 0 + return xClient.Call(ctx, "Add", args, &reply) +} diff --git a/supplier/user/supplier.go b/supplier/user/supplier.go deleted file mode 100644 index e010f7c..0000000 --- a/supplier/user/supplier.go +++ /dev/null @@ -1,18 +0,0 @@ -package user - -type supplier struct { -} - -type ArgsSupplierAdd struct { - Name string - Account string - Password string - PayType uint - Liaison string - Phone string - Annex string -} - -func (s *supplier) Add() { - -} diff --git a/supplier/user/user.go b/supplier/user/user.go deleted file mode 100644 index c2b7563..0000000 --- a/supplier/user/user.go +++ /dev/null @@ -1,13 +0,0 @@ -package user - -type User struct { - Supplier supplier -} - -type ArgsUserAdd struct { - Name string // 姓名 - Account string // 账户 - Password string // 密码 - Liaison string // 联系然 - Phone string // 手机号 -}