wangpengfei
2023-08-07 9c2489c0c360c8dda36d3cbe1dba79222096b2dd
service/serviceFollowup.go
@@ -1,6 +1,7 @@
package service
import (
   "aps_crm/constvar"
   "aps_crm/model"
   "aps_crm/pkg/ecode"
)
@@ -31,15 +32,6 @@
   return ecode.OK
}
func (FollowupService) GetServiceFollowupList(page, pageSize int, keyword string) ([]*model.ServiceFollowup, int64, int) {
   // get contact list
   contacts, total, err := model.NewServiceFollowupSearch().SetKeyword(keyword).SetPage(page, pageSize).FindAll()
   if err != nil {
      return nil, 0, ecode.ServiceFollowupListErr
   }
   return contacts, total, ecode.OK
}
func (FollowupService) DeleteServiceFollowup(ids []int) int {
   // delete client
   err := model.NewServiceFollowupSearch().SetIds(ids).Delete()
@@ -48,3 +40,15 @@
   }
   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()
   if err != nil {
      return nil, 0, ecode.ServiceFollowupListErr
   }
   return contacts, total, ecode.OK
}