From 45a526194b33ddb4c7e668d7582e7481d0ca1fca Mon Sep 17 00:00:00 2001 From: wangpengfei <274878379@qq.com> Date: 星期四, 27 七月 2023 10:09:25 +0800 Subject: [PATCH] fix --- service/client.go | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/service/client.go b/service/client.go index 2c9a1cd..9c2a431 100644 --- a/service/client.go +++ b/service/client.go @@ -56,11 +56,11 @@ return ecode.OK } -func (ClientService) GetClientList(page, pageSize int, keyword string) ([]*model.Client, int) { +func (ClientService) GetClientList(page, pageSize int, keyword string) ([]*model.Client, int64, int) { // get contact list - contacts, err := model.NewClientSearch(nil).SetKeyword(keyword).SetPage(page, pageSize).Find() + contacts, total, err := model.NewClientSearch(nil).SetKeyword(keyword).SetPage(page, pageSize).Find() if err != nil { - return nil, ecode.ClientListErr + return nil, 0, ecode.ClientListErr } - return contacts, ecode.OK + return contacts, total, ecode.OK } -- Gitblit v1.8.0