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
68 lines
730 B
PowerShell
68 lines
730 B
PowerShell
# DC模块数据库同步脚本
|
||
Write-Host "====================================" -ForegroundColor Cyan
|
||
Write-Host "DC模块数据库表同步" -ForegroundColor Cyan
|
||
Write-Host "====================================" -ForegroundColor Cyan
|
||
Write-Host ""
|
||
|
||
Set-Location $PSScriptRoot
|
||
|
||
Write-Host "1️⃣ 生成Prisma Client..." -ForegroundColor Yellow
|
||
npm run prisma:generate
|
||
|
||
Write-Host ""
|
||
Write-Host "2️⃣ 推送Schema到数据库..." -ForegroundColor Yellow
|
||
npx prisma db push --accept-data-loss
|
||
|
||
Write-Host ""
|
||
Write-Host "3️⃣ 检查表是否创建成功..." -ForegroundColor Yellow
|
||
npx tsx check-dc-database.ts
|
||
|
||
Write-Host ""
|
||
Write-Host "✅ 完成!" -ForegroundColor Green
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|