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/service/audit.go

75 lines
1.8 KiB

package service
import (
"context"
"git.oa00.com/supply-chain/service/client"
audit2 "git.oa00.com/supply-chain/service/customer/service/audit"
"git.oa00.com/supply-chain/service/lib/bean"
)
type audit struct {
audit2.Audit
}
type AuditSearch struct {
ApplyUserId uint // 申请人
Status uint // 审核状态 1=未审核 2=通过 3=驳回
Name string // 用户名称
}
type ArgsAuditLists struct {
Search AuditSearch // 筛选
Page bean.Page // 分页
}
type AuditItem struct {
Id uint `json:"id"`
ServiceId uint `json:"serviceId"`
UserName string `json:"userName"`
ServiceName string `json:"serviceName"`
ApplyUserId uint `json:"applyUserId"`
ApplyAt int64 `json:"applyAt"`
AuditStatus uint `json:"auditStatus"`
AuditUserId uint `json:"auditUserId"`
AuditAt int64 `json:"auditAt"`
}
type ReplyAuditLists struct {
Lists []AuditItem `json:"lists"`
Total int64 `json:"total"`
}
// Lists @Title 服务审核列表
func (a *audit) Lists(ctx context.Context, args ArgsAuditLists) (reply ReplyAuditLists, err error) {
xClient, err := client.GetClient(a)
if err != nil {
return
}
err = xClient.Call(ctx, "Lists", args, &reply)
return
}
type ArgsHistory struct {
Page bean.Page
CustomerId uint
}
type ReplyHistoryLists struct {
Lists []HistoryItem `json:"lists"`
Total int64 `json:"total"`
}
type HistoryItem struct {
ServiceId uint `json:"serviceId"`
Remark string `json:"remark"`
ExpirationAt int64 `json:"expirationAt"`
ApplyAt int64 `json:"applyAt"`
AuditStatus uint `json:"auditStatus"`
}
// History @Title 服务申请记录
func (a *audit) History(ctx context.Context, args ArgsHistory) (reply ReplyHistoryLists, err error) {
xClient, err := client.GetClient(a)
if err != nil {
return
}
err = xClient.Call(ctx, "History", args, &reply)
return
}