Commit 85d0f5eaa5185ed9bae2ac7d3c15906d50378323
1 parent
59ce74bfa2
Exists in
master
and in
8 other branches
增加退出登录接口
Showing 2 changed files with 21 additions and 15 deletions
platform-dal/src/main/java/com/lyms/platform/query/BabyModelQuery.java
View file @
85d0f5e
1 | 1 | package com.lyms.platform.query; |
2 | 2 | |
3 | -import java.util.Date; | |
4 | - | |
5 | -import org.bson.types.ObjectId; | |
6 | -import org.springframework.data.mongodb.core.query.Criteria; | |
7 | - | |
8 | 3 | import com.lyms.platform.common.base.IConvertToNativeQuery; |
9 | 4 | import com.lyms.platform.common.dao.BaseQuery; |
10 | 5 | import com.lyms.platform.common.dao.operator.MongoCondition; |
11 | 6 | import com.lyms.platform.common.dao.operator.MongoOper; |
12 | 7 | import com.lyms.platform.common.dao.operator.MongoQuery; |
8 | +import org.bson.types.ObjectId; | |
9 | +import org.springframework.data.mongodb.core.query.Criteria; | |
13 | 10 | |
11 | +import java.util.Date; | |
12 | + | |
14 | 13 | /** |
15 | 14 | * 新生儿查询模型 |
16 | - * | |
15 | + * | |
17 | 16 | * @author Administrator |
18 | 17 | */ |
19 | 18 | public class BabyModelQuery extends BaseQuery implements IConvertToNativeQuery { |
... | ... | @@ -79,7 +78,7 @@ |
79 | 78 | */ |
80 | 79 | private int visitstatus = -1; |
81 | 80 | |
82 | - private int yn= -1; | |
81 | + private int yn = -1; | |
83 | 82 | |
84 | 83 | public int getYn() { |
85 | 84 | return yn; |
86 | 85 | |
87 | 86 | |
88 | 87 | |
89 | 88 | |
90 | 89 | |
... | ... | @@ -156,24 +155,30 @@ |
156 | 155 | if (null != id) { |
157 | 156 | condition = condition.and("id", new ObjectId(id), MongoOper.IS); |
158 | 157 | } |
159 | - if(-1!=yn){ | |
158 | + if (-1 != yn) { | |
160 | 159 | condition = condition.and("yn", yn, MongoOper.IS); |
161 | 160 | } |
162 | - if(null!=areaId){ | |
161 | + if (null != areaId) { | |
163 | 162 | condition = condition.and("areaId", areaId, MongoOper.IS); |
164 | 163 | } |
165 | - /* | |
166 | - * if(null!=keyword){ if(null!=keyword){ MongoCondition con1= MongoCondition.newInstance("phone", keyword, MongoOper.LIKE); MongoCondition con | |
167 | - * = MongoCondition.newInstance("name", keyword, MongoOper.LIKE); condition = condition.orCondition(new MongoCondition[]{con1,con}); } } | |
168 | - */ | |
169 | 164 | |
165 | + if (null != keyword) { | |
166 | + if (null != keyword) { | |
167 | + MongoCondition con1 = MongoCondition.newInstance("mphone", keyword, MongoOper.LIKE); | |
168 | + MongoCondition con | |
169 | + = MongoCondition.newInstance("mname", keyword, MongoOper.LIKE); | |
170 | + condition = condition.orCondition(new MongoCondition[]{con1, con}); | |
171 | + } | |
172 | + } | |
173 | + | |
174 | + | |
170 | 175 | if (null != parentId) { |
171 | 176 | condition = condition.and("parentid", parentId, MongoOper.IS); |
172 | 177 | } |
173 | - if(null!=mphone){ | |
178 | + if (null != mphone) { | |
174 | 179 | condition = condition.and("mphone", mphone, MongoOper.IS); |
175 | 180 | } |
176 | - if(null!=mname){ | |
181 | + if (null != mname) { | |
177 | 182 | condition = condition.and("mname", mname, MongoOper.IS); |
178 | 183 | } |
179 | 184 | Criteria c = null; |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BabyManagerFacade.java
View file @
85d0f5e
... | ... | @@ -90,6 +90,7 @@ |
90 | 90 | babyQuery.setBirthEnd(date); |
91 | 91 | babyQuery.setBirthStart(DateUtil.parseYMD(babyManagerRequest.getdStart())); |
92 | 92 | babyQuery.setVisitstatus(babyManagerRequest.getVisitstatus()); |
93 | + babyQuery.setKeyword(babyManagerRequest.getKeyword()); | |
93 | 94 | babyQuery.setMphone(babyManagerRequest.getPhone()); |
94 | 95 | babyQuery.setPage(babyManagerRequest.getPage()); |
95 | 96 | babyQuery.setMname(babyManagerRequest.getName()); |