Commit a27bd73ebc6ce57b026cb89a5846c51433cbdaa6
1 parent
3ab0c16310
Exists in
master
and in
6 other branches
产筛
Showing 2 changed files with 39 additions and 0 deletions
platform-dal/src/main/java/com/lyms/platform/query/AntExChuQuery.java
View file @
a27bd73
| ... | ... | @@ -26,6 +26,10 @@ |
| 26 | 26 | private Date nextCheckTime; |
| 27 | 27 | private Date nextCheckTimeStart; |
| 28 | 28 | private Date nextCheckTimeEnd; |
| 29 | + | |
| 30 | + private Date createdTimeStart; | |
| 31 | + private Date createdTimeEnd; | |
| 32 | + | |
| 29 | 33 | //大于修改时间 |
| 30 | 34 | private Date gteModified; |
| 31 | 35 | private Date gteCreated; |
| ... | ... | @@ -39,6 +43,22 @@ |
| 39 | 43 | |
| 40 | 44 | private boolean isOpinion; |
| 41 | 45 | |
| 46 | + public Date getCreatedTimeStart() { | |
| 47 | + return createdTimeStart; | |
| 48 | + } | |
| 49 | + | |
| 50 | + public void setCreatedTimeStart(Date createdTimeStart) { | |
| 51 | + this.createdTimeStart = createdTimeStart; | |
| 52 | + } | |
| 53 | + | |
| 54 | + public Date getCreatedTimeEnd() { | |
| 55 | + return createdTimeEnd; | |
| 56 | + } | |
| 57 | + | |
| 58 | + public void setCreatedTimeEnd(Date createdTimeEnd) { | |
| 59 | + this.createdTimeEnd = createdTimeEnd; | |
| 60 | + } | |
| 61 | + | |
| 42 | 62 | public boolean isOpinion() { |
| 43 | 63 | return isOpinion; |
| 44 | 64 | } |
| ... | ... | @@ -227,6 +247,14 @@ |
| 227 | 247 | c = c.where("nextCheckTime").gte(nextCheckTimeStart).lte(nextCheckTimeEnd); |
| 228 | 248 | } else { |
| 229 | 249 | c = Criteria.where("nextCheckTime").gte(nextCheckTimeStart).lte(nextCheckTimeEnd); |
| 250 | + } | |
| 251 | + } | |
| 252 | + | |
| 253 | + if (null != createdTimeStart && createdTimeEnd != null) { | |
| 254 | + if (null != c) { | |
| 255 | + c = c.where("created").gte(createdTimeStart).lte(createdTimeEnd); | |
| 256 | + } else { | |
| 257 | + c = Criteria.where("created").gte(createdTimeStart).lte(createdTimeEnd); | |
| 230 | 258 | } |
| 231 | 259 | } |
| 232 | 260 |
platform-dal/src/main/java/com/lyms/platform/query/AntExQuery.java
View file @
a27bd73
| ... | ... | @@ -42,6 +42,9 @@ |
| 42 | 42 | |
| 43 | 43 | private boolean isOpinion; |
| 44 | 44 | |
| 45 | + private Date createdTimeStart; | |
| 46 | + private Date createdTimeEnd; | |
| 47 | + | |
| 45 | 48 | public boolean isOpinion() { |
| 46 | 49 | return isOpinion; |
| 47 | 50 | } |
| ... | ... | @@ -194,6 +197,14 @@ |
| 194 | 197 | condition = condition.orCondition(new MongoCondition[]{mongoCondition, condition2}); |
| 195 | 198 | } |
| 196 | 199 | |
| 200 | + | |
| 201 | + if (null != createdTimeStart && createdTimeEnd != null) { | |
| 202 | + if (null != c) { | |
| 203 | + c = c.where("created").gte(createdTimeStart).lte(createdTimeEnd); | |
| 204 | + } else { | |
| 205 | + c = Criteria.where("created").gte(createdTimeStart).lte(createdTimeEnd); | |
| 206 | + } | |
| 207 | + } | |
| 197 | 208 | |
| 198 | 209 | if (null != end) { |
| 199 | 210 | if (isAddStart) { |