fix
wangpengfei
2023-07-28 b4400a06b5f801bc7a85320680d0b6c45c547ff0
service/client.go
@@ -30,16 +30,6 @@
   return ecode.OK
}
func (ClientService) GetClientList() (int, []*model.Client) {
   // get client list
   clients, err := model.NewClientSearch(nil).Find()
   if err != nil {
      return ecode.ClientListErr, nil
   }
   return ecode.OK, clients
}
// CheckClientExist check client exist
func CheckClientExist(id int) int {
   _, err := model.NewClientSearch(nil).SetId(id).First()
@@ -65,3 +55,12 @@
   return ecode.OK
}
func (ClientService) GetClientList(page, pageSize int, keyword string) ([]*model.Client, int64, int) {
   // get contact list
   contacts, total, err := model.NewClientSearch(nil).SetKeyword(keyword).SetPage(page, pageSize).Find()
   if err != nil {
      return nil, 0, ecode.ClientListErr
   }
   return contacts, total, ecode.OK
}