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

@@ -35,3 +35,4 @@

View File

@@ -66,3 +66,4 @@ Desktop.ini

View File

@@ -367,3 +367,4 @@ docker-compose -f docker-compose.prod.yml up -d

View File

@@ -128,3 +128,4 @@ volumes:

View File

@@ -126,3 +126,4 @@ volumes:

View File

@@ -62,3 +62,4 @@ PMA_UPLOAD_LIMIT=50M

View File

@@ -70,3 +70,4 @@ Write-Host ""

View File

@@ -48,3 +48,4 @@ try {

View File

@@ -61,3 +61,4 @@ Write-Host ""

View File

@@ -24,3 +24,4 @@ if ($result) {

View File

@@ -46,3 +46,4 @@ if ($LASTEXITCODE -eq 0) {

View File

@@ -32,3 +32,4 @@ if ($LASTEXITCODE -eq 0) {