From c92534229c83436ffe9e6752209200dd70b77808 Mon Sep 17 00:00:00 2001
From: wangpengfei <274878379@qq.com>
Date: 星期四, 17 八月 2023 19:19:44 +0800
Subject: [PATCH] add
---
model/quotation.go | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/model/quotation.go b/model/quotation.go
index b354f81..99d70fe 100644
--- a/model/quotation.go
+++ b/model/quotation.go
@@ -68,7 +68,11 @@
}
if key == "contact_name" {
- db = db.Joins("Contact").Where("LIKE", "%"+v+"%")
+ db = db.Joins("Contact").Where("Contact.name LIKE ?", "%"+v+"%")
+ }
+
+ if key == "member_name" {
+ db = db.Joins("Member").Where("Member.username LIKE ?", "%"+v+"%")
}
case int:
--
Gitblit v1.8.0