You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
service/customer/user/cash.go

78 lines
1.6 KiB

package user
import (
"git.oa00.com/supply-chain/service/client"
"git.oa00.com/supply-chain/service/lib/bean"
"golang.org/x/net/context"
)
type cash struct {
}
type ArgsCashLists struct {
Search CashSearch
Page bean.Page
}
type CashSearch struct {
Status uint // 状态 1=待审核 2=通过 3=驳回
UserId uint // 客户id
}
type CashItem struct {
Id uint
UserId uint // 客户id
UserName string // 客户名称
BkName string // 银行名称
BankCode string // 银行卡号
BankName string // 银行账户名
AuditUserId uint // 审核人
Status uint // 审核状态 1=待审核 2=通过 3=驳回
Reason string // 驳回原因
CreatedAt int64
}
type ReplyCashLists struct {
Lists []CashItem
Total int64
}
// Lists @Title 列表
func (cash *cash) Lists(ctx context.Context, args ArgsCashLists) (reply ReplyCashLists, err error) {
xClient, err := client.GetClient(cash)
if err != nil {
return
}
err = xClient.Call(ctx, "Lists", args, &reply)
return
}
type ArgsCashAdopt struct {
CashId uint // 提款id
}
// Adopt @Title 审核通过
func (cash *cash) Adopt(ctx context.Context, args ArgsCashAdopt) error {
xClient, err := client.GetClient(cash)
if err != nil {
return err
}
reply := 0
return xClient.Call(ctx, "Adopt", args, &reply)
}
type ArgsCashReject struct {
CashId uint // 提款id
Reason string
}
// Reject @Title 审核驳回
func (cash *cash) Reject(ctx context.Context, args ArgsCashReject) error {
xClient, err := client.GetClient(cash)
if err != nil {
return err
}
reply := 0
return xClient.Call(ctx, "Reject", args, &reply)
}