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.
71 lines
2.0 KiB
71 lines
2.0 KiB
2 years ago
|
package user
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
"git.oa00.com/supply-chain/service/client"
|
||
|
"git.oa00.com/supply-chain/service/lib/bean"
|
||
|
"github.com/shopspring/decimal"
|
||
|
)
|
||
|
|
||
|
type depositAudit struct {
|
||
|
}
|
||
|
|
||
|
type ArgsDepositAuditLists struct {
|
||
|
Search DepositAuditSearch
|
||
|
Page bean.Page
|
||
|
}
|
||
|
|
||
|
type DepositAuditSearch struct {
|
||
|
Status uint // 审核状态 1=待审核 2=通过 3=驳回
|
||
|
Name string // 客户名称
|
||
|
Amount decimal.Decimal // 充值金额
|
||
|
ApplyDateStart string // 申请日期
|
||
|
ApplyDateEnd string // 申请日期
|
||
|
AuditDateStart string // 审核日期
|
||
|
AuditDateEnd string // 审核日期
|
||
|
}
|
||
|
type ReplyDepositAuditList struct {
|
||
|
Lists []DepositAuditItem `json:"lists"`
|
||
|
Total int64 `json:"total"`
|
||
|
}
|
||
|
type DepositAuditItem struct {
|
||
|
Id uint `json:"id"`
|
||
|
UserId uint `json:"userId"`
|
||
|
UserName string `json:"userName"`
|
||
|
Amount decimal.Decimal `json:"amount"`
|
||
|
ApplyType uint `json:"applyType"`
|
||
|
ApplyUserId uint `json:"applyUserId"`
|
||
|
ApplyAt int64 `json:"applyAt"`
|
||
|
AuditStatus uint `json:"auditStatus"`
|
||
|
}
|
||
|
|
||
|
// Lists @Title 充值审核列表
|
||
|
func (d *depositAudit) Lists(ctx context.Context, args ArgsDepositAuditLists) (reply ReplyDepositAuditList, err error) {
|
||
|
err = client.GetClient(d).Call(ctx, "Lists", args, &reply)
|
||
|
return
|
||
|
}
|
||
|
|
||
|
type ArgsDepositAuditAdopt struct {
|
||
|
DepositId uint // 充值记录id
|
||
|
AuditUserId uint // 审核人id
|
||
|
}
|
||
|
|
||
|
// Adopt @Title 通过
|
||
|
func (d *depositAudit) Adopt(ctx context.Context, args ArgsDepositAuditAdopt) error {
|
||
|
reply := 0
|
||
|
return client.GetClient(d).Call(ctx, "Adopt", args, &reply)
|
||
|
|
||
|
}
|
||
|
|
||
|
type ArgsDepositAuditReject struct {
|
||
|
DepositId uint // 充值记录id
|
||
|
AuditUserId uint // 审核人id
|
||
|
Reason string // 驳回原因
|
||
|
}
|
||
|
|
||
|
// Reject @Title 驳回
|
||
|
func (d *depositAudit) Reject(ctx context.Context, args ArgsDepositAuditReject) error {
|
||
|
reply := 0
|
||
|
return client.GetClient(d).Call(ctx, "Reject", args, &reply)
|
||
|
}
|