From 591981f65b37643c207eff64c783b538651b5d69 Mon Sep 17 00:00:00 2001 From: kanade Date: Wed, 26 Jul 2023 17:34:32 +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 --- customer/user/rale.go | 103 ++++++++++++++++++++++++++++++++++++++++++ customer/user/user.go | 1 + 2 files changed, 104 insertions(+) create mode 100644 customer/user/rale.go diff --git a/customer/user/rale.go b/customer/user/rale.go new file mode 100644 index 0000000..5ebd5be --- /dev/null +++ b/customer/user/rale.go @@ -0,0 +1,103 @@ +package user + +import ( + "context" + "git.oa00.com/supply-chain/service/client" + "git.oa00.com/supply-chain/service/lib/bean" +) + +type real struct { +} + +type ArgsUserRealLists struct { + Search UserRealSearch + Page bean.Page +} + +type UserRealSearch struct { + UserName string + ApplyUserName string + AuditStatus uint // 状态 1=待审核 2=审核通过 3=审核驳回 +} + +type ReplyUserRealLists struct { + Lists []UserRealItem + Total int64 +} + +type UserRealItem struct { + Id uint `json:"id"` + UserName string `json:"userName"` + 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 (r *real) List(ctx context.Context, args ArgsUserRealLists) (reply ReplyUserRealLists, err error) { + xClient, err := client.GetClient(r) + if err != nil { + return ReplyUserRealLists{}, err + } + err = xClient.Call(ctx, "List", args, &reply) + return +} + +type ReplyUserRealInfo struct { + Id uint `json:"id"` + UserName string `json:"userName"` + 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 (r *real) Info(ctx context.Context, RealId uint) (reply ReplyUserRealInfo, err error) { + xClient, err := client.GetClient(r) + if err != nil { + return ReplyUserRealInfo{}, err + } + err = xClient.Call(ctx, "Info", RealId, &reply) + return +} + +type ArgsUserRealAdopt struct { + RealId uint + AuditUserId uint // 审核人Id +} + +// Adopt @Title 审核通过 +func (r *real) Adopt(ctx context.Context, args ArgsUserRealAdopt) error { + xClient, err := client.GetClient(r) + if err != nil { + return err + } + reply := 0 + return xClient.Call(ctx, "Adopt", args, &reply) +} + +type ArgsUserRealReject struct { + RealId uint + AuditUserId uint // 审核人Id + Reason string // 驳回原因 +} + +// Reject @Title 审核驳回 +func (r *real) Reject(ctx context.Context, args ArgsUserRealReject) error { + xClient, err := client.GetClient(r) + if err != nil { + return err + } + reply := 0 + return xClient.Call(ctx, "Reject", args, &reply) +} diff --git a/customer/user/user.go b/customer/user/user.go index 07fff2d..ab5bbe1 100644 --- a/customer/user/user.go +++ b/customer/user/user.go @@ -7,4 +7,5 @@ type User struct { Cash cash // 余额提现 Message message // 消息 WalletHistory walletHistory // 消费记录 + Real real // 实名认证 }