...
|
...
|
@@ -215,3 +215,36 @@ func (c *TaskController) SaveTaskLevel() { |
|
|
err = srv.SaveTaskLevel(paramReq)
|
|
|
c.Response(nil, err)
|
|
|
}
|
|
|
|
|
|
// 取消关注的任务列表
|
|
|
func (c *TaskController) ListTaskIgnore() {
|
|
|
srv := service.NewTaskService()
|
|
|
paramReq := &command.SearchTaskCommand{}
|
|
|
err := c.BindJSON(paramReq)
|
|
|
if err != nil {
|
|
|
e := application.ThrowError(application.ARG_ERROR, "json 解析错误"+err.Error())
|
|
|
c.Response(nil, e)
|
|
|
return
|
|
|
}
|
|
|
userReq := middlewares.GetUser(c.Ctx)
|
|
|
paramReq.CompanyId = int(userReq.CompanyId)
|
|
|
result, err := srv.ListTaskIgnore(paramReq)
|
|
|
c.Response(result, err)
|
|
|
}
|
|
|
|
|
|
// 从取消关注的任务列表中移除
|
|
|
func (c *TaskController) CancelIgnore() {
|
|
|
srv := service.NewTaskService()
|
|
|
paramReq := &command.CancelIgnoreCommand{}
|
|
|
err := c.BindJSON(paramReq)
|
|
|
if err != nil {
|
|
|
e := application.ThrowError(application.ARG_ERROR, "json 解析错误"+err.Error())
|
|
|
c.Response(nil, e)
|
|
|
return
|
|
|
}
|
|
|
userReq := middlewares.GetUser(c.Ctx)
|
|
|
paramReq.CompanyId = int(userReq.CompanyId)
|
|
|
_, err = srv.CancleTaskIgnore(paramReq)
|
|
|
c.Response(nil, err)
|
|
|
|
|
|
} |
...
|
...
|
|