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) +}