From 0062f8c9dd6cf65433deb0918729303b41a79e3e Mon Sep 17 00:00:00 2001 From: XinYi Song <2037158277@qq.com> Date: Tue, 21 Dec 2021 09:20:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E5=90=84=E5=B8=82?= =?UTF-8?q?=E5=8C=BA=E5=8E=BF=E4=BB=A3=E7=90=86=E5=95=86=E6=9F=A5=E7=9C=8B?= =?UTF-8?q?=E5=95=86=E5=AE=B6=E5=85=A5=E9=A9=BB=E4=BF=A1=E6=81=AF=E7=9A=84?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/xkrs/utils/Query.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/xkrs/utils/Query.java b/src/main/java/com/xkrs/utils/Query.java index eab58f8..891c140 100644 --- a/src/main/java/com/xkrs/utils/Query.java +++ b/src/main/java/com/xkrs/utils/Query.java @@ -107,7 +107,7 @@ public class Query { list.add(criteriaBuilder.equal(root.get("businessCountry").as(String.class), businessCountry)); } if(businessName != null && !"".equals(businessName)){ - list.add(criteriaBuilder.equal(root.get("businessName").as(String.class), businessName)); + list.add(criteriaBuilder.like(root.get("businessName").as(String.class), "%" + businessName + "%")); } list.add(criteriaBuilder.equal(root.get("businessType").as(String.class), "1")); Predicate[] predicates = new Predicate[list.size()];