Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 82 additions & 0 deletions docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,65 @@ const docTemplate = `{
}
}
},
"/api/v1/projects/{id}/pending-payment": {
"get": {
"description": "只返回指定项目下当前用户已有且未过期的待支付订单,不重新占用库存或刷新有效期",
"produces": [
"application/json"
],
"tags": [
"payment"
],
"summary": "获取当前用户的待支付订单",
"parameters": [
{
"type": "string",
"description": "项目ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/payment.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/payment.PendingPaymentResponseData"
}
}
}
]
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/payment.Response"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/project.ProjectResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/payment.Response"
}
}
}
}
},
"/api/v1/projects/{id}/receivers": {
"get": {
"consumes": [
Expand Down Expand Up @@ -977,6 +1036,29 @@ const docTemplate = `{
}
}
},
"payment.PendingPaymentResponseData": {
"type": "object",
"properties": {
"amount": {
"type": "string"
},
"has_pending": {
"type": "boolean"
},
"pay_url": {
"type": "string"
}
}
},
"payment.Response": {
"type": "object",
"properties": {
"data": {},
"error_msg": {
"type": "string"
}
}
},
"project.CreateProjectRequestBody": {
"type": "object",
"required": [
Expand Down
82 changes: 82 additions & 0 deletions docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,65 @@
}
}
},
"/api/v1/projects/{id}/pending-payment": {
"get": {
"description": "只返回指定项目下当前用户已有且未过期的待支付订单,不重新占用库存或刷新有效期",
"produces": [
"application/json"
],
"tags": [
"payment"
],
"summary": "获取当前用户的待支付订单",
"parameters": [
{
"type": "string",
"description": "项目ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/payment.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/payment.PendingPaymentResponseData"
}
}
}
]
}
},
"400": {
"description": "Bad Request",
"schema": {
"$ref": "#/definitions/payment.Response"
}
},
"404": {
"description": "Not Found",
"schema": {
"$ref": "#/definitions/project.ProjectResponse"
}
},
"500": {
"description": "Internal Server Error",
"schema": {
"$ref": "#/definitions/payment.Response"
}
}
}
}
},
"/api/v1/projects/{id}/receivers": {
"get": {
"consumes": [
Expand Down Expand Up @@ -968,6 +1027,29 @@
}
}
},
"payment.PendingPaymentResponseData": {
"type": "object",
"properties": {
"amount": {
"type": "string"
},
"has_pending": {
"type": "boolean"
},
"pay_url": {
"type": "string"
}
}
},
"payment.Response": {
"type": "object",
"properties": {
"data": {},
"error_msg": {
"type": "string"
}
}
},
"project.CreateProjectRequestBody": {
"type": "object",
"required": [
Expand Down
51 changes: 51 additions & 0 deletions docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,21 @@ definitions:
error_msg:
type: string
type: object
payment.PendingPaymentResponseData:
properties:
amount:
type: string
has_pending:
type: boolean
pay_url:
type: string
type: object
payment.Response:
properties:
data: {}
error_msg:
type: string
type: object
project.CreateProjectRequestBody:
properties:
allow_same_ip:
Expand Down Expand Up @@ -772,6 +787,42 @@ paths:
$ref: '#/definitions/project.ProjectResponse'
tags:
- project
/api/v1/projects/{id}/pending-payment:
get:
description: 只返回指定项目下当前用户已有且未过期的待支付订单,不重新占用库存或刷新有效期
parameters:
- description: 项目ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/payment.Response'
- properties:
data:
$ref: '#/definitions/payment.PendingPaymentResponseData'
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/payment.Response'
"404":
description: Not Found
schema:
$ref: '#/definitions/project.ProjectResponse'
"500":
description: Internal Server Error
schema:
$ref: '#/definitions/payment.Response'
summary: 获取当前用户的待支付订单
tags:
- payment
/api/v1/projects/{id}/receivers:
get:
consumes:
Expand Down
Loading
Loading