From 5874450cf7abb5c1d15634f06726dc8001aeb00d Mon Sep 17 00:00:00 2001 From: sian Date: Thu, 1 Sep 2022 17:39:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BE=9B=E5=BA=94=E5=95=86?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supplier/supplier.go | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/supplier/supplier.go b/supplier/supplier.go index 3898ff8..0a7bd0d 100644 --- a/supplier/supplier.go +++ b/supplier/supplier.go @@ -91,3 +91,43 @@ func (s *supplier) Disabled(ctx context.Context, supplierId uint) error { reply := 0 return xClient.Call(ctx, "Disabled", supplierId, &reply) } + +type ReplySupplierInfo struct { + SupplierId uint + SupplierName string // 供应商名称 + Account string // 账户名 + PayType uint // 结算方式 + Liaison string // 联系人 + Phone string // 手机号 + Annex string // 附件 +} + +// Info @Title 供应商详情 +func (s *supplier) Info(ctx context.Context, supplierId uint) (reply ReplySupplierInfo, err error) { + xClient, err := client.GetClient(s) + if err != nil { + return ReplySupplierInfo{}, err + } + err = xClient.Call(ctx, "Info", supplierId, &reply) + return +} + +type ArgsSupplierEdit struct { + SupplierId uint + SupplierName string // 供应商名称 + Password string // 密码 + PayType uint // 结算方式 + Liaison string // 联系然 + Phone string // 手机号 + Annex string // 附件 +} + +// Edit @Title 供应商详情 +func (s *supplier) Edit(ctx context.Context, args ArgsSupplierEdit) error { + xClient, err := client.GetClient(s) + if err != nil { + return err + } + reply := 0 + return xClient.Call(ctx, "Edit", args, &reply) +}