Skip to content

Commit ea12d57

Browse files
committed
support search isNull isNotNull notIn
1 parent 13a3875 commit ea12d57

File tree

17 files changed

+103
-15
lines changed

17 files changed

+103
-15
lines changed

example/example-application/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>springboot-example</artifactId>
77
<groupId>com.codingapi.springboot</groupId>
8-
<version>3.3.65</version>
8+
<version>3.3.66</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

example/example-domain/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>springboot-example</artifactId>
77
<groupId>com.codingapi.springboot</groupId>
8-
<version>3.3.65</version>
8+
<version>3.3.66</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

example/example-infra-flow/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>springboot-example</artifactId>
77
<groupId>com.codingapi.springboot</groupId>
8-
<version>3.3.65</version>
8+
<version>3.3.66</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

example/example-infra-jpa/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>springboot-example</artifactId>
77
<groupId>com.codingapi.springboot</groupId>
8-
<version>3.3.65</version>
8+
<version>3.3.66</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

example/example-server/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>springboot-example</artifactId>
77
<groupId>com.codingapi.springboot</groupId>
8-
<version>3.3.65</version>
8+
<version>3.3.66</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

example/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
</parent>
1818

1919
<artifactId>springboot-example</artifactId>
20-
<version>3.3.65</version>
20+
<version>3.3.66</version>
2121

2222
<name>springboot-example</name>
2323
<description>springboot-example project for Spring Boot</description>

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
<groupId>com.codingapi.springboot</groupId>
1717
<artifactId>springboot-parent</artifactId>
18-
<version>3.3.65</version>
18+
<version>3.3.66</version>
1919

2020
<url>https://github.com/codingapi/springboot-framewrok</url>
2121
<name>springboot-parent</name>

springboot-starter-data-authorization/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>com.codingapi.springboot</groupId>
88
<artifactId>springboot-parent</artifactId>
9-
<version>3.3.65</version>
9+
<version>3.3.66</version>
1010
</parent>
1111

1212
<artifactId>springboot-starter-data-authorization</artifactId>

springboot-starter-data-fast/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>springboot-parent</artifactId>
77
<groupId>com.codingapi.springboot</groupId>
8-
<version>3.3.65</version>
8+
<version>3.3.66</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

springboot-starter-data-fast/src/main/java/com/codingapi/springboot/fast/jpa/repository/DynamicSQLBuilder.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,14 @@ private void buildSQL(Filter filter, StringBuilder hql) {
9999
paramIndex++;
100100
}
101101

102+
if (filter.isNull()) {
103+
hql.append(filter.getKey()).append(" IS NULL ");
104+
}
105+
106+
if (filter.isNotNull()) {
107+
hql.append(filter.getKey()).append(" IS NOT NULL ");
108+
}
109+
102110
if (filter.isNotEqual()) {
103111
hql.append(filter.getKey()).append(" != ?").append(paramIndex);
104112
params.add(filter.getValue()[0]);
@@ -125,6 +133,12 @@ private void buildSQL(Filter filter, StringBuilder hql) {
125133
params.add(Arrays.asList(filter.getValue()));
126134
paramIndex++;
127135
}
136+
137+
if (filter.isNotIn()) {
138+
hql.append(filter.getKey()).append(" NOT IN (").append("?").append(paramIndex).append(")");
139+
params.add(Arrays.asList(filter.getValue()));
140+
paramIndex++;
141+
}
128142
if (filter.isGreaterThan()) {
129143
hql.append(filter.getKey()).append(" > ?").append(paramIndex);
130144
params.add(filter.getValue()[0]);

0 commit comments

Comments
 (0)