| | |
| | | |
| | | taskResponse.Prompt = conf.Conf.Prompt |
| | | taskResponse.ChannelAmount = channelAmount |
| | | taskResponse.TaskCount = service.NewTaskService().NewTaskCount() |
| | | |
| | | ctx.OkWithDetailed(taskResponse) |
| | | } |
| | |
| | | ctx.Fail(code) |
| | | return |
| | | } |
| | | if procedure.Status == model.ProcedureStatusFinished { |
| | | ctx.Ok() |
| | | return |
| | | } |
| | | if procedure.Status != model.ProcedureStatusProcessing { |
| | | ctx.Fail(ecode.ParamsErr) |
| | | return |
| | | } |
| | | err := service.NewTaskService().UpdateProcedureStatus(nil, id, model.ProcedureStatusFinished, procedure.Channel) |
| | | if err != nil { |
| | | logx.Errorf("UpdateProcedureStatus err: %v", err.Error()) |