feat: 增加订单过滤功能,支持按内容ID、支付时间范围和支付金额范围筛选

This commit is contained in:
2025-12-18 16:46:40 +08:00
parent 3249e405ac
commit e268176af5
8 changed files with 418 additions and 37 deletions

View File

@@ -623,6 +623,24 @@ const docTemplate = `{
"in": "path",
"required": true
},
{
"type": "integer",
"description": "AmountPaidMax filters orders by amount_paid \u003c= this amount (cents).",
"name": "amount_paid_max",
"in": "query"
},
{
"type": "integer",
"description": "AmountPaidMin filters orders by amount_paid \u003e= this amount (cents).",
"name": "amount_paid_min",
"in": "query"
},
{
"type": "integer",
"description": "ContentID filters orders by purchased content id (via order_items join).",
"name": "content_id",
"in": "query"
},
{
"type": "integer",
"description": "Limit is page size; only values in {10,20,50,100} are accepted (otherwise defaults to 10).",
@@ -635,6 +653,18 @@ const docTemplate = `{
"name": "page",
"in": "query"
},
{
"type": "string",
"description": "PaidAtFrom filters orders by paid_at \u003e= this time.",
"name": "paid_at_from",
"in": "query"
},
{
"type": "string",
"description": "PaidAtTo filters orders by paid_at \u003c= this time.",
"name": "paid_at_to",
"in": "query"
},
{
"enum": [
"created",
@@ -1172,6 +1202,12 @@ const docTemplate = `{
"in": "path",
"required": true
},
{
"type": "integer",
"description": "ContentID filters orders by purchased content id (via order_items join).",
"name": "content_id",
"in": "query"
},
{
"type": "integer",
"description": "Limit is page size; only values in {10,20,50,100} are accepted (otherwise defaults to 10).",
@@ -1184,6 +1220,18 @@ const docTemplate = `{
"name": "page",
"in": "query"
},
{
"type": "string",
"description": "PaidAtFrom filters orders by paid_at \u003e= this time.",
"name": "paid_at_from",
"in": "query"
},
{
"type": "string",
"description": "PaidAtTo filters orders by paid_at \u003c= this time.",
"name": "paid_at_to",
"in": "query"
},
{
"enum": [
"created",