From c5a0eb549cba2cd358a2d0496c44f3a289f15d9c Mon Sep 17 00:00:00 2001
From: wangpengfei <274878379@qq.com>
Date: 星期一, 28 八月 2023 14:22:06 +0800
Subject: [PATCH] fix

---
 model/masterOrder.go |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/model/masterOrder.go b/model/masterOrder.go
index dcf1f66..f33fd6c 100644
--- a/model/masterOrder.go
+++ b/model/masterOrder.go
@@ -57,11 +57,11 @@
 				}
 
 				if key == "client_name" {
-					db = db.Joins("Client").Where("client.name = ?", v)
+					db = db.Joins("Client").Where("Client.name = ?", v)
 				}
 
 				if key == "member_name" {
-					db = db.Joins("User").Where("User.username = ?", v)
+					db = db.Joins("Member").Where("Member.username = ?", v)
 				}
 			case int:
 			case float64:
@@ -131,3 +131,7 @@
 	slf.SearchMap = searchMap
 	return slf
 }
+func (slf *MasterOrderSearch) SetIds(ids []int) *MasterOrderSearch {
+	slf.Orm = slf.Orm.Where("id in (?)", ids)
+	return slf
+}

--
Gitblit v1.8.0