From dac214fa72dc2974954a4d8ee934695f548ad155 Mon Sep 17 00:00:00 2001
From: wangpengfei <274878379@qq.com>
Date: 星期三, 02 八月 2023 14:14:30 +0800
Subject: [PATCH] fix
---
service/contact.go | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/service/contact.go b/service/contact.go
index 8333495..8a3e761 100644
--- a/service/contact.go
+++ b/service/contact.go
@@ -48,7 +48,6 @@
return ecode.OK
}
-
func (ContactService) UpdateContact(contact *model.Contact) int {
// check contact exist
_, err := model.NewContactSearch(nil).SetId(contact.Id).First()
@@ -118,11 +117,11 @@
return ecode.OK
}
-func (ContactService) GetContactList(page, pageSize int, keyword string) ([]*model.ContactDetail, int) {
+func (ContactService) GetContactList(page, pageSize int, keyword string) ([]*model.ContactDetail, int64, int) {
// get contact list
- contacts, err := model.NewContactSearch(nil).SetKeyword(keyword).SetPage(page, pageSize).FindAll()
+ contacts, total, err := model.NewContactSearch(nil).SetKeyword(keyword).SetPage(page, pageSize).FindAll()
if err != nil {
- return nil, ecode.ContactListErr
+ return nil, 0, ecode.ContactListErr
}
- return contacts, ecode.OK
+ return contacts, total, ecode.OK
}
--
Gitblit v1.8.0