tenant: admin order export csv
This commit is contained in:
@@ -1102,6 +1102,157 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/t/{tenantCode}/v1/admin/orders/export": {
|
||||
"get": {
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Tenant"
|
||||
],
|
||||
"summary": "订单导出(租户管理)",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Tenant Code",
|
||||
"name": "tenantCode",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "AmountPaidMax 实付金额上限(可选):amount_paid \u003c= 该值(单位分)。",
|
||||
"name": "amount_paid_max",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "AmountPaidMin 实付金额下限(可选):amount_paid \u003e= 该值(单位分)。",
|
||||
"name": "amount_paid_min",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Asc specifies comma-separated field names to sort ascending by.",
|
||||
"name": "asc",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "ContentID 内容ID(可选):通过 order_items 关联过滤。",
|
||||
"name": "content_id",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "ContentTitle 内容标题关键字(可选):通过 order_items + contents 关联,模糊匹配 contents.title(like)。",
|
||||
"name": "content_title",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "CreatedAtFrom 创建时间起(可选):created_at \u003e= 该时间(用于按创建时间筛选)。",
|
||||
"name": "created_at_from",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "CreatedAtTo 创建时间止(可选):created_at \u003c= 该时间(用于按创建时间筛选)。",
|
||||
"name": "created_at_to",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Desc specifies comma-separated field names to sort descending by.",
|
||||
"name": "desc",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Limit is page size; only values in {10,20,50,100} are accepted (otherwise defaults to 10).",
|
||||
"name": "limit",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "Page is 1-based page index; values \u003c= 0 are normalized to 1.",
|
||||
"name": "page",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "PaidAtFrom 支付时间起(可选):paid_at \u003e= 该时间(用于按支付时间筛选)。",
|
||||
"name": "paid_at_from",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "PaidAtTo 支付时间止(可选):paid_at \u003c= 该时间(用于按支付时间筛选)。",
|
||||
"name": "paid_at_to",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"enum": [
|
||||
"created",
|
||||
"paid",
|
||||
"refunding",
|
||||
"refunded",
|
||||
"canceled",
|
||||
"failed"
|
||||
],
|
||||
"type": "string",
|
||||
"x-enum-varnames": [
|
||||
"OrderStatusCreated",
|
||||
"OrderStatusPaid",
|
||||
"OrderStatusRefunding",
|
||||
"OrderStatusRefunded",
|
||||
"OrderStatusCanceled",
|
||||
"OrderStatusFailed"
|
||||
],
|
||||
"description": "Status 订单状态(可选):created/paid/refunding/refunded/canceled/failed。",
|
||||
"name": "status",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"enum": [
|
||||
"content_purchase",
|
||||
"topup"
|
||||
],
|
||||
"type": "string",
|
||||
"x-enum-varnames": [
|
||||
"OrderTypeContentPurchase",
|
||||
"OrderTypeTopup"
|
||||
],
|
||||
"description": "Type 订单类型(可选):content_purchase/topup 等。",
|
||||
"name": "type",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "UserID 下单用户ID(可选):按买家用户ID精确过滤。",
|
||||
"name": "user_id",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Username 下单用户用户名关键字(可选):模糊匹配 users.username(like)。",
|
||||
"name": "username",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.AdminOrderExportResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/t/{tenantCode}/v1/admin/orders/{orderID}": {
|
||||
"get": {
|
||||
"consumes": [
|
||||
@@ -2251,6 +2402,23 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.AdminOrderExportResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"content_type": {
|
||||
"description": "ContentType 内容类型:当前固定为 text/csv。",
|
||||
"type": "string"
|
||||
},
|
||||
"csv": {
|
||||
"description": "CSV CSV 文本内容:UTF-8 编码,包含表头与数据行;前端可直接下载为文件。",
|
||||
"type": "string"
|
||||
},
|
||||
"filename": {
|
||||
"description": "Filename 建议文件名:前端可用于下载时的默认文件名。",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.AdminOrderRefundForm": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
Reference in New Issue
Block a user