feat(iit-manager): Add WeChat Official Account integration for patient notifications

Features:
- PatientWechatCallbackController for URL verification and message handling
- PatientWechatService for template and customer messages
- Support for secure mode (message encryption/decryption)
- Simplified route /wechat/patient/callback for WeChat config
- Event handlers for subscribe/unsubscribe/text messages
- Template message for visit reminders

Technical details:
- Reuse @wecom/crypto for encryption (compatible with Official Account)
- Relaxed Fastify schema validation to prevent early request blocking
- Access token caching (7000s with 5min pre-refresh)
- Comprehensive logging for debugging

Testing: Local URL verification passed, ready for SAE deployment

Status: Code complete, waiting for WeChat platform configuration
This commit is contained in:
2026-01-04 22:53:42 +08:00
parent dfc472810b
commit b31255031e
167 changed files with 3055 additions and 2 deletions

View File

@@ -876,5 +876,6 @@ ACR镜像仓库

View File

@@ -1365,3 +1365,4 @@ SAE应用配置:

View File

@@ -1181,3 +1181,4 @@ docker exec -e PGPASSWORD="密码" ai-clinical-postgres psql -h RDS地址 -U air

View File

@@ -592,3 +592,4 @@ scripts/*.ts

View File

@@ -280,3 +280,4 @@ Node.js后端部署成功后

View File

@@ -503,3 +503,4 @@ Node.js后端 (SAE) ← http://172.17.173.88:3001

View File

@@ -218,3 +218,4 @@ curl http://localhost:3001/health

View File

@@ -256,3 +256,4 @@ npm run dev

View File

@@ -480,3 +480,4 @@ pgm-2zex1m2y3r23hdn5.pg.rds.aliyuncs.com:5432

View File

@@ -1808,3 +1808,4 @@ curl http://8.140.53.236/

View File

@@ -356,3 +356,4 @@ crpi-cd5ij4pjt65mweeo.cn-beijing.personal.cr.aliyuncs.com/ai-clinical/backend-se

View File

@@ -678,3 +678,4 @@ docker login --username=gofeng117@163.com \

View File

@@ -487,5 +487,6 @@ NAT网关成本¥100/月,对初创团队是一笔开销