This commit is contained in:
苏尹岚
2020-12-17 11:17:54 +08:00
parent c7d87be485
commit d9059263ee
3 changed files with 45 additions and 0 deletions

View File

@@ -395,3 +395,23 @@ func (c *JobController) RefreshJobStatus() {
return retVal, "", err
})
}
// @Title 修改任务标签
// @Description 修改任务标签
// @Param token header string true "认证token"
// @Param jobIDs formData string true "任务IDs"
// @Param span formData int true "标签1为置顶2为推荐"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /UpdateJobSpan [post]
func (c *JobController) UpdateJobSpan() {
c.callUpdateJobSpan(func(params *tJobUpdateJobSpanParams) (retVal interface{}, errCode string, err error) {
var (
jobIDs []int
)
if err = jxutils.Strings2Objs(params.JobIDs, &jobIDs); err == nil {
err = cms.UpdateJobSpan(params.Ctx, jobIDs, params.Span)
}
return retVal, "", err
})
}