实现商户注册、管理员审核商户申请接口
This commit is contained in:
18
api/merchant/merchant.go
Normal file
18
api/merchant/merchant.go
Normal file
@ -0,0 +1,18 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package merchant
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"server/api/merchant/v1"
|
||||
)
|
||||
|
||||
type IMerchantV1 interface {
|
||||
List(ctx context.Context, req *v1.ListReq) (res *v1.ListRes, err error)
|
||||
Create(ctx context.Context, req *v1.CreateReq) (res *v1.CreateRes, err error)
|
||||
Update(ctx context.Context, req *v1.UpdateReq) (res *v1.UpdateRes, err error)
|
||||
Audit(ctx context.Context, req *v1.AuditReq) (res *v1.AuditRes, err error)
|
||||
}
|
||||
39
api/merchant/v1/merchant.go
Normal file
39
api/merchant/v1/merchant.go
Normal file
@ -0,0 +1,39 @@
|
||||
package v1
|
||||
|
||||
import "github.com/gogf/gf/v2/frame/g"
|
||||
|
||||
type ListReq struct {
|
||||
g.Meta `path:"/merchant" method:"get" tags:"Merchant" summary:"(系统管理员)获取商户列表"`
|
||||
Page int `json:"page" dc:"页数"`
|
||||
Size int `json:"size" dc:"每页数量"`
|
||||
Status int `json:"status" dc:"状态:1=启用,2=禁用"`
|
||||
AuditStatus int `json:"auditStatus" dc:"审核状态:0=待审核,1=审核通过,2=审核拒绝"`
|
||||
}
|
||||
type ListRes struct {
|
||||
List interface{} `json:"list" dc:"商户列表"`
|
||||
Total int `json:"total" dc:"总数"`
|
||||
}
|
||||
|
||||
type CreateReq struct {
|
||||
g.Meta `path:"/merchant" method:"post" tags:"Merchant" summary:"(系统管理员)创建商户"`
|
||||
}
|
||||
type CreateRes struct {
|
||||
Id int64 `json:"id" dc:"商户ID"`
|
||||
}
|
||||
|
||||
type UpdateReq struct {
|
||||
g.Meta `path:"/merchant" method:"put" tags:"Merchant" summary:"(系统管理员、商户管理员)更新商户"`
|
||||
}
|
||||
type UpdateRes struct {
|
||||
Success bool `json:"success" dc:"是否成功"`
|
||||
}
|
||||
|
||||
type AuditReq struct {
|
||||
g.Meta `path:"/merchant/audit" method:"post" tags:"Merchant" summary:"(系统管理员)商户审核"`
|
||||
Id int64 `json:"id" v:"required" dc:"商户ID"`
|
||||
AuditStatus int `json:"auditStatus" v:"required" dc:"审核状态:1=审核通过,2=审核拒绝" `
|
||||
AuditRemark string `json:"auditRemark" dc:"审核备注"`
|
||||
RejectReason string `json:"rejectReason" dc:"拒绝原因"`
|
||||
}
|
||||
type AuditRes struct {
|
||||
}
|
||||
Reference in New Issue
Block a user