From 6141a282a580b08c1e6526150d15fcb892d4ecd1 Mon Sep 17 00:00:00 2001 From: jiangjiazhi Date: Thu, 23 Jun 2016 10:54:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=A7=E5=A6=87=E5=A2=9E=E5=8A=A0=E5=AD=97?= =?UTF-8?q?=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/lyms/platform/query/AntExQuery.java | 51 +++++++++++++++++++++- 1 file changed, 49 insertions(+), 2 deletions(-) diff --git a/platform-dal/src/main/java/com/lyms/platform/query/AntExQuery.java b/platform-dal/src/main/java/com/lyms/platform/query/AntExQuery.java index 2f83f9b..d981425 100644 --- a/platform-dal/src/main/java/com/lyms/platform/query/AntExQuery.java +++ b/platform-dal/src/main/java/com/lyms/platform/query/AntExQuery.java @@ -1,9 +1,56 @@ package com.lyms.platform.query; +import com.lyms.platform.common.base.IConvertToNativeQuery; +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; + /** * 产前检查查询 * * Created by Administrator on 2016/6/16 0016. */ -public class AntExQuery { -} +public class AntExQuery extends BaseQuery implements IConvertToNativeQuery { + private String parentId; + private Integer yn; + private String id; + @Override + public MongoQuery convertToQuery() { + MongoCondition condition=MongoCondition.newInstance(); + if(null!=parentId){ + condition= condition.and("parentId",parentId, MongoOper.IS); + } + if(null!=yn){ + condition= condition.and("yn",yn, MongoOper.IS); + } + if(null!=id){ + condition= condition.and("id",id, MongoOper.IS); + } + return condition.toMongoQuery(); + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getParentId() { + return parentId; + } + + public void setParentId(String parentId) { + this.parentId = parentId; + } + + public Integer getYn() { + return yn; + } + + public void setYn(Integer yn) { + this.yn = yn; + } +} \ No newline at end of file -- 1.8.3.1