From 9dac2644d46171ca3f6e436a2969c5d753c4f7ed Mon Sep 17 00:00:00 2001 From: wolter Date: Wed, 21 Aug 2024 15:26:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8E=E5=8F=B0=EF=BC=9A=E5=95=86=E6=88=B7?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=90=8D=E7=A7=B0=E5=92=8C=E8=81=94=E7=B3=BB?= =?UTF-8?q?=E4=BA=BA=E6=90=9C=E7=B4=A2=E4=B8=8D=E5=8C=BA=E5=88=86=E5=A4=A7?= =?UTF-8?q?=E5=B0=8F=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/merchant.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/services/merchant.go b/app/services/merchant.go index caf2692..3a20e65 100644 --- a/app/services/merchant.go +++ b/app/services/merchant.go @@ -17,10 +17,12 @@ func MerchantList(req backend.MerchantListRequest) (result []merchantmodel.Merch // 拼接查询条件 conn := builder.NewCond() if req.Name != "" { - conn = conn.And(builder.Like{"name", req.Name}) + temp := strings.ToUpper(req.Name) + conn = conn.And(builder.Like{"upper(name)", temp}) } if req.Contact != "" { - conn = conn.And(builder.Like{"contact", req.Contact}) + temp := strings.ToUpper(req.Contact) + conn = conn.And(builder.Like{"upper(contact)", temp}) } if req.Phone != "" { conn = conn.And(builder.Like{"phone", req.Phone})