From f85a4f1b622f06a18a62f0283e7265727e426f56 Mon Sep 17 00:00:00 2001 From: jiangjiazhi Date: Tue, 23 Aug 2016 17:07:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=B0=E7=94=B5=E5=AD=90?= =?UTF-8?q?=E7=97=85=E5=8E=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- platform-dal/src/main/java/com/lyms/platform/query/SieveQuery.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/platform-dal/src/main/java/com/lyms/platform/query/SieveQuery.java b/platform-dal/src/main/java/com/lyms/platform/query/SieveQuery.java index b18cf73..0771b50 100644 --- a/platform-dal/src/main/java/com/lyms/platform/query/SieveQuery.java +++ b/platform-dal/src/main/java/com/lyms/platform/query/SieveQuery.java @@ -5,6 +5,7 @@ import com.lyms.platform.common.dao.BaseQuery; import com.lyms.platform.common.dao.operator.MongoCondition; import com.lyms.platform.common.dao.operator.MongoOper; import com.lyms.platform.common.dao.operator.MongoQuery; +import com.lyms.platform.common.utils.StringUtils; import org.springframework.data.mongodb.core.query.Criteria; import java.util.Date; @@ -151,7 +152,7 @@ public class SieveQuery extends BaseQuery implements IConvertToNativeQuery { if (null != parentId) { condition = condition.and("parentId", parentId, MongoOper.IS); } - if (null != name) { + if (StringUtils.isNotEmpty(name)) { condition = condition.and("name", name, MongoOper.LIKE); } if (null != tireNumber) { @@ -160,7 +161,7 @@ public class SieveQuery extends BaseQuery implements IConvertToNativeQuery { if (null != ztfx) { condition = condition.and("ztfx", ztfx, MongoOper.IS); } - if (null != phone) { + if (StringUtils.isNotEmpty(phone)) { condition = condition.and("phone", phone, MongoOper.IS); } if (null != dueWeek) { -- 1.8.3.1