解决方案 »

  1.   

    好吧,我以为我写错了,原来是,我的方法里少了一句····
    有人来接分吗protected List<Map<Object, Object>> queryChild(List<Map<Object, Object>> listmap) throws Exception{
    for(int l = 0;l< listmap.size();l++){
    Map<Object, Object> root = listmap.get(l);
    Map<Object,Object> attributesArray = new HashMap<Object,Object>();
    List<Map<Object, Object>> listChild = queryAssetTypeTreeChild((String) root.get("ASSET_GUID"));
    attributesArray.putAll(root);
    if(root.get("TYPE_LEVEL") == "4"){
    root.put("state", "closed");
    }else{
    root.put("state", "open");
    }
    root.put("children", queryChild(listChild));
    root.put("id", attributesArray.remove("ASSET_GUID")) ;
    root.put("text", attributesArray.remove("TYPE_NAME"));
    root.put("attributes", attributesArray);
    }
    return listmap;
    }
      

  2.   

    是啊,我写了,但是把root.put("children", queryChild(listChild));这句忘记写了,然后···,我还以为我写错了