Commit 2f89dd79e278154470cc4c373d9b2dc9e4e134ab
1 parent
89af4531db
Exists in
master
and in
6 other branches
update code
Showing 1 changed file with 5 additions and 1 deletions
platform-common/src/main/java/com/lyms/platform/common/utils/ReflectionUtils.java
View file @
2f89dd7
| ... | ... | @@ -284,7 +284,11 @@ |
| 284 | 284 | if(null==object){ |
| 285 | 285 | return resultMap; |
| 286 | 286 | } |
| 287 | - Field [] fields = object.getClass().getDeclaredFields(); | |
| 287 | + Field [] fields1 = object.getClass().getDeclaredFields(); | |
| 288 | + Field [] fields2 = object.getClass().getSuperclass().getDeclaredFields(); | |
| 289 | + //子对象和父对象的字段 | |
| 290 | + Field [] fields = ArrayUtils.merge(fields1,fields2); | |
| 291 | + | |
| 288 | 292 | Object result = null; |
| 289 | 293 | String name = null; |
| 290 | 294 | for(Field field:fields){ |