fix
zhangqian
2023-08-11 4e8d946913165901f25bb79add011d3c2df19792
service/serviceFollowup.go
@@ -17,19 +17,6 @@
   return ecode.OK
}
func (FollowupService) DeleteServiceFollowup(id int) int {
   _, err := model.NewServiceFollowupSearch().SetId(id).Find()
   if err != nil {
      return ecode.ServiceFollowupNotExist
   }
   err = model.NewServiceFollowupSearch().SetId(id).Delete()
   if err != nil {
      return ecode.ServiceFollowupNotExist
   }
   return ecode.OK
}
func (FollowupService) UpdateServiceFollowup(serviceFollowup *model.ServiceFollowup) int {
   // check serviceFollowup exist
   _, err := model.NewServiceFollowupSearch().SetId(serviceFollowup.Id).Find()
@@ -45,12 +32,23 @@
   return ecode.OK
}
func (FollowupService) DeleteServiceFollowup(ids []int) int {
   // delete client
   err := model.NewServiceFollowupSearch().SetIds(ids).Delete()
   if err != nil {
      return ecode.ServiceFollowupDeleteErr
   }
   return ecode.OK
}
func (FollowupService) GetServiceFollowupList(page, pageSize int, keywordType constvar.ServiceFollowupKeywordType, keyword string) ([]*model.ServiceFollowup, int64, int) {
   // get contact list
   contacts, total, err := model.NewServiceFollowupSearch().
      SetKeywordType(keywordType).
      SetKeyword(keyword).
      SetPage(page, pageSize).FindAll()
      SetPage(page, pageSize).
      SetPreload(true).
      FindAll()
   if err != nil {
      return nil, 0, ecode.ServiceFollowupListErr
   }