Browse Source
update 通用条件查询/woniu-web-master/src/main/java/com/woniu/util/AggregateQueriesUtil.java.
当请求参数为空字符串时不拼接进查询语句
pull/2/head
blackchoice
10 months ago
committed by
Gitee
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with
2 additions and
2 deletions
-
通用条件查询/woniu-web-master/src/main/java/com/woniu/util/AggregateQueriesUtil.java
|
|
@ -46,7 +46,7 @@ public class AggregateQueriesUtil { |
|
|
|
field.setAccessible(true); |
|
|
|
String underlineCase = StrUtil.toUnderlineCase(field.getName()); |
|
|
|
try { |
|
|
|
if (field.get(obj) != null) { |
|
|
|
if (field.get(obj) != null && field.get(obj) != "") { |
|
|
|
queries.eq(underlineCase, field.get(obj)); |
|
|
|
} |
|
|
|
} catch (IllegalAccessException e) { |
|
|
@ -69,7 +69,7 @@ public class AggregateQueriesUtil { |
|
|
|
field.setAccessible(true); |
|
|
|
String underlineCase = StrUtil.toUnderlineCase(field.getName()); |
|
|
|
try { |
|
|
|
if (field.get(obj) != null) { |
|
|
|
if (field.get(obj) != null && field.get(obj) != "") { |
|
|
|
queries.like(underlineCase, field.get(obj)); |
|
|
|
} |
|
|
|
} catch (IllegalAccessException e) { |
|
|
|