From eef6a3503639d7e97402a457f74aa46bde765d06 Mon Sep 17 00:00:00 2001 From: liquanyu Date: Mon, 8 Aug 2016 16:27:07 +0800 Subject: [PATCH] =?UTF-8?q?=E5=84=BF=E7=AB=A5=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/lyms/platform/query/BabyModelQuery.java | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/platform-dal/src/main/java/com/lyms/platform/query/BabyModelQuery.java b/platform-dal/src/main/java/com/lyms/platform/query/BabyModelQuery.java index 6015668..07c02ff 100644 --- a/platform-dal/src/main/java/com/lyms/platform/query/BabyModelQuery.java +++ b/platform-dal/src/main/java/com/lyms/platform/query/BabyModelQuery.java @@ -393,15 +393,19 @@ public class BabyModelQuery extends BaseQuery implements IConvertToNativeQuery { } if (null != nextDateStart && nextDateEnd != null) { - if (c != null) - { - Criteria nc = Criteria.where("nextDate").gte(nextDateStart).lte(nextDateEnd); - c.andOperator(nc); - } - else { - c = Criteria.where("nextDate").gte(nextDateStart).lte(nextDateEnd); - } - condition.andCondition( new MongoCondition(c)); + + Criteria cr = Criteria.where("nextDate").gte(nextDateStart).lte(nextDateEnd); + condition.andCondition(new MongoCondition(cr)); +// +// if (c != null) +// { +// Criteria nc = Criteria.where("nextDate").gte(nextDateStart).lte(nextDateEnd); +// c.andOperator(nc); +// } +// else { +// c = Criteria.where("nextDate").gte(nextDateStart).lte(nextDateEnd); +// } +// condition.andCondition( new MongoCondition(c)); } if (null != birthEnd) { -- 1.8.3.1