feat: wire superadmin p1 data

This commit is contained in:
2026-01-15 09:35:16 +08:00
parent bb4c5b39d2
commit 235a216b0c
21 changed files with 3188 additions and 28 deletions

View File

@@ -169,6 +169,110 @@
}
}
},
"/super/v1/coupons": {
"get": {
"description": "List coupon templates across tenants",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Coupon"
],
"summary": "List coupons",
"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.SuperCouponItem"
}
}
}
}
]
}
}
}
}
},
"/super/v1/creators": {
"get": {
"description": "List creator tenants (channels) across the platform",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Creator"
],
"summary": "List creators",
"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/orders": {
"get": {
"description": "List orders",
@@ -319,6 +423,63 @@
}
}
},
"/super/v1/reports/export": {
"post": {
"description": "Export platform report data",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Report"
],
"summary": "Export report",
"parameters": [
{
"description": "Export form",
"name": "form",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.SuperReportExportForm"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dto.ReportExportResponse"
}
}
}
}
},
"/super/v1/reports/overview": {
"get": {
"description": "Get platform report overview",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Report"
],
"summary": "Report overview",
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/dto.ReportOverviewResponse"
}
}
}
}
},
"/super/v1/tenants": {
"get": {
"description": "List tenants",
@@ -1059,6 +1220,133 @@
}
}
},
"/super/v1/withdrawals": {
"get": {
"description": "List withdrawal orders across tenants",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Finance"
],
"summary": "List withdrawals",
"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.SuperOrderItem"
}
}
}
}
]
}
}
}
}
},
"/super/v1/withdrawals/{id}/approve": {
"post": {
"description": "Approve a withdrawal request",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Finance"
],
"summary": "Approve withdrawal",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "Withdrawal order ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Approved",
"schema": {
"type": "string"
}
}
}
}
},
"/super/v1/withdrawals/{id}/reject": {
"post": {
"description": "Reject a withdrawal request",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"Finance"
],
"summary": "Reject withdrawal",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "Withdrawal order ID",
"name": "id",
"in": "path",
"required": true
},
{
"description": "Reject form",
"name": "form",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/dto.SuperWithdrawalRejectForm"
}
}
],
"responses": {
"200": {
"description": "Rejected",
"schema": {
"type": "string"
}
}
}
}
},
"/t/{tenantCode}/v1/auth/login": {
"post": {
"description": "Login or register user using phone number and OTP",
@@ -3816,6 +4104,17 @@
"ContentStatusBlocked"
]
},
"consts.CouponType": {
"type": "string",
"enum": [
"fix_amount",
"discount"
],
"x-enum-varnames": [
"CouponTypeFixAmount",
"CouponTypeDiscount"
]
},
"consts.Currency": {
"type": "string",
"enum": [
@@ -5234,6 +5533,91 @@
}
}
},
"dto.SuperCouponItem": {
"type": "object",
"properties": {
"created_at": {
"description": "CreatedAt 创建时间RFC3339。",
"type": "string"
},
"description": {
"description": "Description 优惠券描述。",
"type": "string"
},
"end_at": {
"description": "EndAt 结束时间RFC3339。",
"type": "string"
},
"id": {
"description": "ID 优惠券ID。",
"type": "integer"
},
"max_discount": {
"description": "MaxDiscount 最大折扣金额(折扣券)。",
"type": "integer"
},
"min_order_amount": {
"description": "MinOrderAmount 最低订单金额门槛。",
"type": "integer"
},
"start_at": {
"description": "StartAt 生效时间RFC3339。",
"type": "string"
},
"status": {
"description": "Status 状态active/expired/upcoming。",
"type": "string"
},
"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"
},
"title": {
"description": "Title 优惠券标题。",
"type": "string"
},
"total_quantity": {
"description": "TotalQuantity 总发行数量0 表示不限量)。",
"type": "integer"
},
"type": {
"description": "Type 优惠券类型。",
"allOf": [
{
"$ref": "#/definitions/consts.CouponType"
}
]
},
"type_description": {
"description": "TypeDescription 类型描述(用于展示)。",
"type": "string"
},
"updated_at": {
"description": "UpdatedAt 更新时间RFC3339。",
"type": "string"
},
"used_quantity": {
"description": "UsedQuantity 已使用数量。",
"type": "integer"
},
"value": {
"description": "Value 优惠券面额/折扣值。",
"type": "integer"
}
}
},
"dto.SuperOrderDetail": {
"type": "object",
"properties": {
@@ -5391,6 +5775,31 @@
}
}
},
"dto.SuperReportExportForm": {
"type": "object",
"properties": {
"end_at": {
"description": "EndAt 统计结束时间RFC3339可选默认当前时间。",
"type": "string"
},
"format": {
"description": "Format 导出格式(仅支持 csv。",
"type": "string"
},
"granularity": {
"description": "Granularity 统计粒度day目前仅支持 day。",
"type": "string"
},
"start_at": {
"description": "StartAt 统计开始时间RFC3339可选默认当前时间往前 7 天)。",
"type": "string"
},
"tenant_id": {
"description": "TenantID 租户ID不传代表全平台。",
"type": "integer"
}
}
},
"dto.SuperTenantContentStatusUpdateForm": {
"type": "object",
"required": [
@@ -5476,6 +5885,18 @@
}
}
},
"dto.SuperWithdrawalRejectForm": {
"type": "object",
"required": [
"reason"
],
"properties": {
"reason": {
"description": "Reason 驳回原因。",
"type": "string"
}
}
},
"dto.TenantAdminUserLite": {
"type": "object",
"properties": {