Merge pull request '任务日志自动跟随最新事件' (#2) from fix/task-log-follow into main

Reviewed-on: http://git.xhmcl.com/xhgit/webup-cloud/pulls/2
This commit is contained in:
xhgit committed 2026-11-07 10:53:32 +00:00
commit 6b5aea0a0d
3 files changed
+53 -8

No files matched your search

@@ -68,8 +68,9 @@ public class TaskController {
@AuthenticationPrincipal SecurityConfig.Identity who, @PathVariable UUID id) {
tasks.find(id, who.id());
return db.queryForList(
"SELECT * FROM ai_task_steps WHERE task_id=? AND event NOT IN"
+ " ('AUTO_SETTLEMENT','MANUAL_SETTLEMENT') ORDER BY created_at,id LIMIT 1000",
"SELECT * FROM (SELECT * FROM ai_task_steps WHERE task_id=? AND event NOT IN"
+ " ('AUTO_SETTLEMENT','MANUAL_SETTLEMENT') ORDER BY created_at DESC,id DESC LIMIT"
+ " 1000) AS recent ORDER BY created_at,id",
id);
}