From b4201a0054369a8cd89e940947fd6f1a89f357c2 Mon Sep 17 00:00:00 2001 From: wangpengfei <274878379@qq.com> Date: 星期三, 02 八月 2023 13:38:24 +0800 Subject: [PATCH] Merge branch 'master' into fly --- service/serviceFollowup.go | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/service/serviceFollowup.go b/service/serviceFollowup.go index 83ea5f5..8faea0b 100644 --- a/service/serviceFollowup.go +++ b/service/serviceFollowup.go @@ -29,15 +29,6 @@ return ecode.OK } -func (FollowupService) GetServiceFollowupList() ([]*model.ServiceFollowup, int) { - list, err := model.NewServiceFollowupSearch().FindAll() - if err != nil { - return nil, ecode.ServiceFollowupListErr - } - - return list, ecode.OK -} - func (FollowupService) UpdateServiceFollowup(serviceFollowup *model.ServiceFollowup) int { // check serviceFollowup exist _, err := model.NewServiceFollowupSearch().SetId(serviceFollowup.Id).Find() @@ -52,3 +43,12 @@ 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 +} -- Gitblit v1.8.0