feat(core): bind request services and implement registered tasks

Wire plugin services through Bind/InjectFrom and AppContext so HTTP and
workers resolve dependencies after Apply. Register TaskHandler objects
with persisted results, and implement send_email_code, mail:send,
cleanup_inactive_users, and dispatch_bot_msg.
This commit is contained in:
ryan
2026-09-02 16:59:00 +08:00
parent 30bbe965bf
commit 4f50f6a8f9
49 changed files with 1406 additions and 499 deletions
+28
View File
@@ -5925,6 +5925,17 @@ const docTemplate = `{
"user"
],
"summary": "发送邮箱验证码",
"parameters": [
{
"description": "目标邮箱",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/user.sendEmailCodeRequest"
}
}
],
"responses": {
"200": {
"description": "发送成功",
@@ -5937,6 +5948,12 @@ const docTemplate = `{
"schema": {
"$ref": "#/definitions/response.Any"
}
},
"500": {
"description": "发送失败",
"schema": {
"$ref": "#/definitions/response.Any"
}
}
}
}
@@ -8047,6 +8064,17 @@ const docTemplate = `{
}
}
},
"user.sendEmailCodeRequest": {
"type": "object",
"required": [
"email"
],
"properties": {
"email": {
"type": "string"
}
}
},
"user.updateProfileRequest": {
"type": "object",
"properties": {
+28
View File
@@ -5918,6 +5918,17 @@
"user"
],
"summary": "发送邮箱验证码",
"parameters": [
{
"description": "目标邮箱",
"name": "request",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/user.sendEmailCodeRequest"
}
}
],
"responses": {
"200": {
"description": "发送成功",
@@ -5930,6 +5941,12 @@
"schema": {
"$ref": "#/definitions/response.Any"
}
},
"500": {
"description": "发送失败",
"schema": {
"$ref": "#/definitions/response.Any"
}
}
}
}
@@ -8040,6 +8057,17 @@
}
}
},
"user.sendEmailCodeRequest": {
"type": "object",
"required": [
"email"
],
"properties": {
"email": {
"type": "string"
}
}
},
"user.updateProfileRequest": {
"type": "object",
"properties": {
+18
View File
@@ -1363,6 +1363,13 @@ definitions:
- password
- username
type: object
user.sendEmailCodeRequest:
properties:
email:
type: string
required:
- email
type: object
user.updateProfileRequest:
properties:
avatar_url:
@@ -4937,6 +4944,13 @@ paths:
consumes:
- application/json
description: 向指定邮箱发送验证码(用于注册场景)
parameters:
- description: 目标邮箱
in: body
name: request
required: true
schema:
$ref: '#/definitions/user.sendEmailCodeRequest'
produces:
- application/json
responses:
@@ -4948,6 +4962,10 @@ paths:
description: 参数错误
schema:
$ref: '#/definitions/response.Any'
"500":
description: 发送失败
schema:
$ref: '#/definitions/response.Any'
summary: 发送邮箱验证码
tags:
- user