From e1c0fe2768d32f79920ceda92383981d4ff12058 Mon Sep 17 00:00:00 2001
From: liujiandao <274878379@qq.com>
Date: 星期五, 15 三月 2024 10:07:50 +0800
Subject: [PATCH] 获取销售明细产品信息
---
service/serviceFollowup.go | 26 +++++++++++++++++---------
1 files changed, 17 insertions(+), 9 deletions(-)
diff --git a/service/serviceFollowup.go b/service/serviceFollowup.go
index c05a414..fede335 100644
--- a/service/serviceFollowup.go
+++ b/service/serviceFollowup.go
@@ -1,6 +1,7 @@
package service
import (
+ "aps_crm/constvar"
"aps_crm/model"
"aps_crm/pkg/ecode"
)
@@ -31,15 +32,6 @@
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
-}
-
func (FollowupService) DeleteServiceFollowup(ids []int) int {
// delete client
err := model.NewServiceFollowupSearch().SetIds(ids).Delete()
@@ -48,3 +40,19 @@
}
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).
+ SetPreload(true).
+ SetServiceOrderId(serviceOrderId).
+ SetMemberIds(memberIds).
+ FindAll()
+ if err != nil {
+ return nil, 0, ecode.ServiceFollowupListErr
+ }
+ return contacts, total, ecode.OK
+}
--
Gitblit v1.8.0