实名认证

detached
杨赟 1 year ago
parent 6fed756fab
commit 591981f65b

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

@ -7,4 +7,5 @@ type User struct {
Cash cash // 余额提现 Cash cash // 余额提现
Message message // 消息 Message message // 消息
WalletHistory walletHistory // 消费记录 WalletHistory walletHistory // 消费记录
Real real // 实名认证
} }

Loading…
Cancel
Save