(c *gin.Context)
| 226 | } |
| 227 | |
| 228 | func 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 | |
| 251 | func GetUserTask(c *gin.Context) { |
| 252 | pageInfo := common.GetPageQuery(c) |
nothing calls this directly
no test coverage detected