From 35dcf68f137cd9982876f3ca9a8fe95c757d9626 Mon Sep 17 00:00:00 2001 From: sian Date: Fri, 2 Sep 2022 09:56:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BE=9B=E5=BA=94=E5=95=86?= =?UTF-8?q?=E9=A2=84=E8=AD=A6=E9=85=8D=E7=BD=AE=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supplier/supplier.go | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/supplier/supplier.go b/supplier/supplier.go index 0a7bd0d..7ff3952 100644 --- a/supplier/supplier.go +++ b/supplier/supplier.go @@ -94,12 +94,14 @@ func (s *supplier) Disabled(ctx context.Context, supplierId uint) error { type ReplySupplierInfo struct { SupplierId uint - SupplierName string // 供应商名称 - Account string // 账户名 - PayType uint // 结算方式 - Liaison string // 联系人 - Phone string // 手机号 - Annex string // 附件 + SupplierName string // 供应商名称 + Account string // 账户名 + PayType uint // 结算方式 + Liaison string // 联系人 + Phone string // 手机号 + Annex string // 附件 + WarnStatus uint // 预警状态 + WarnValue decimal.Decimal // 预警值 } // Info @Title 供应商详情 @@ -131,3 +133,19 @@ func (s *supplier) Edit(ctx context.Context, args ArgsSupplierEdit) error { reply := 0 return xClient.Call(ctx, "Edit", args, &reply) } + +type ArgsSupplierUpdateWarn struct { + SupplierId uint + WarnStatus uint // 预警状态 1=开启 2=关闭 + Value decimal.Decimal // 预警值 +} + +// UpdateWarn @Title 开启预警 +func (s *supplier) UpdateWarn(ctx context.Context, args ArgsSupplierUpdateWarn) error { + xClient, err := client.GetClient(s) + if err != nil { + return err + } + reply := 0 + return xClient.Call(ctx, "UpdateWarn", args, &reply) +}