feat(schedule): support KOL subscription targets and random time windows
Frontend CI / Frontend (push) Successful in 3m37s
Backend CI / Backend (push) Failing after 6m47s

Extend schedule tasks to dispatch KOL subscription prompts in addition
to prompt rules, add daily/weekly scheduling with fixed or random time
windows, and track dispatch outcomes (last run, status, consecutive
failures).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-22 23:51:45 +08:00
parent 9cc6537e68
commit c28c4f1419
20 changed files with 3034 additions and 329 deletions
@@ -39,6 +39,14 @@ func (h *ScheduleTaskHandler) List(c *gin.Context) {
params.PromptRuleID = &rid
}
}
if v := c.Query("subscription_prompt_id"); v != "" {
if rid, err := strconv.ParseInt(v, 10, 64); err == nil {
params.SubscriptionPromptID = &rid
}
}
if v := c.Query("target_type"); v != "" {
params.TargetType = &v
}
if v := c.Query("status"); v != "" {
params.Status = &v
}