feat(medication): 实现用药提醒短信和电话提醒功能

- 新增 intc-common-message 消息服务模块
- 阿里云短信服务 SmsService(用药提醒、漏服提醒、家属通知)
- 阿里云语音服务 VoiceService(用药提醒、漏服提醒电话)
- HealthPerson 添加 phone 手机号字段
- MedicationPlan 添加 remind_type 提醒方式字段(1-短信 2-电话 3-短信+电话)
- MedicationRemindJob 完善提醒逻辑:
  - 定时扫描待服药任务发送提醒
  - 超时30分钟未服药发送加强提醒
  - 配置家属通知功能
- 新增数据库更新SQL和Nacos配置示例文件
This commit is contained in:
bot5
2026-03-29 18:26:53 +08:00
parent f0a61a5314
commit 846cd3141e
19 changed files with 662 additions and 12 deletions

View File

@@ -0,0 +1,16 @@
-- 用药提醒功能更新SQL
-- 1. 给health_person添加phone字段
-- 2. 给medication_plan添加remind_type字段
-- 1. health_person表添加phone字段
ALTER TABLE health_person ADD COLUMN IF NOT EXISTS phone VARCHAR(20);
COMMENT ON COLUMN health_person.phone IS '手机号';
-- 2. medication_plan表添加remind_type字段
ALTER TABLE medication_plan ADD COLUMN IF NOT EXISTS remind_type INTEGER DEFAULT 1;
COMMENT ON COLUMN medication_plan.remind_type IS '提醒方式1-短信 2-电话 3-短信+电话';
-- 更新已有数据,默认提醒方式为短信
UPDATE medication_plan SET remind_type = 1 WHERE remind_type IS NULL AND remind_enabled = 1;