feat: 添加Telegram Bot通知功能
Some checks failed
Deploy to Production / Build and Test (push) Has been cancelled
Deploy to Production / Deploy to Server (push) Has been cancelled

 新功能:
- 添加Telegram Bot通知支持
- 账目记录自动推送到Telegram
- 支持多个Bot配置管理
- 支持群组和个人通知

📊 数据库:
- 新增telegram_notification_configs表
- 存储Bot配置和通知类型

🔧 后端API:
- GET /api/telegram/notifications - 获取所有配置
- POST /api/telegram/notifications - 创建配置
- PUT /api/telegram/notifications/:id - 更新配置
- DELETE /api/telegram/notifications/:id - 删除配置
- POST /api/telegram/test - 测试Bot配置

💬 通知功能:
- 自动发送账目记录通知
- 包含交易类型、金额、分类、账户等信息
- 支持格式化显示(类型图标、状态标识)
- 配置创建时自动测试有效性

📝 文档:
- 添加完整的使用说明文档
- API接口说明和示例
- 常见问题解答
This commit is contained in:
你的用户名
2025-11-04 23:15:19 +08:00
parent faafcf926a
commit a4e4168c00
13 changed files with 801 additions and 0 deletions

3
.codex/auth.json Normal file
View File

@@ -0,0 +1,3 @@
{
"OPENAI_API_KEY": "cr_c9719a63cd3fbcf2a7043da03ccdef29e1e48ab4632e57db68ef1c73b2f6c9ec"
}

35
.codex/config.toml Normal file
View File

@@ -0,0 +1,35 @@
# Codex 临时配置(基于全局配置)
# SessionID: 4795f195-3362-4043-80c3-10b1f9ce9dec, ChatID: -4846353145
# 沙盒和权限配置(强制覆盖)
sandbox_mode = "danger-full-access"
approval_policy = "never"
model_provider = "crs"
model = "gpt-5-codex"
model_reasoning_effort = "high"
disable_response_storage = true
preferred_auth_method = "apikey"
[model_providers.crs]
name = "crs"
base_url = "https://ktapi.cc/openai"
wire_api = "responses"
ask_for_approval = "never"
sandbox = "danger-full-access"
[projects."/Users/hahaha"]
trust_level = "trusted"
ask_for_approval = "never"
sandbox = "danger-full-access"
[mcp_servers.funstat-mcp]
url = "http://172.16.74.159:8091/sse"
# 会话特定的 MCP 服务器配置
[mcp_servers.agentapi]
command = "/Users/hahaha/agentapi/agentapi"
args = ["proxy", "http://localhost:8089/mcp/sse?sessionID=4795f195-3362-4043-80c3-10b1f9ce9dec&chatID=-4846353145"]

View File

@@ -0,0 +1,3 @@
{"timestamp":"2025-11-04T12:59:55.520Z","type":"session_meta","payload":{"id":"019a4ef3-dade-79b3-a9d9-84a2cb7f22a0","timestamp":"2025-11-04T12:59:55.486Z","cwd":"/Users/hahaha/projects/kt-financial-system","originator":"codex_cli_rs","cli_version":"0.53.0","instructions":"<system-reminder>\n- Search documentation for knowledge first: Use mrdoc_search when you need project background knowledge, internal knowledge, or cross-project documentation to get relevant technical solutions and historical experience. After modifying modules, you must create or update MrDoc documentation to accumulate and transfer knowledge.\n- Create/update documentation must use mrdoc related MCP tools\n</system-reminder>\n- Think deeply and search online when solving problems (high-IQ genius hacker mindset)\n- Memory is only saved in the project folder\n- Use the same language as the user for thinking and answering\n- Code style: Comments are documentation\n","source":"vscode","model_provider":"crs","git":{"commit_hash":"6a11d8a70e918635afad990c108d836207947bc2","branch":"main","repository_url":"https://doudou:4003483870c48a22d637678b35b157d19d57c2ee@gitea.ktyun.cc/chenjiangjiang/kt-financial-system.git"}}}
{"timestamp":"2025-11-04T12:59:55.538Z","type":"response_item","payload":{"type":"message","role":"user","content":[{"type":"input_text","text":"<user_instructions>\n\n<system-reminder>\n- Search documentation for knowledge first: Use mrdoc_search when you need project background knowledge, internal knowledge, or cross-project documentation to get relevant technical solutions and historical experience. After modifying modules, you must create or update MrDoc documentation to accumulate and transfer knowledge.\n- Create/update documentation must use mrdoc related MCP tools\n</system-reminder>\n- Think deeply and search online when solving problems (high-IQ genius hacker mindset)\n- Memory is only saved in the project folder\n- Use the same language as the user for thinking and answering\n- Code style: Comments are documentation\n\n\n</user_instructions>"}]}}
{"timestamp":"2025-11-04T12:59:55.538Z","type":"response_item","payload":{"type":"message","role":"user","content":[{"type":"input_text","text":"<environment_context>\n <cwd>/Users/hahaha/projects/kt-financial-system</cwd>\n <approval_policy>never</approval_policy>\n <sandbox_mode>danger-full-access</sandbox_mode>\n <network_access>enabled</network_access>\n <shell>zsh</shell>\n</environment_context>"}]}}