MCPcopy Create free account
hub / github.com/aiprodcoder/MIXAPI / GetAllTask

Function GetAllTask

controller/task.go:228–249  ·  view source on GitHub ↗
(c *gin.Context)

Source from the content-addressed store, hash-verified

226}
227
228func GetAllTask(c *gin.Context) {
229 pageInfo := common.GetPageQuery(c)
230
231 startTimestamp, _ := strconv.ParseInt(c.Query("start_timestamp"), 10, 64)
232 endTimestamp, _ := strconv.ParseInt(c.Query("end_timestamp"), 10, 64)
233 // 解析其他查询参数
234 queryParams := model.SyncTaskQueryParams{
235 Platform: constant.TaskPlatform(c.Query("platform")),
236 TaskID: c.Query("task_id"),
237 Status: c.Query("status"),
238 Action: c.Query("action"),
239 StartTimestamp: startTimestamp,
240 EndTimestamp: endTimestamp,
241 ChannelID: c.Query("channel_id"),
242 }
243
244 items := model.TaskGetAllTasks(pageInfo.GetStartIdx(), pageInfo.GetPageSize(), queryParams)
245 total := model.TaskCountAllTasks(queryParams)
246 pageInfo.SetTotal(int(total))
247 pageInfo.SetItems(items)
248 common.ApiSuccess(c, pageInfo)
249}
250
251func GetUserTask(c *gin.Context) {
252 pageInfo := common.GetPageQuery(c)

Callers

nothing calls this directly

Calls 9

GetPageQueryFunction · 0.92
TaskPlatformTypeAlias · 0.92
TaskGetAllTasksFunction · 0.92
TaskCountAllTasksFunction · 0.92
ApiSuccessFunction · 0.92
GetStartIdxMethod · 0.80
GetPageSizeMethod · 0.80
SetTotalMethod · 0.80
SetItemsMethod · 0.80

Tested by

no test coverage detected