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