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

@@ -633,5 +633,6 @@ import { logger } from '../../../../common/logging/index.js';

View File

@@ -436,5 +436,6 @@ import { ChatContainer } from '@/shared/components/Chat';

View File

@@ -346,5 +346,6 @@ const initialMessages = defaultMessages.length > 0 ? defaultMessages : [{

View File

@@ -634,5 +634,6 @@ http://localhost:5173/data-cleaning/tool-c

View File

@@ -422,5 +422,6 @@ Docs: docs/03-业务模块/DC-数据清洗整理/06-开发记录/DC模块重建

View File

@@ -295,5 +295,6 @@ ConflictDetectionService // 冲突检测(字段级对比)

View File

@@ -459,5 +459,6 @@ Tool B后端代码**100%复用**了平台通用能力层,无任何重复开发

View File

@@ -236,5 +236,6 @@ $ node scripts/check-dc-tables.mjs