From f80c6068d5e2ae5b9101125497b4de88726e1d9e Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期日, 07 四月 2024 21:44:58 +0800 Subject: [PATCH] 发货接口增加仓库ID --- service/serviceFollowup.go | 30 +++++++++++++++--------------- 1 files changed, 15 insertions(+), 15 deletions(-) diff --git a/service/serviceFollowup.go b/service/serviceFollowup.go index 2dd1099..fede335 100644 --- a/service/serviceFollowup.go +++ b/service/serviceFollowup.go @@ -17,19 +17,6 @@ return ecode.OK } -func (FollowupService) DeleteServiceFollowup(id int) int { - _, err := model.NewServiceFollowupSearch().SetId(id).Find() - if err != nil { - return ecode.ServiceFollowupNotExist - } - - err = model.NewServiceFollowupSearch().SetId(id).Delete() - if err != nil { - return ecode.ServiceFollowupNotExist - } - return ecode.OK -} - func (FollowupService) UpdateServiceFollowup(serviceFollowup *model.ServiceFollowup) int { // check serviceFollowup exist _, err := model.NewServiceFollowupSearch().SetId(serviceFollowup.Id).Find() @@ -45,12 +32,25 @@ return ecode.OK } -func (FollowupService) GetServiceFollowupList(page, pageSize int, keywordType constvar.ServiceFollowupKeywordType, keyword string) ([]*model.ServiceFollowup, int64, int) { +func (FollowupService) DeleteServiceFollowup(ids []int) int { + // delete client + err := model.NewServiceFollowupSearch().SetIds(ids).Delete() + if err != nil { + return ecode.ServiceFollowupDeleteErr + } + return ecode.OK +} + +func (FollowupService) GetServiceFollowupList(page, pageSize int, keywordType constvar.ServiceFollowupKeywordType, keyword string, serviceOrderId int, memberIds []int) ([]*model.ServiceFollowup, int64, int) { // get contact list contacts, total, err := model.NewServiceFollowupSearch(). SetKeywordType(keywordType). SetKeyword(keyword). - SetPage(page, pageSize).FindAll() + SetPage(page, pageSize). + SetPreload(true). + SetServiceOrderId(serviceOrderId). + SetMemberIds(memberIds). + FindAll() if err != nil { return nil, 0, ecode.ServiceFollowupListErr } -- Gitblit v1.8.0