Commit 89c1957ad77d79f5388f1cc44e610dfd7d588717
1 parent
aa0ec54f7e
Exists in
master
and in
6 other branches
update
Showing 2 changed files with 12 additions and 3 deletions
platform-dal/src/main/java/com/lyms/platform/query/BoneQuery.java
View file @
89c1957
... | ... | @@ -95,6 +95,14 @@ |
95 | 95 | c = Criteria.where("created").gte(createdTimeStart).lte(createdTimeEnd); |
96 | 96 | } |
97 | 97 | } |
98 | + | |
99 | + if (null != birthStart && birthEnd != null) { | |
100 | + if (null != c) { | |
101 | + c = c.where("birthday").gte(birthStart).lte(birthEnd); | |
102 | + } else { | |
103 | + c = Criteria.where("birthday").gte(birthStart).lte(birthEnd); | |
104 | + } | |
105 | + } | |
98 | 106 | if (null != modifiedStart && modifiedEnd != null) { |
99 | 107 | if (null != c) { |
100 | 108 | c = c.where("modified").gte(modifiedStart).lte(modifiedEnd); |
platform-operate-api/src/main/java/com/lyms/platform/operate/web/facade/BoneFacade.java
View file @
89c1957
... | ... | @@ -177,9 +177,10 @@ |
177 | 177 | { |
178 | 178 | Date currentDate = new Date(); |
179 | 179 | Date start1 = DateUtil.addMonth(currentDate, -start); |
180 | - Date end2 = DateUtil.addDay(DateUtil.addMonth(currentDate, -end - 1), 1); | |
181 | - query.setBirthStart(start1); | |
182 | - query.setBirthEnd(end2); | |
180 | + query.setBirthEnd(start1); | |
181 | + Date end1 = DateUtil.addDay(DateUtil.addMonth(currentDate, -end - 1), 1); | |
182 | + query.setBirthStart(end1); | |
183 | + System.out.println(query.convertToQuery().convertToMongoQuery().toString()); | |
183 | 184 | } |
184 | 185 | |
185 | 186 | List<BoneModel> models = BoneService.queryBoneList(query); |