fix: 修复19个Bug (P0-P3) — 持续性调试第7轮发现的问题

P0 (5): crypto/rand session ID, TTS fallback可达性, goroutine defer recover, adminAuth前缀修正
P1 (5): 普通用户密码验证, context传递, priority clamp, 超时重试, 自主思考速率限制
P2 (4): Briefing AI降级, 前端消息类型渲染, Docker Compose补全, PWA 192图标
P3 (5): goroutine错误处理, .gitignore完善, reminder created_at, voice Dockerfile, Go版本更新
This commit is contained in:
2026-05-20 13:30:32 +08:00
parent baaf90fc47
commit 4b35736f73
37 changed files with 556 additions and 118 deletions
@@ -71,10 +71,13 @@ func (s *ReminderStore) migrate() error {
// CreateReminder 创建新提醒
func (s *ReminderStore) CreateReminder(r *Reminder) error {
if r.CreatedAt.IsZero() {
r.CreatedAt = time.Now()
}
_, err := s.db.Exec(
`INSERT INTO reminders (id, user_id, title, description, remind_at, status, repeat_type, session_id)
VALUES ($1, $2, $3, $4, $5, $6, $7, $8)`,
r.ID, r.UserID, r.Title, r.Description, r.RemindAt, r.Status, r.RepeatType, r.SessionID,
`INSERT INTO reminders (id, user_id, title, description, remind_at, status, created_at, repeat_type, session_id)
VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9)`,
r.ID, r.UserID, r.Title, r.Description, r.RemindAt, r.Status, r.CreatedAt, r.RepeatType, r.SessionID,
)
if err != nil {
return fmt.Errorf("创建提醒失败: %w", err)