tenant: extend admin order filters
This commit is contained in:
@@ -961,22 +961,40 @@ const docTemplate = `{
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "AmountPaidMax filters orders by amount_paid \u003c= this amount (cents).",
|
||||
"description": "AmountPaidMax 实付金额上限(可选):amount_paid \u003c= 该值(单位分)。",
|
||||
"name": "amount_paid_max",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "AmountPaidMin filters orders by amount_paid \u003e= this amount (cents).",
|
||||
"description": "AmountPaidMin 实付金额下限(可选):amount_paid \u003e= 该值(单位分)。",
|
||||
"name": "amount_paid_min",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "ContentID filters orders by purchased content id (via order_items join).",
|
||||
"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": "integer",
|
||||
"description": "Limit is page size; only values in {10,20,50,100} are accepted (otherwise defaults to 10).",
|
||||
@@ -991,13 +1009,13 @@ const docTemplate = `{
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "PaidAtFrom filters orders by paid_at \u003e= this time.",
|
||||
"description": "PaidAtFrom 支付时间起(可选):paid_at \u003e= 该时间(用于按支付时间筛选)。",
|
||||
"name": "paid_at_from",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "PaidAtTo filters orders by paid_at \u003c= this time.",
|
||||
"description": "PaidAtTo 支付时间止(可选):paid_at \u003c= 该时间(用于按支付时间筛选)。",
|
||||
"name": "paid_at_to",
|
||||
"in": "query"
|
||||
},
|
||||
@@ -1019,15 +1037,35 @@ const docTemplate = `{
|
||||
"OrderStatusCanceled",
|
||||
"OrderStatusFailed"
|
||||
],
|
||||
"description": "Status filters orders by order status.",
|
||||
"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 filters orders by buyer user id.",
|
||||
"description": "UserID 下单用户ID(可选):按买家用户ID精确过滤。",
|
||||
"name": "user_id",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Username 下单用户用户名关键字(可选):模糊匹配 users.username(like)。",
|
||||
"name": "username",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
|
||||
@@ -955,22 +955,40 @@
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "AmountPaidMax filters orders by amount_paid \u003c= this amount (cents).",
|
||||
"description": "AmountPaidMax 实付金额上限(可选):amount_paid \u003c= 该值(单位分)。",
|
||||
"name": "amount_paid_max",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "AmountPaidMin filters orders by amount_paid \u003e= this amount (cents).",
|
||||
"description": "AmountPaidMin 实付金额下限(可选):amount_paid \u003e= 该值(单位分)。",
|
||||
"name": "amount_paid_min",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "ContentID filters orders by purchased content id (via order_items join).",
|
||||
"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": "integer",
|
||||
"description": "Limit is page size; only values in {10,20,50,100} are accepted (otherwise defaults to 10).",
|
||||
@@ -985,13 +1003,13 @@
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "PaidAtFrom filters orders by paid_at \u003e= this time.",
|
||||
"description": "PaidAtFrom 支付时间起(可选):paid_at \u003e= 该时间(用于按支付时间筛选)。",
|
||||
"name": "paid_at_from",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "PaidAtTo filters orders by paid_at \u003c= this time.",
|
||||
"description": "PaidAtTo 支付时间止(可选):paid_at \u003c= 该时间(用于按支付时间筛选)。",
|
||||
"name": "paid_at_to",
|
||||
"in": "query"
|
||||
},
|
||||
@@ -1013,15 +1031,35 @@
|
||||
"OrderStatusCanceled",
|
||||
"OrderStatusFailed"
|
||||
],
|
||||
"description": "Status filters orders by order status.",
|
||||
"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 filters orders by buyer user id.",
|
||||
"description": "UserID 下单用户ID(可选):按买家用户ID精确过滤。",
|
||||
"name": "user_id",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Username 下单用户用户名关键字(可选):模糊匹配 users.username(like)。",
|
||||
"name": "username",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
|
||||
@@ -1767,19 +1767,30 @@ paths:
|
||||
name: tenantCode
|
||||
required: true
|
||||
type: string
|
||||
- description: AmountPaidMax filters orders by amount_paid <= this amount (cents).
|
||||
- description: AmountPaidMax 实付金额上限(可选):amount_paid <= 该值(单位分)。
|
||||
in: query
|
||||
name: amount_paid_max
|
||||
type: integer
|
||||
- description: AmountPaidMin filters orders by amount_paid >= this amount (cents).
|
||||
- description: AmountPaidMin 实付金额下限(可选):amount_paid >= 该值(单位分)。
|
||||
in: query
|
||||
name: amount_paid_min
|
||||
type: integer
|
||||
- description: ContentID filters orders by purchased content id (via order_items
|
||||
join).
|
||||
- description: ContentID 内容ID(可选):通过 order_items 关联过滤。
|
||||
in: query
|
||||
name: content_id
|
||||
type: integer
|
||||
- description: ContentTitle 内容标题关键字(可选):通过 order_items + contents 关联,模糊匹配 contents.title(like)。
|
||||
in: query
|
||||
name: content_title
|
||||
type: string
|
||||
- description: CreatedAtFrom 创建时间起(可选):created_at >= 该时间(用于按创建时间筛选)。
|
||||
in: query
|
||||
name: created_at_from
|
||||
type: string
|
||||
- description: CreatedAtTo 创建时间止(可选):created_at <= 该时间(用于按创建时间筛选)。
|
||||
in: query
|
||||
name: created_at_to
|
||||
type: string
|
||||
- description: Limit is page size; only values in {10,20,50,100} are accepted
|
||||
(otherwise defaults to 10).
|
||||
in: query
|
||||
@@ -1789,15 +1800,15 @@ paths:
|
||||
in: query
|
||||
name: page
|
||||
type: integer
|
||||
- description: PaidAtFrom filters orders by paid_at >= this time.
|
||||
- description: PaidAtFrom 支付时间起(可选):paid_at >= 该时间(用于按支付时间筛选)。
|
||||
in: query
|
||||
name: paid_at_from
|
||||
type: string
|
||||
- description: PaidAtTo filters orders by paid_at <= this time.
|
||||
- description: PaidAtTo 支付时间止(可选):paid_at <= 该时间(用于按支付时间筛选)。
|
||||
in: query
|
||||
name: paid_at_to
|
||||
type: string
|
||||
- description: Status filters orders by order status.
|
||||
- description: Status 订单状态(可选):created/paid/refunding/refunded/canceled/failed。
|
||||
enum:
|
||||
- created
|
||||
- paid
|
||||
@@ -1815,10 +1826,24 @@ paths:
|
||||
- OrderStatusRefunded
|
||||
- OrderStatusCanceled
|
||||
- OrderStatusFailed
|
||||
- description: UserID filters orders by buyer user id.
|
||||
- description: Type 订单类型(可选):content_purchase/topup 等。
|
||||
enum:
|
||||
- content_purchase
|
||||
- topup
|
||||
in: query
|
||||
name: type
|
||||
type: string
|
||||
x-enum-varnames:
|
||||
- OrderTypeContentPurchase
|
||||
- OrderTypeTopup
|
||||
- description: UserID 下单用户ID(可选):按买家用户ID精确过滤。
|
||||
in: query
|
||||
name: user_id
|
||||
type: integer
|
||||
- description: Username 下单用户用户名关键字(可选):模糊匹配 users.username(like)。
|
||||
in: query
|
||||
name: username
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
|
||||
Reference in New Issue
Block a user