Commit 39d48355ba5ef0865fd46dbc6f53d471d3ae7e30
1 parent
3d9ee5f465
Exists in
master
and in
6 other branches
update
Showing 3 changed files with 16 additions and 12 deletions
platform-dal/src/main/java/com/lyms/platform/query/BoneQuery.java
View file @
39d4835
... | ... | @@ -83,29 +83,32 @@ |
83 | 83 | |
84 | 84 | if (null != lastMensesStart && lastMensesEnd != null) { |
85 | 85 | if (null != c) { |
86 | - c = c.where("lastMenses").gte(lastMensesStart).lte(lastMensesEnd); | |
86 | + c = c.and("lastMenses").gte(lastMensesStart).lte(lastMensesEnd); | |
87 | 87 | } else { |
88 | 88 | c = Criteria.where("lastMenses").gte(lastMensesStart).lte(lastMensesEnd); |
89 | 89 | } |
90 | 90 | } |
91 | 91 | if (null != createdTimeStart && createdTimeEnd != null) { |
92 | + | |
92 | 93 | if (null != c) { |
93 | - c = c.where("created").gte(createdTimeStart).lte(createdTimeEnd); | |
94 | + c = c.and("created").gte(createdTimeStart).lte(createdTimeEnd); | |
94 | 95 | } else { |
95 | 96 | c = Criteria.where("created").gte(createdTimeStart).lte(createdTimeEnd); |
96 | 97 | } |
97 | 98 | } |
98 | 99 | |
99 | 100 | if (null != birthStart && birthEnd != null) { |
101 | + | |
100 | 102 | if (null != c) { |
101 | - c = c.where("birthday").gte(birthStart).lte(birthEnd); | |
103 | + c = c.and("birthday").gte(birthStart).lte(birthEnd); | |
102 | 104 | } else { |
103 | 105 | c = Criteria.where("birthday").gte(birthStart).lte(birthEnd); |
104 | 106 | } |
105 | 107 | } |
106 | 108 | if (null != modifiedStart && modifiedEnd != null) { |
109 | + | |
107 | 110 | if (null != c) { |
108 | - c = c.where("modified").gte(modifiedStart).lte(modifiedEnd); | |
111 | + c = c.and("modified").gte(modifiedStart).lte(modifiedEnd); | |
109 | 112 | } else { |
110 | 113 | c = Criteria.where("modified").gte(modifiedStart).lte(modifiedEnd); |
111 | 114 | } |
platform-dal/src/main/java/com/lyms/platform/query/MicroelementQuery.java
View file @
39d4835
... | ... | @@ -77,7 +77,7 @@ |
77 | 77 | |
78 | 78 | if (null != lastMensesStart && lastMensesEnd != null) { |
79 | 79 | if (null != c) { |
80 | - c = c.where("lastMenses").gte(lastMensesStart).lte(lastMensesEnd); | |
80 | + c = c.and("lastMenses").gte(lastMensesStart).lte(lastMensesEnd); | |
81 | 81 | } else { |
82 | 82 | c = Criteria.where("lastMenses").gte(lastMensesStart).lte(lastMensesEnd); |
83 | 83 | } |
84 | 84 | |
85 | 85 | |
86 | 86 | |
... | ... | @@ -85,21 +85,22 @@ |
85 | 85 | |
86 | 86 | if (null != birthStart && birthEnd != null) { |
87 | 87 | if (null != c) { |
88 | - c = c.where("birthday").gte(birthStart).lte(birthEnd); | |
88 | + c = c.and("birthday").gte(birthStart).lte(birthEnd); | |
89 | 89 | } else { |
90 | 90 | c = Criteria.where("birthday").gte(birthStart).lte(birthEnd); |
91 | 91 | } |
92 | 92 | } |
93 | 93 | if (null != createdTimeStart && createdTimeEnd != null) { |
94 | 94 | if (null != c) { |
95 | - c = c.where("created").gte(createdTimeStart).lte(createdTimeEnd); | |
95 | + c = c.and("created").gte(createdTimeStart).lte(createdTimeEnd); | |
96 | 96 | } else { |
97 | 97 | c = Criteria.where("created").gte(createdTimeStart).lte(createdTimeEnd); |
98 | 98 | } |
99 | 99 | } |
100 | 100 | if (null != modifiedStart && modifiedEnd != null) { |
101 | + | |
101 | 102 | if (null != c) { |
102 | - c = c.where("modified").gte(modifiedStart).lte(modifiedEnd); | |
103 | + c = c.and("modified").gte(modifiedStart).lte(modifiedEnd); | |
103 | 104 | } else { |
104 | 105 | c = Criteria.where("modified").gte(modifiedStart).lte(modifiedEnd); |
105 | 106 | } |
platform-operate-api/src/main/resources/spring/applicationContext-dal.xml
View file @
39d4835
... | ... | @@ -14,12 +14,12 @@ |
14 | 14 | <property name="password" value="${mysql.master.db.password}"/> |
15 | 15 | |
16 | 16 | <property name="initialSize" value="10"/> |
17 | - <property name="maxActive" value="100"/> | |
17 | + <property name="maxActive" value="50"/> | |
18 | 18 | <!--<property name="maxIdle" value="10"/>--> |
19 | - <property name="minIdle" value="0"/> | |
20 | - <property name="maxWait" value="10000"/> | |
19 | + <property name="minIdle" value="2"/> | |
20 | + <property name="maxWait" value="5000"/> | |
21 | 21 | <!-- <property name="validationQuery" value="${validationQuery3}" /> --> |
22 | - <property name="testOnBorrow" value="false"/> | |
22 | + <property name="testOnBorrow" value="true"/> | |
23 | 23 | <property name="testOnReturn" value="false"/> |
24 | 24 | <property name="testWhileIdle" value="true"/> |
25 | 25 | <property name="timeBetweenEvictionRunsMillis" value="60000"/> |