feat(push-task): connect notification module with task module

- Add task_type to w_push_events table and GORM models.
- Implement OnTaskCompleted callback hook in task executor to avoid circular dependencies.
- Implement task listener in push package to trigger notifications on task completion.
- Automatically resolve User objects from payload and results.
- Enhance UI to select task completed events and preview default templates.
- Update Swagger documentation.
This commit is contained in:
ryan
2026-06-15 15:12:02 +08:00
parent de58b118b4
commit 2a3b9f8a5f
12 changed files with 540 additions and 60 deletions
+9 -4
View File
@@ -1458,7 +1458,7 @@ const docTemplate = `{
"SessionCookie": []
}
],
"description": "绑定系统内置事件、推送渠道、接收目标并创建通知事件配置,需要管理员权限",
"description": "绑定系统内置事件或异步任务、推送渠道、接收目标并创建通知事件配置,需要管理员权限",
"consumes": [
"application/json"
],
@@ -6012,6 +6012,10 @@ const docTemplate = `{
"type": "string"
}
},
"task_type": {
"description": "关联的异步任务类型",
"type": "string"
},
"template": {
"description": "消息模板 JSON",
"type": "string"
@@ -6513,9 +6517,6 @@ const docTemplate = `{
},
"push.CreateEventRequest": {
"type": "object",
"required": [
"event_key"
],
"properties": {
"channels": {
"type": "array",
@@ -6535,6 +6536,10 @@ const docTemplate = `{
"type": "string"
}
},
"task_type": {
"description": "关联的异步任务类型",
"type": "string"
},
"template": {
"type": "string"
}