feat(medication): 实现用药提醒短信和电话提醒功能
- 新增 intc-common-message 消息服务模块 - 阿里云短信服务 SmsService(用药提醒、漏服提醒、家属通知) - 阿里云语音服务 VoiceService(用药提醒、漏服提醒电话) - HealthPerson 添加 phone 手机号字段 - MedicationPlan 添加 remind_type 提醒方式字段(1-短信 2-电话 3-短信+电话) - MedicationRemindJob 完善提醒逻辑: - 定时扫描待服药任务发送提醒 - 超时30分钟未服药发送加强提醒 - 配置家属通知功能 - 新增数据库更新SQL和Nacos配置示例文件
This commit is contained in:
16
sql/update_medication_remind.sql
Normal file
16
sql/update_medication_remind.sql
Normal 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;
|
||||
Reference in New Issue
Block a user