Skip to content
Merged
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
2 changes: 2 additions & 0 deletions config.example.yaml
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

refund_expired_red_envelopes_task_cron 没提交

Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ app:
session_secure: false
session_http_only: false
api_prefix: "/api"
frontend_url: "http://localhost:3000"
frontend_pay_url: "http://localhost:3000/paying"

# OAuth2/OIDC(优先)
Expand Down Expand Up @@ -107,6 +108,7 @@ scheduler:
dispute_auto_refund_dispatch_interval_seconds: 3
auto_refund_expired_disputes_task_cron: "0 0 * * *"
sync_orders_to_clickhouse_task_cron: "10 0 * * *"
refund_expired_red_envelopes_task_cron: "0 1 * * *"

# Worker
worker:
Expand Down
213 changes: 212 additions & 1 deletion docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -1315,6 +1315,129 @@ const docTemplate = `{
}
}
},
"/api/v1/redenvelope/claim": {
"post": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"redenvelope"
],
"parameters": [
{
"description": "领取红包请求",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/redenvelope.ClaimRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/util.ResponseAny"
}
}
}
}
},
"/api/v1/redenvelope/create": {
"post": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"redenvelope"
],
"parameters": [
{
"description": "创建红包请求",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/redenvelope.CreateRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/util.ResponseAny"
}
}
}
}
},
"/api/v1/redenvelope/list": {
"post": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"redenvelope"
],
"parameters": [
{
"description": "列表请求",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/redenvelope.ListRequest"
}
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/util.ResponseAny"
}
}
}
}
},
"/api/v1/redenvelope/{id}": {
"get": {
"produces": [
"application/json"
],
"tags": [
"redenvelope"
],
"parameters": [
{
"type": "string",
"description": "红包ID",
"name": "id",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/util.ResponseAny"
}
}
}
}
},
"/api/v1/user/pay-key": {
"put": {
"consumes": [
Expand Down Expand Up @@ -1624,6 +1747,17 @@ const docTemplate = `{
"PayLevelPremium"
]
},
"model.RedEnvelopeType": {
"type": "string",
"enum": [
"fixed",
"random"
],
"x-enum-varnames": [
"RedEnvelopeTypeFixed",
"RedEnvelopeTypeRandom"
]
},
"oauth.CallbackRequest": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -1690,7 +1824,10 @@ const docTemplate = `{
"community",
"online",
"test",
"distribute"
"distribute",
"red_envelope_send",
"red_envelope_receive",
"red_envelope_refund"
]
}
}
Expand Down Expand Up @@ -1881,6 +2018,80 @@ const docTemplate = `{
}
}
},
"redenvelope.ClaimRequest": {
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "string",
"example": "0"
}
}
},
"redenvelope.CreateRequest": {
"type": "object",
"required": [
"pay_key",
"total_amount",
"total_count",
"type"
],
"properties": {
"greeting": {
"type": "string",
"maxLength": 100
},
"pay_key": {
"type": "string",
"maxLength": 10
},
"total_amount": {
"type": "number"
},
"total_count": {
"type": "integer",
"minimum": 1
},
"type": {
"enum": [
"fixed",
"random"
],
"allOf": [
{
"$ref": "#/definitions/model.RedEnvelopeType"
}
]
}
}
},
"redenvelope.ListRequest": {
"type": "object",
"required": [
"page",
"page_size"
],
"properties": {
"page": {
"type": "integer",
"minimum": 1
},
"page_size": {
"type": "integer",
"maximum": 100,
"minimum": 1
},
"type": {
"type": "string",
"enum": [
"sent",
"received"
]
}
}
},
"system_config.CreateSystemConfigRequest": {
"type": "object",
"required": [
Expand Down
Loading
Loading