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})