From e0a433e9c31594527a3bf7766c0bfb2cbbceffdb Mon Sep 17 00:00:00 2001 From: wangpengfei <274878379@qq.com> Date: 星期三, 26 七月 2023 10:09:04 +0800 Subject: [PATCH] fix add pageInfo, keyword to all the list --- service/serviceFollowup.go | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/service/serviceFollowup.go b/service/serviceFollowup.go index 83ea5f5..579c73d 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, int) { + // get contact list + contacts, err := model.NewServiceFollowupSearch().SetKeyword(keyword).SetPage(page, pageSize).FindAll() + if err != nil { + return nil, ecode.ServiceFollowupListErr + } + return contacts, ecode.OK +} -- Gitblit v1.8.0