feat: add creator report overview export
This commit is contained in:
@@ -1884,6 +1884,83 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/t/{tenantCode}/v1/creator/reports/export": {
|
||||
"post": {
|
||||
"description": "Export creator report overview",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"CreatorCenter"
|
||||
],
|
||||
"summary": "Export report overview",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Export form",
|
||||
"name": "form",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ReportExportForm"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ReportExportResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/t/{tenantCode}/v1/creator/reports/overview": {
|
||||
"get": {
|
||||
"description": "Get creator report overview",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"CreatorCenter"
|
||||
],
|
||||
"summary": "Report overview",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Start time (RFC3339)",
|
||||
"name": "start_at",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "End time (RFC3339)",
|
||||
"name": "end_at",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Granularity (day)",
|
||||
"name": "granularity",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ReportOverviewResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/t/{tenantCode}/v1/creator/settings": {
|
||||
"get": {
|
||||
"description": "Get channel settings",
|
||||
@@ -4442,6 +4519,118 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.ReportExportForm": {
|
||||
"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"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.ReportExportResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"content": {
|
||||
"description": "Content 导出内容(CSV 文本)。",
|
||||
"type": "string"
|
||||
},
|
||||
"filename": {
|
||||
"description": "Filename 导出文件名。",
|
||||
"type": "string"
|
||||
},
|
||||
"mime_type": {
|
||||
"description": "MimeType 导出内容类型。",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.ReportOverviewItem": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"date": {
|
||||
"description": "Date 日期(YYYY-MM-DD)。",
|
||||
"type": "string"
|
||||
},
|
||||
"paid_amount": {
|
||||
"description": "PaidAmount 当日已支付金额(单位元)。",
|
||||
"type": "number"
|
||||
},
|
||||
"paid_orders": {
|
||||
"description": "PaidOrders 当日已支付订单数。",
|
||||
"type": "integer"
|
||||
},
|
||||
"refund_amount": {
|
||||
"description": "RefundAmount 当日退款金额(单位元)。",
|
||||
"type": "number"
|
||||
},
|
||||
"refund_orders": {
|
||||
"description": "RefundOrders 当日退款订单数。",
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.ReportOverviewResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"items": {
|
||||
"description": "Items 按日期拆分的趋势数据。",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/dto.ReportOverviewItem"
|
||||
}
|
||||
},
|
||||
"summary": {
|
||||
"description": "Summary 汇总指标。",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/dto.ReportSummary"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.ReportSummary": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"conversion_rate": {
|
||||
"description": "ConversionRate 转化率(已支付订单数 / 累计曝光)。",
|
||||
"type": "number"
|
||||
},
|
||||
"paid_amount": {
|
||||
"description": "PaidAmount 统计区间内已支付金额(单位元)。",
|
||||
"type": "number"
|
||||
},
|
||||
"paid_orders": {
|
||||
"description": "PaidOrders 统计区间内已支付订单数。",
|
||||
"type": "integer"
|
||||
},
|
||||
"refund_amount": {
|
||||
"description": "RefundAmount 统计区间内退款金额(单位元)。",
|
||||
"type": "number"
|
||||
},
|
||||
"refund_orders": {
|
||||
"description": "RefundOrders 统计区间内退款订单数。",
|
||||
"type": "integer"
|
||||
},
|
||||
"total_views": {
|
||||
"description": "TotalViews 内容累计曝光(全量累计值,用于粗略换算)。",
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.Settings": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
@@ -1878,6 +1878,83 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/t/{tenantCode}/v1/creator/reports/export": {
|
||||
"post": {
|
||||
"description": "Export creator report overview",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"CreatorCenter"
|
||||
],
|
||||
"summary": "Export report overview",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Export form",
|
||||
"name": "form",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ReportExportForm"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ReportExportResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/t/{tenantCode}/v1/creator/reports/overview": {
|
||||
"get": {
|
||||
"description": "Get creator report overview",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"CreatorCenter"
|
||||
],
|
||||
"summary": "Report overview",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Start time (RFC3339)",
|
||||
"name": "start_at",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "End time (RFC3339)",
|
||||
"name": "end_at",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Granularity (day)",
|
||||
"name": "granularity",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ReportOverviewResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/t/{tenantCode}/v1/creator/settings": {
|
||||
"get": {
|
||||
"description": "Get channel settings",
|
||||
@@ -4436,6 +4513,118 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.ReportExportForm": {
|
||||
"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"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.ReportExportResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"content": {
|
||||
"description": "Content 导出内容(CSV 文本)。",
|
||||
"type": "string"
|
||||
},
|
||||
"filename": {
|
||||
"description": "Filename 导出文件名。",
|
||||
"type": "string"
|
||||
},
|
||||
"mime_type": {
|
||||
"description": "MimeType 导出内容类型。",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.ReportOverviewItem": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"date": {
|
||||
"description": "Date 日期(YYYY-MM-DD)。",
|
||||
"type": "string"
|
||||
},
|
||||
"paid_amount": {
|
||||
"description": "PaidAmount 当日已支付金额(单位元)。",
|
||||
"type": "number"
|
||||
},
|
||||
"paid_orders": {
|
||||
"description": "PaidOrders 当日已支付订单数。",
|
||||
"type": "integer"
|
||||
},
|
||||
"refund_amount": {
|
||||
"description": "RefundAmount 当日退款金额(单位元)。",
|
||||
"type": "number"
|
||||
},
|
||||
"refund_orders": {
|
||||
"description": "RefundOrders 当日退款订单数。",
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.ReportOverviewResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"items": {
|
||||
"description": "Items 按日期拆分的趋势数据。",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/dto.ReportOverviewItem"
|
||||
}
|
||||
},
|
||||
"summary": {
|
||||
"description": "Summary 汇总指标。",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/dto.ReportSummary"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.ReportSummary": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"conversion_rate": {
|
||||
"description": "ConversionRate 转化率(已支付订单数 / 累计曝光)。",
|
||||
"type": "number"
|
||||
},
|
||||
"paid_amount": {
|
||||
"description": "PaidAmount 统计区间内已支付金额(单位元)。",
|
||||
"type": "number"
|
||||
},
|
||||
"paid_orders": {
|
||||
"description": "PaidOrders 统计区间内已支付订单数。",
|
||||
"type": "integer"
|
||||
},
|
||||
"refund_amount": {
|
||||
"description": "RefundAmount 统计区间内退款金额(单位元)。",
|
||||
"type": "number"
|
||||
},
|
||||
"refund_orders": {
|
||||
"description": "RefundOrders 统计区间内退款订单数。",
|
||||
"type": "integer"
|
||||
},
|
||||
"total_views": {
|
||||
"description": "TotalViews 内容累计曝光(全量累计值,用于粗略换算)。",
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.Settings": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
@@ -768,6 +768,84 @@ definitions:
|
||||
description: Reason 退款原因/备注。
|
||||
type: string
|
||||
type: object
|
||||
dto.ReportExportForm:
|
||||
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
|
||||
type: object
|
||||
dto.ReportExportResponse:
|
||||
properties:
|
||||
content:
|
||||
description: Content 导出内容(CSV 文本)。
|
||||
type: string
|
||||
filename:
|
||||
description: Filename 导出文件名。
|
||||
type: string
|
||||
mime_type:
|
||||
description: MimeType 导出内容类型。
|
||||
type: string
|
||||
type: object
|
||||
dto.ReportOverviewItem:
|
||||
properties:
|
||||
date:
|
||||
description: Date 日期(YYYY-MM-DD)。
|
||||
type: string
|
||||
paid_amount:
|
||||
description: PaidAmount 当日已支付金额(单位元)。
|
||||
type: number
|
||||
paid_orders:
|
||||
description: PaidOrders 当日已支付订单数。
|
||||
type: integer
|
||||
refund_amount:
|
||||
description: RefundAmount 当日退款金额(单位元)。
|
||||
type: number
|
||||
refund_orders:
|
||||
description: RefundOrders 当日退款订单数。
|
||||
type: integer
|
||||
type: object
|
||||
dto.ReportOverviewResponse:
|
||||
properties:
|
||||
items:
|
||||
description: Items 按日期拆分的趋势数据。
|
||||
items:
|
||||
$ref: '#/definitions/dto.ReportOverviewItem'
|
||||
type: array
|
||||
summary:
|
||||
allOf:
|
||||
- $ref: '#/definitions/dto.ReportSummary'
|
||||
description: Summary 汇总指标。
|
||||
type: object
|
||||
dto.ReportSummary:
|
||||
properties:
|
||||
conversion_rate:
|
||||
description: ConversionRate 转化率(已支付订单数 / 累计曝光)。
|
||||
type: number
|
||||
paid_amount:
|
||||
description: PaidAmount 统计区间内已支付金额(单位元)。
|
||||
type: number
|
||||
paid_orders:
|
||||
description: PaidOrders 统计区间内已支付订单数。
|
||||
type: integer
|
||||
refund_amount:
|
||||
description: RefundAmount 统计区间内退款金额(单位元)。
|
||||
type: number
|
||||
refund_orders:
|
||||
description: RefundOrders 统计区间内退款订单数。
|
||||
type: integer
|
||||
total_views:
|
||||
description: TotalViews 内容累计曝光(全量累计值,用于粗略换算)。
|
||||
type: integer
|
||||
type: object
|
||||
dto.Settings:
|
||||
properties:
|
||||
avatar:
|
||||
@@ -2885,6 +2963,56 @@ paths:
|
||||
summary: Add payout account
|
||||
tags:
|
||||
- CreatorCenter
|
||||
/t/{tenantCode}/v1/creator/reports/export:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Export creator report overview
|
||||
parameters:
|
||||
- description: Export form
|
||||
in: body
|
||||
name: form
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/dto.ReportExportForm'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/dto.ReportExportResponse'
|
||||
summary: Export report overview
|
||||
tags:
|
||||
- CreatorCenter
|
||||
/t/{tenantCode}/v1/creator/reports/overview:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Get creator report overview
|
||||
parameters:
|
||||
- description: Start time (RFC3339)
|
||||
in: query
|
||||
name: start_at
|
||||
type: string
|
||||
- description: End time (RFC3339)
|
||||
in: query
|
||||
name: end_at
|
||||
type: string
|
||||
- description: Granularity (day)
|
||||
in: query
|
||||
name: granularity
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/dto.ReportOverviewResponse'
|
||||
summary: Report overview
|
||||
tags:
|
||||
- CreatorCenter
|
||||
/t/{tenantCode}/v1/creator/settings:
|
||||
get:
|
||||
consumes:
|
||||
|
||||
Reference in New Issue
Block a user