feat: add task pin #89

This commit is contained in:
duorameng
2026-04-29 18:16:33 +08:00
parent 685d79b54e
commit 1c4aea9111
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -108,7 +108,7 @@ func (ts *TaskService) GetTasksWithPagination(page, pageSize int, name string, a
}
query.Count(&total)
query.Order("pin_type DESC, updated_at DESC").Offset((page - 1) * pageSize).Limit(pageSize).Find(&tasks)
query.Order("pin_type DESC, created_at DESC").Offset((page - 1) * pageSize).Limit(pageSize).Find(&tasks)
return tasks, total
}