zhangqian
2023-08-03 a89c3af49d0be3e635ef13b3bd3dd9410e4d6d46
api/v1/serviceFollowup.go
@@ -98,30 +98,6 @@
   ctx.Ok()
}
// List
//
//   @Tags      ServiceFollowup
//   @Summary   服务跟进列表
//   @Produce   application/json
//   @Success   200   {object}   contextx.Response{data=response.ServiceFollowupResponse}
//   @Router      /api/serviceFollowup/list [get]
func (s *ServiceFollowupApi) List(c *gin.Context) {
   ctx, ok := contextx.NewContext(c, nil)
   if !ok {
      return
   }
   list, errCode := serviceFollowupService.GetServiceFollowupList()
   if errCode != ecode.OK {
      ctx.Fail(errCode)
      return
   }
   ctx.OkWithDetailed(response.ServiceFollowupResponse{
      List: list,
   })
}
// checkServiceFollowupParams
func checkServiceFollowupParams(serviceFollowup request.ServiceFollowup) (errCode int, serviceFollowupModel model.ServiceFollowup) {
   //if serviceFollowup.Number == "" {
@@ -142,7 +118,7 @@
      SatisfactionId: serviceFollowup.Satisfaction,
      TimelyRateId:   serviceFollowup.TimelyRate,
      SolveRateId:    serviceFollowup.SolveRate,
      IsVisit:        serviceFollowup.IsVisit,
      IsVisitId:      serviceFollowup.IsVisit,
      OldMemberId:    serviceFollowup.OldMemberId,
      Remark:         serviceFollowup.Remark,
      File:           serviceFollowup.File,
@@ -150,3 +126,30 @@
   return ecode.OK, serviceFollowupModel
}
// List
//
//   @Tags      ServiceFollowup
//   @Summary   回访单管理列表
//   @Produce   application/json
//   @Param      object   body      request.GetServiceFollowupList   true   "参数"
//   @Success   200      {object}   contextx.Response{data=response.ServiceFollowupResponse}
//   @Router      /api/serviceFollowup/list [post]
func (con *ServiceFollowupApi) List(c *gin.Context) {
   var params request.GetServiceFollowupList
   ctx, ok := contextx.NewContext(c, &params)
   if !ok {
      return
   }
   serviceFollowups, total, errCode := serviceFollowupService.GetServiceFollowupList(params.Page, params.PageSize, params.KeywordType, params.Keyword)
   if errCode != ecode.OK {
      ctx.Fail(errCode)
      return
   }
   ctx.OkWithDetailed(response.ServiceFollowupResponse{
      List:  serviceFollowups,
      Count: int(total),
   })
}