feat: add superadmin creator review and coupon governance

This commit is contained in:
2026-01-15 13:14:25 +08:00
parent bec984b959
commit 539cdf3c1c
17 changed files with 2909 additions and 146 deletions

View File

@@ -203,6 +203,58 @@
}
}
},
"/super/v1/coupon-grants": {
"get": {
"description": "List coupon grant records across tenants",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Coupon"
],
"summary": "List coupon grants",
"parameters": [
{
"type": "integer",
"description": "Page number",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "Page size",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/requests.Pager"
},
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/dto.SuperCouponGrantItem"
}
}
}
}
]
}
}
}
}
},
"/super/v1/coupons": {
"get": {
"description": "List coupon templates across tenants",
@@ -255,6 +307,142 @@
}
}
},
"/super/v1/coupons/{id}/status": {
"patch": {
"description": "Update coupon status across tenants",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Coupon"
],
"summary": "Update coupon status",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "Coupon ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Update form",
"name": "form",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.SuperCouponStatusUpdateForm"
}
}
],
"responses": {
"200": {
"description": "Updated",
"schema": {
"type": "string"
}
}
}
}
},
"/super/v1/creator-applications": {
"get": {
"description": "List creator applications across tenants",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Creator"
],
"summary": "List creator applications",
"parameters": [
{
"type": "integer",
"description": "Page number",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "Page size",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/requests.Pager"
},
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/dto.TenantItem"
}
}
}
}
]
}
}
}
}
},
"/super/v1/creator-applications/{id}/review": {
"post": {
"description": "Approve or reject creator application",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Creator"
],
"summary": "Review creator application",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "Tenant ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Review form",
"name": "form",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.SuperCreatorApplicationReviewForm"
}
}
],
"responses": {
"200": {
"description": "Reviewed",
"schema": {
"type": "string"
}
}
}
}
},
"/super/v1/creators": {
"get": {
"description": "List creator tenants (channels) across the platform",
@@ -457,6 +645,91 @@
}
}
},
"/super/v1/payout-accounts": {
"get": {
"description": "List payout accounts across tenants",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Finance"
],
"summary": "List payout accounts",
"parameters": [
{
"type": "integer",
"description": "Page number",
"name": "page",
"in": "query"
},
{
"type": "integer",
"description": "Page size",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/requests.Pager"
},
{
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/dto.SuperPayoutAccountItem"
}
}
}
}
]
}
}
}
}
},
"/super/v1/payout-accounts/{id}": {
"delete": {
"description": "Remove payout account across tenants",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Finance"
],
"summary": "Remove payout account",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "Payout account ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Removed",
"schema": {
"type": "string"
}
}
}
}
},
"/super/v1/reports/export": {
"post": {
"description": "Export platform report data",
@@ -6112,6 +6385,67 @@
}
}
},
"dto.SuperCouponGrantItem": {
"type": "object",
"properties": {
"coupon_id": {
"description": "CouponID 优惠券ID。",
"type": "integer"
},
"coupon_title": {
"description": "CouponTitle 优惠券标题。",
"type": "string"
},
"created_at": {
"description": "CreatedAt 领取时间RFC3339。",
"type": "string"
},
"id": {
"description": "ID 用户券ID。",
"type": "integer"
},
"order_id": {
"description": "OrderID 使用订单ID。",
"type": "integer"
},
"status": {
"description": "Status 用户券状态。",
"allOf": [
{
"$ref": "#/definitions/consts.UserCouponStatus"
}
]
},
"status_description": {
"description": "StatusDescription 状态描述(用于展示)。",
"type": "string"
},
"tenant_code": {
"description": "TenantCode 租户编码。",
"type": "string"
},
"tenant_id": {
"description": "TenantID 租户ID。",
"type": "integer"
},
"tenant_name": {
"description": "TenantName 租户名称。",
"type": "string"
},
"used_at": {
"description": "UsedAt 使用时间RFC3339。",
"type": "string"
},
"user_id": {
"description": "UserID 用户ID。",
"type": "integer"
},
"username": {
"description": "Username 用户名。",
"type": "string"
}
}
},
"dto.SuperCouponGrantResponse": {
"type": "object",
"properties": {
@@ -6206,6 +6540,41 @@
}
}
},
"dto.SuperCouponStatusUpdateForm": {
"type": "object",
"required": [
"status"
],
"properties": {
"status": {
"description": "Status 目标状态frozen。",
"type": "string",
"enum": [
"frozen"
]
}
}
},
"dto.SuperCreatorApplicationReviewForm": {
"type": "object",
"required": [
"action"
],
"properties": {
"action": {
"description": "Action 审核动作approve/reject。",
"type": "string",
"enum": [
"approve",
"reject"
]
},
"reason": {
"description": "Reason 审核说明(可选,驳回时填写)。",
"type": "string"
}
}
},
"dto.SuperOrderDetail": {
"type": "object",
"properties": {
@@ -6363,6 +6732,59 @@
}
}
},
"dto.SuperPayoutAccountItem": {
"type": "object",
"properties": {
"account": {
"description": "Account 收款账号。",
"type": "string"
},
"created_at": {
"description": "CreatedAt 创建时间RFC3339。",
"type": "string"
},
"id": {
"description": "ID 结算账户ID。",
"type": "integer"
},
"name": {
"description": "Name 账户名称/开户行。",
"type": "string"
},
"realname": {
"description": "Realname 收款人姓名。",
"type": "string"
},
"tenant_code": {
"description": "TenantCode 租户编码。",
"type": "string"
},
"tenant_id": {
"description": "TenantID 租户ID。",
"type": "integer"
},
"tenant_name": {
"description": "TenantName 租户名称。",
"type": "string"
},
"type": {
"description": "Type 账户类型。",
"type": "string"
},
"updated_at": {
"description": "UpdatedAt 更新时间RFC3339。",
"type": "string"
},
"user_id": {
"description": "UserID 用户ID。",
"type": "integer"
},
"username": {
"description": "Username 用户名。",
"type": "string"
}
}
},
"dto.SuperReportExportForm": {
"type": "object",
"properties": {