修复若干bug

This commit is contained in:
hero920103 committed 2026-11-09 11:42:23 +08:00
1 parent ee49ef15b5
commit 244b4bd9fd
12 files changed
+329 -83

No files matched your search

+10 -3
View File
@@ -436,16 +436,23 @@ func scanAndSendReminders() {
for i := range list {
reminder := &list[i]
// 3.1 获取日程信息(主要拿 Content,Title 统一为 "日程提醒")
// 3.1 获取日程信息;消息内容统一拼接为【标题】内容,内容为空时用兜底文案,保证永远有提示内容
var schedule models.BackendSchedule
err := models.Orm.QueryTable(new(models.BackendSchedule)).
Filter("id", reminder.ScheduleID).
One(&schedule)
title := "日程提醒"
content := "您有一个待处理的日程时间已到,请注意查收。"
body := ""
if err == nil {
content = schedule.Content
if t := strings.TrimSpace(schedule.Title); t != "" {
title = t
}
body = strings.TrimSpace(schedule.Content)
}
if body == "" {
body = "您有一个待处理的日程时间已到,请注意查收。"
}
content := fmt.Sprintf("【%s】%s", title, body)
sender, ok := senders[reminder.RemindChannel]
if !ok {