File tree Expand file tree Collapse file tree 7 files changed +26
-7
lines changed
springboot-starter-data-fast
src/main/java/com/codingapi/springboot/fast/query
springboot-starter-id-generator
springboot-starter-security-jwt
src/main/java/com/codingapi/springboot/framework/dto/request Expand file tree Collapse file tree 7 files changed +26
-7
lines changed Original file line number Diff line number Diff line change 66 <parent >
77 <groupId >org.springframework.boot</groupId >
88 <artifactId >spring-boot-starter-parent</artifactId >
9- <version >3.1.2 </version >
9+ <version >3.1.4 </version >
1010 <relativePath /> <!-- lookup parent from repository -->
1111 </parent >
1212
1313 <groupId >com.codingapi.springboot</groupId >
1414 <artifactId >springboot-parent</artifactId >
15- <version >3.1.2 </version >
15+ <version >3.1.3 </version >
1616
1717 <url >https://github.com/codingapi/springboot-framewrok</url >
1818 <name >springboot-parent</name >
Original file line number Diff line number Diff line change 55 <parent >
66 <artifactId >springboot-parent</artifactId >
77 <groupId >com.codingapi.springboot</groupId >
8- <version >3.1.2 </version >
8+ <version >3.1.3 </version >
99 </parent >
1010 <modelVersion >4.0.0</modelVersion >
1111
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ public <T> Example<T> getExample() {
3939 PageRequest .Filter value = request .getFilters ().get (name );
4040 if (value != null ) {
4141 try {
42- descriptor .getWriteMethod ().invoke (entity , value .getValue ()[ 0 ] );
42+ descriptor .getWriteMethod ().invoke (entity , value .getFilterValue ( descriptor . getPropertyType ()) );
4343 } catch (Exception e ) {
4444 }
4545 }
Original file line number Diff line number Diff line change 55 <parent >
66 <artifactId >springboot-parent</artifactId >
77 <groupId >com.codingapi.springboot</groupId >
8- <version >3.1.2 </version >
8+ <version >3.1.3 </version >
99 </parent >
1010 <modelVersion >4.0.0</modelVersion >
1111
Original file line number Diff line number Diff line change 66 <parent >
77 <artifactId >springboot-parent</artifactId >
88 <groupId >com.codingapi.springboot</groupId >
9- <version >3.1.2 </version >
9+ <version >3.1.3 </version >
1010 </parent >
1111
1212 <artifactId >springboot-starter-security-jwt</artifactId >
Original file line number Diff line number Diff line change 55 <parent >
66 <groupId >com.codingapi.springboot</groupId >
77 <artifactId >springboot-parent</artifactId >
8- <version >3.1.2 </version >
8+ <version >3.1.3 </version >
99 </parent >
1010 <artifactId >springboot-starter</artifactId >
1111
Original file line number Diff line number Diff line change @@ -249,6 +249,25 @@ public boolean isLessThanEqual() {
249249 return relation == FilterRelation .LESS_THAN_EQUAL ;
250250 }
251251
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+
252271 }
253272
254273 private void putFilter (String key , FilterRelation relation , Object ... val ) {
You can’t perform that action at this time.
0 commit comments