From 6fed756fab32bf2c3b6148e92b1c1ce4af0d1cbd Mon Sep 17 00:00:00 2001 From: kanade Date: Wed, 26 Jul 2023 16:44:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E5=90=8D=E8=AE=A4=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- supplier/supplier.go | 1 + supplier/supplierReal.go | 105 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 106 insertions(+) create mode 100644 supplier/supplierReal.go diff --git a/supplier/supplier.go b/supplier/supplier.go index eef4c28..f3b4cfa 100644 --- a/supplier/supplier.go +++ b/supplier/supplier.go @@ -20,6 +20,7 @@ type Supplier struct { AfsAudit afsAudit BatchGoods batch.Goods Enterprise enterprise + Real supplierReal } type supplier struct { diff --git a/supplier/supplierReal.go b/supplier/supplierReal.go new file mode 100644 index 0000000..ac1f5a1 --- /dev/null +++ b/supplier/supplierReal.go @@ -0,0 +1,105 @@ +package supplier + +import ( + "context" + "git.oa00.com/supply-chain/service/client" + "git.oa00.com/supply-chain/service/lib/bean" +) + +type supplierReal struct { +} + +type ArgsSupplierRealLists struct { + Search SupplierRealSearch + Page bean.Page +} + +type SupplierRealSearch struct { + SupplierName string + ApplyUserName string + AuditStatus uint // 状态 1=待审核 2=审核通过 3=审核驳回 +} + +type ReplySupplierRealLists struct { + Lists []SupplierRealItem + Total int64 +} + +type SupplierRealItem struct { + Id uint `json:"id"` + SupplierName string `json:"supplierName"` + ApplyUserName string `json:"applyUserName"` + Name string `json:"name"` + Code string `json:"code"` + CardImg string `json:"cardImg"` + AuditStatus uint `json:"auditStatus"` + AuditUserId uint `json:"auditUserId"` + AuditAt int64 `json:"auditAt"` + Reason string `json:"reason"` + CreatedAt int64 `json:"createdAt"` +} + +// List @Title 实名认证列表 +func (s *supplierReal) List(ctx context.Context, args ArgsSupplierRealLists) (reply ReplySupplierRealLists, err error) { + xClient, err := client.GetClient(s) + if err != nil { + return ReplySupplierRealLists{}, err + } + err = xClient.Call(ctx, "List", args, &reply) + return +} + +type ReplySupplierRealInfo struct { + Id uint `json:"id"` + SupplierName string `json:"supplierName"` + ApplyUserName string `json:"applyUserName"` + Name string `json:"name"` + Code string `json:"code"` + CardImg string `json:"cardImg"` + AuditStatus uint `json:"auditStatus"` + AuditUserId uint `json:"auditUserId"` + AuditAt int64 `json:"auditAt"` + Reason string `json:"reason"` + CreatedAt int64 `json:"createdAt"` +} + +// Info @Title 审核详情 +func (s *supplierReal) Info(ctx context.Context, RealId uint) (reply ReplySupplierRealInfo, err error) { + xClient, err := client.GetClient(s) + if err != nil { + return ReplySupplierRealInfo{}, err + } + err = xClient.Call(ctx, "Info", RealId, &reply) + return +} + +type ArgsSupplierRealAdopt struct { + RealId uint + AuditUserId uint // 审核人Id +} + +// Adopt @Title 审核通过 +func (s *supplierReal) Adopt(ctx context.Context, args ArgsSupplierRealAdopt) error { + xClient, err := client.GetClient(s) + if err != nil { + return err + } + reply := 0 + return xClient.Call(ctx, "Adopt", args, &reply) +} + +type ArgsSupplierRealReject struct { + RealId uint + AuditUserId uint // 审核人Id + Reason string // 驳回原因 +} + +// Reject @Title 审核驳回 +func (s *supplierReal) Reject(ctx context.Context, args ArgsSupplierRealReject) error { + xClient, err := client.GetClient(s) + if err != nil { + return err + } + reply := 0 + return xClient.Call(ctx, "Reject", args, &reply) +}