wangpengfei
2023-07-21 c6d19b35b74d020b3ca28d33101d8f1695e39945
api/v1/serviceFollowup.go
@@ -71,8 +71,8 @@
//   @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
@@ -86,6 +86,8 @@
      ctx.Fail(errCode)
      return
   }
   serviceFollowup.Id = params.Id
   errCode = serviceFollowupService.UpdateServiceFollowup(&serviceFollowup)
   if errCode != ecode.OK {
@@ -122,28 +124,28 @@
// 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