Commit bb8d29d6 authored by chenhao's avatar chenhao

解决excle导出时有null&null的值现象 by 陈浩

parent 680cebd0
...@@ -252,7 +252,9 @@ public class DataSourcesImpl implements DataSources { ...@@ -252,7 +252,9 @@ public class DataSourcesImpl implements DataSources {
private void initBuildTreeList(List<Object> menus, List<String> stringList) { private void initBuildTreeList(List<Object> menus, List<String> stringList) {
for (Object orgMenuDto : menus) { for (Object orgMenuDto : menus) {
JSONObject detailObject= JSONObject.parseObject(orgMenuDto.toString()); JSONObject detailObject= JSONObject.parseObject(orgMenuDto.toString());
if(detailObject.containsKey("id")) {
stringList.add(detailObject.getString("id") + "@" + detailObject.getString("name")); stringList.add(detailObject.getString("id") + "@" + detailObject.getString("name"));
}
JSONArray children = detailObject.getJSONArray("children"); JSONArray children = detailObject.getJSONArray("children");
if (children != null && children.size() > 0) { if (children != null && children.size() > 0) {
initBuildTreeList(children, stringList); initBuildTreeList(children, stringList);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment