From c92534229c83436ffe9e6752209200dd70b77808 Mon Sep 17 00:00:00 2001
From: wangpengfei <274878379@qq.com>
Date: 星期四, 17 八月 2023 19:19:44 +0800
Subject: [PATCH] add
---
service/masterOrder.go | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/service/masterOrder.go b/service/masterOrder.go
index c1255a1..1c36a33 100644
--- a/service/masterOrder.go
+++ b/service/masterOrder.go
@@ -29,15 +29,6 @@
return ecode.OK
}
-func (MasterOrderService) GetMasterOrderList() ([]*model.MasterOrder, int) {
- list, err := model.NewMasterOrderSearch().FindAll()
- if err != nil {
- return nil, ecode.MasterOrderListErr
- }
-
- return list, ecode.OK
-}
-
func (MasterOrderService) UpdateMasterOrder(masterOrder *model.MasterOrder) int {
// check masterOrder exist
_, err := model.NewMasterOrderSearch().SetId(masterOrder.Id).Find()
@@ -52,3 +43,12 @@
return ecode.OK
}
+
+func (MasterOrderService) GetMasterOrderList(page, pageSize int, data map[string]interface{}) ([]*model.MasterOrder, int64, int) {
+ // get contact list
+ contacts, total, err := model.NewMasterOrderSearch().SetPage(page, pageSize).SetSearchMap(data).FindAll()
+ if err != nil {
+ return nil, 0, ecode.MasterOrderListErr
+ }
+ return contacts, total, ecode.OK
+}
--
Gitblit v1.8.0