fix
wangpengfei
2023-08-02 46f410ae18f22f5e9a8368f0ea7c721863d18fce
service/contact.go
@@ -33,20 +33,6 @@
   return ecode.OK
}
func (ContactService) DeleteContact(id int) int {
   // check contact exist
   _, err := model.NewContactSearch(nil).SetId(id).First()
   if err != nil {
      return ecode.ContactNotExist
   }
   // delete contact
   err = model.NewContactSearch(nil).SetId(id).Delete()
   if err != nil {
      return ecode.ContactDeleteErr
   }
   return ecode.OK
}
func (ContactService) UpdateContact(contact *model.Contact) int {
   // check contact exist
@@ -125,3 +111,12 @@
   }
   return contacts, total, ecode.OK
}
func (ContactService) DeleteContact (ids []int) int {
   // delete client
   err := model.NewContactSearch(nil).SetIds(ids).Delete()
   if err != nil {
      return ecode.ContactDeleteErr
   }
   return ecode.OK
}