代码优化:添加非空判断
This commit is contained in:
parent
8d0f55fc0e
commit
7aba9cc05f
|
@ -380,7 +380,9 @@ public class BeanUtils {
|
|||
}
|
||||
//递归调用
|
||||
buildTree(children, allModels);
|
||||
setProperty(parent, Cons.FieldName.children.name(), children);
|
||||
if(V.notEmpty(children)){
|
||||
setProperty(parent, Cons.FieldName.children.name(), children);
|
||||
}
|
||||
}
|
||||
|
||||
return parentModels;
|
||||
|
|
Loading…
Reference in New Issue