From 74f698acff298c45e436824e15c0da3c93b7926e Mon Sep 17 00:00:00 2001
From: wangpengfei <274878379@qq.com>
Date: 星期二, 25 七月 2023 20:15:19 +0800
Subject: [PATCH] add

---
 service/followRecord.go |   19 +++++++++----------
 1 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/service/followRecord.go b/service/followRecord.go
index 701488d..fd29b08 100644
--- a/service/followRecord.go
+++ b/service/followRecord.go
@@ -30,16 +30,6 @@
 	return ecode.OK
 }
 
-func (FollowRecordService) GetFollowRecordList() (int, []*model.FollowRecord) {
-	// get followRecord list
-	followRecords, err := model.NewFollowRecordSearch().Find()
-	if err != nil {
-		return ecode.FollowRecordListErr, nil
-	}
-
-	return ecode.OK, followRecords
-}
-
 // check followRecord exist
 func checkFollowRecordExist(id int) int {
 	_, err := model.NewFollowRecordSearch().SetId(id).First()
@@ -64,3 +54,12 @@
 	}
 	return ecode.OK
 }
+
+func (FollowRecordService) GetFollowRecordList(page, pageSize int, keyword string) ([]*model.FollowRecord, int) {
+	// get contact list
+	contacts, err := model.NewFollowRecordSearch().SetKeyword(keyword).SetPage(page, pageSize).Find()
+	if err != nil {
+		return nil, ecode.FollowRecordListErr
+	}
+	return contacts, ecode.OK
+}

--
Gitblit v1.8.0