File tree 7 files changed +26
-7
lines changed
src/main/java/com/codingapi/springboot/framework/dto/request
springboot-starter-data-fast
src/main/java/com/codingapi/springboot/fast/query
springboot-starter-id-generator
springboot-starter-security-jwt
7 files changed +26
-7
lines changed Original file line number Diff line number Diff line change 6
6
<parent >
7
7
<groupId >org.springframework.boot</groupId >
8
8
<artifactId >spring-boot-starter-parent</artifactId >
9
- <version >3.1.2 </version >
9
+ <version >3.1.4 </version >
10
10
<relativePath /> <!-- lookup parent from repository -->
11
11
</parent >
12
12
13
13
<groupId >com.codingapi.springboot</groupId >
14
14
<artifactId >springboot-parent</artifactId >
15
- <version >3.1.2 </version >
15
+ <version >3.1.3 </version >
16
16
17
17
<url >https://github.com/codingapi/springboot-framewrok</url >
18
18
<name >springboot-parent</name >
Original file line number Diff line number Diff line change 5
5
<parent >
6
6
<artifactId >springboot-parent</artifactId >
7
7
<groupId >com.codingapi.springboot</groupId >
8
- <version >3.1.2 </version >
8
+ <version >3.1.3 </version >
9
9
</parent >
10
10
<modelVersion >4.0.0</modelVersion >
11
11
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ public <T> Example<T> getExample() {
39
39
PageRequest .Filter value = request .getFilters ().get (name );
40
40
if (value != null ) {
41
41
try {
42
- descriptor .getWriteMethod ().invoke (entity , value .getValue ()[ 0 ] );
42
+ descriptor .getWriteMethod ().invoke (entity , value .getFilterValue ( descriptor . getPropertyType ()) );
43
43
} catch (Exception e ) {
44
44
}
45
45
}
Original file line number Diff line number Diff line change 5
5
<parent >
6
6
<artifactId >springboot-parent</artifactId >
7
7
<groupId >com.codingapi.springboot</groupId >
8
- <version >3.1.2 </version >
8
+ <version >3.1.3 </version >
9
9
</parent >
10
10
<modelVersion >4.0.0</modelVersion >
11
11
Original file line number Diff line number Diff line change 6
6
<parent >
7
7
<artifactId >springboot-parent</artifactId >
8
8
<groupId >com.codingapi.springboot</groupId >
9
- <version >3.1.2 </version >
9
+ <version >3.1.3 </version >
10
10
</parent >
11
11
12
12
<artifactId >springboot-starter-security-jwt</artifactId >
Original file line number Diff line number Diff line change 5
5
<parent >
6
6
<groupId >com.codingapi.springboot</groupId >
7
7
<artifactId >springboot-parent</artifactId >
8
- <version >3.1.2 </version >
8
+ <version >3.1.3 </version >
9
9
</parent >
10
10
<artifactId >springboot-starter</artifactId >
11
11
Original file line number Diff line number Diff line change @@ -249,6 +249,25 @@ public boolean isLessThanEqual() {
249
249
return relation == FilterRelation .LESS_THAN_EQUAL ;
250
250
}
251
251
252
+ public Object getFilterValue (Class <?> clazz ) {
253
+ Object val = value [0 ];
254
+ if (val instanceof String ) {
255
+ if (clazz == Integer .class ) {
256
+ return Integer .parseInt ((String )val );
257
+ }
258
+ if (clazz == Long .class ) {
259
+ return Long .parseLong ((String )val );
260
+ }
261
+ if (clazz == Double .class ) {
262
+ return Double .parseDouble ((String )val );
263
+ }
264
+ if (clazz == Float .class ) {
265
+ return Float .parseFloat ((String )val );
266
+ }
267
+ }
268
+ return value [0 ];
269
+ }
270
+
252
271
}
253
272
254
273
private void putFilter (String key , FilterRelation relation , Object ... val ) {
You can’t perform that action at this time.
0 commit comments