| | |
| | | // @Tags ServiceFollowup |
| | | // @Summary 更新服务跟进 |
| | | // @Produce application/json |
| | | // @Param object body request.UpdateServiceFollowup true "查询参数" |
| | | // @Success 200 {object} contextx.Response{} |
| | | // @Param object body request.UpdateServiceFollowup true "查询参数" |
| | | // @Success 200 {object} contextx.Response{} |
| | | // @Router /api/serviceFollowup/update [put] |
| | | func (s *ServiceFollowupApi) Update(c *gin.Context) { |
| | | var params request.UpdateServiceFollowup |
| | |
| | | ctx.Fail(errCode) |
| | | return |
| | | } |
| | | |
| | | serviceFollowup.Id = params.Id |
| | | |
| | | errCode = serviceFollowupService.UpdateServiceFollowup(&serviceFollowup) |
| | | if errCode != ecode.OK { |
| | |
| | | |
| | | // checkServiceFollowupParams |
| | | func checkServiceFollowupParams(serviceFollowup request.ServiceFollowup) (errCode int, serviceFollowupModel model.ServiceFollowup) { |
| | | if serviceFollowup.Number == "" { |
| | | return ecode.InvalidParams, serviceFollowupModel |
| | | } |
| | | |
| | | if serviceFollowup.MemberId == 0 { |
| | | return ecode.InvalidParams, serviceFollowupModel |
| | | } |
| | | //if serviceFollowup.Number == "" { |
| | | // return ecode.InvalidParams, serviceFollowupModel |
| | | //} |
| | | // |
| | | //if serviceFollowup.MemberId == 0 { |
| | | // return ecode.InvalidParams, serviceFollowupModel |
| | | //} |
| | | |
| | | serviceFollowupModel = model.ServiceFollowup{ |
| | | ClientId: serviceFollowup.ClientId, |
| | | Number: serviceFollowup.Number, |
| | | ContactId: serviceFollowup.ContactId, |
| | | ServiceId: serviceFollowup.ServiceId, |
| | | MemberId: serviceFollowup.MemberId, |
| | | PlanId: serviceFollowup.PlanId, |
| | | Satisfaction: serviceFollowup.Satisfaction, |
| | | TimelyRate: serviceFollowup.TimelyRate, |
| | | SolveRate: serviceFollowup.SolveRate, |
| | | IsVisit: serviceFollowup.IsVisit, |
| | | OldMemberId: serviceFollowup.OldMemberId, |
| | | Remark: serviceFollowup.Remark, |
| | | File: serviceFollowup.File, |
| | | ClientId: serviceFollowup.ClientId, |
| | | Number: serviceFollowup.Number, |
| | | ContactId: serviceFollowup.ContactId, |
| | | ServiceId: serviceFollowup.ServiceId, |
| | | MemberId: serviceFollowup.MemberId, |
| | | PlanId: serviceFollowup.PlanId, |
| | | SatisfactionId: serviceFollowup.Satisfaction, |
| | | TimelyRateId: serviceFollowup.TimelyRate, |
| | | SolveRateId: serviceFollowup.SolveRate, |
| | | IsVisitId: serviceFollowup.IsVisit, |
| | | OldMemberId: serviceFollowup.OldMemberId, |
| | | Remark: serviceFollowup.Remark, |
| | | File: serviceFollowup.File, |
| | | } |
| | | |
| | | return ecode.OK, serviceFollowupModel |