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/quotation.go |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/service/qutation.go b/service/quotation.go
similarity index 75%
rename from service/qutation.go
rename to service/quotation.go
index 247f4e8..3ada6cd 100644
--- a/service/qutation.go
+++ b/service/quotation.go
@@ -29,15 +29,6 @@
 	return ecode.OK
 }
 
-func (QuotationService) GetQuotationList() ([]*model.Quotation, int) {
-	list, err := model.NewQuotationSearch().FindAll()
-	if err != nil {
-		return nil, ecode.QuotationListErr
-	}
-
-	return list, ecode.OK
-}
-
 func (QuotationService) UpdateQuotation(quotation *model.Quotation) int {
 	// check quotation exist
 	_, err := model.NewQuotationSearch().SetId(quotation.Id).Find()
@@ -52,3 +43,12 @@
 
 	return ecode.OK
 }
+
+func (QuotationService) GetQuotationList(page, pageSize int, keyword string) ([]*model.Quotation, int64, int) {
+	// get contact list
+	contacts, total, err := model.NewQuotationSearch().SetKeyword(keyword).SetPage(page, pageSize).FindAll()
+	if err != nil {
+		return nil, 0, ecode.QuotationListErr
+	}
+	return contacts, total, ecode.OK
+}

--
Gitblit v1.8.0