feat: add delete log

This commit is contained in:
engigu
2026-02-27 09:02:00 +08:00
parent 789a538557
commit d4f1defdeb
7 changed files with 187 additions and 10 deletions
+4 -1
View File
@@ -49,7 +49,7 @@ func (ts *TaskService) GetTasks() []models.Task {
}
// GetTasksWithPagination 分页获取任务列表
func (ts *TaskService) GetTasksWithPagination(page, pageSize int, name string, agentID *uint, tags string) ([]models.Task, int64) {
func (ts *TaskService) GetTasksWithPagination(page, pageSize int, name string, agentID *uint, tags string, taskType string) ([]models.Task, int64) {
var tasks []models.Task
var total int64
@@ -60,6 +60,9 @@ func (ts *TaskService) GetTasksWithPagination(page, pageSize int, name string, a
if tags != "" {
query = query.Where("tags LIKE ?", "%"+tags+"%")
}
if taskType != "" {
query = query.Where("type = ?", taskType)
}
if agentID != nil {
query = query.Where("agent_id = ?", *agentID)
}