Recursive tree data format of self-association table

.....
import com.google.common.collect.Lists;
import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.Record;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import java.util.List;

/**
 * ....
 * ...
 * ....
 * ...
 */
public class RegionService {
    private static Logger log = LogManager.getLogger(RegionService.class);

    /**
     * query all event type list
     */
    public List<Record> getRegionList() {
        Integer rootNodeId = ConstantDigit.DIGIT_ZERO;
        Record parentNode = new Record().set("id", rootNodeId);
        List<Record> allNodes = queryAllNodeList();
        List<Record> list = handleAllSubNodetList(allNodes, parentNode);
        return list;
    }


    /**
     * 查询所有节点列表 (不区分数据权限)
     * @return List<Record> 节点集合
     */
    public List<Record> queryAllNodeList() {
        String sql = Db.getSql("region.getAllList");
        return Db.find(sql);
    }


    public List<Record> handleAllSubNodetList(List<Record> allNodes, Record parentNode) {
        List<Record> subList = Lists.newArrayList();
        for (Record node : allNodes) {
            if (parentNode.getInt("id").intValue() == node.getInt("parent_id")) {
                recursionList(allNodes, node);
                //保存一级节点数据
                subList.add(node);
            }
        }
        return subList;

    }


    /**
     * 递归列表
     * @param list List<Record>
     * @param t    Record
     */
    private void recursionList(List<Record> list, Record t) {
        // 得到子节点列表
        List<Record> childList = getChildList(list, t);
        if (CollectionUtils.isNotEmpty(childList)) {
            //给当前节点设置其下直属子节点
            t.set("children", childList);
            for (Record tChild : childList) {
                if (hasChild(list, tChild)) {
                    // 判断是否有子节点
                    for (Record rc : childList) {
                        recursionList(list, rc);
                    }
                }
            }
        }
    }

    /**
     * 得到子节点列表
     * @param list List<Record>
     * @param t    Record
     * @return List<Record>对象
     */
    private List<Record> getChildList(List<Record> list, Record t) {
        List<Record> tlist = Lists.newArrayList();
        for (Record record : list) {
            if (StringUtils.equals(record.getStr("parent_id"), t.getStr("id"))) {
                tlist.add(record);
            }
        }
        return tlist;
    }

    /**
     * 判断是否有子节点
     * @param list List<Record>
     * @param t    Record
     * @return true有子节点 ,false 无子节点
     */
    private boolean hasChild(List<Record> list, Record t) {
        return getChildList(list, t).size() > 0;
    }


}

[
    {
        "create_time": "2016-05-20 09:00:00",
        "children": [
            {
                "create_time": "2016-05-20 09:00:00",
                "children": [
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 2,
                        "region_name": "新城区",
                        "label": "新城区",
                        "id": 13,
                        "ancestors": "1,2,13",
                        "value": 13,
                        "region_code": 610102,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 2,
                        "region_name": "碑林区",
                        "label": "碑林区",
                        "id": 14,
                        "ancestors": "1,2,14",
                        "value": 14,
                        "region_code": 610103,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 2,
                        "region_name": "莲湖区",
                        "label": "莲湖区",
                        "id": 15,
                        "ancestors": "1,2,15",
                        "value": 15,
                        "region_code": 610104,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 2,
                        "region_name": "灞桥区",
                        "label": "灞桥区",
                        "id": 16,
                        "ancestors": "1,2,16",
                        "value": 16,
                        "region_code": 610111,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 2,
                        "region_name": "未央区",
                        "label": "未央区",
                        "id": 17,
                        "ancestors": "1,2,17",
                        "value": 17,
                        "region_code": 610112,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 2,
                        "region_name": "雁塔区",
                        "label": "雁塔区",
                        "id": 18,
                        "ancestors": "1,2,18",
                        "value": 18,
                        "region_code": 610113,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 2,
                        "region_name": "阎良区",
                        "label": "阎良区",
                        "id": 19,
                        "ancestors": "1,2,19",
                        "value": 19,
                        "region_code": 610114,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 2,
                        "region_name": "临潼区",
                        "label": "临潼区",
                        "id": 20,
                        "ancestors": "1,2,20",
                        "value": 20,
                        "region_code": 610115,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 2,
                        "region_name": "长安区",
                        "label": "长安区",
                        "id": 21,
                        "ancestors": "1,2,21",
                        "value": 21,
                        "region_code": 610116,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 2,
                        "region_name": "蓝田县",
                        "label": "蓝田县",
                        "id": 23,
                        "ancestors": "1,2,23",
                        "value": 23,
                        "region_code": 610122,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 2,
                        "region_name": "周至县",
                        "label": "周至县",
                        "id": 24,
                        "ancestors": "1,2,24",
                        "value": 24,
                        "region_code": 610124,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 2,
                        "region_name": "鄠邑区",
                        "label": "鄠邑区",
                        "id": 25,
                        "ancestors": "1,2,24",
                        "value": 25,
                        "region_code": 610125,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 2,
                        "region_name": "高陵区",
                        "label": "高陵区",
                        "id": 22,
                        "ancestors": "1,2,22",
                        "value": 22,
                        "region_code": 610126,
                        "status": false
                    }
                ],
                "parent_id": 1,
                "region_name": "西安市",
                "label": "西安市",
                "id": 2,
                "ancestors": "1,2",
                "value": 2,
                "region_code": 610100,
                "status": false
            },
            {
                "create_time": "2016-05-20 09:00:00",
                "children": [
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 5,
                        "region_name": "王益区",
                        "label": "王益区",
                        "id": 51,
                        "ancestors": "1,5,51",
                        "value": 51,
                        "region_code": 610202,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 5,
                        "region_name": "印台区",
                        "label": "印台区",
                        "id": 52,
                        "ancestors": "1,5,52",
                        "value": 52,
                        "region_code": 610203,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 5,
                        "region_name": "耀州区",
                        "label": "耀州区",
                        "id": 53,
                        "ancestors": "1,5,53",
                        "value": 53,
                        "region_code": 610204,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 5,
                        "region_name": "宜君县",
                        "label": "宜君县",
                        "id": 54,
                        "ancestors": "1,5,54",
                        "value": 54,
                        "region_code": 610222,
                        "status": false
                    }
                ],
                "parent_id": 1,
                "region_name": "铜川市",
                "label": "铜川市",
                "id": 5,
                "ancestors": "1,5",
                "value": 5,
                "region_code": 610200,
                "status": false
            },
            {
                "create_time": "2016-05-20 09:00:00",
                "children": [
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 3,
                        "region_name": "渭滨区",
                        "label": "渭滨区",
                        "id": 26,
                        "ancestors": "1,3,26",
                        "value": 26,
                        "region_code": 610302,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 3,
                        "region_name": "金台区",
                        "label": "金台区",
                        "id": 27,
                        "ancestors": "1,3,27",
                        "value": 27,
                        "region_code": 610303,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 3,
                        "region_name": "陈仓区",
                        "label": "陈仓区",
                        "id": 28,
                        "ancestors": "1,3,28",
                        "value": 28,
                        "region_code": 610304,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 3,
                        "region_name": "凤翔县",
                        "label": "凤翔县",
                        "id": 32,
                        "ancestors": "1,3,32",
                        "value": 32,
                        "region_code": 610322,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 3,
                        "region_name": "岐山县",
                        "label": "岐山县",
                        "id": 31,
                        "ancestors": "1,3,31",
                        "value": 31,
                        "region_code": 610323,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 3,
                        "region_name": "扶风县",
                        "label": "扶风县",
                        "id": 29,
                        "ancestors": "1,3,29",
                        "value": 29,
                        "region_code": 610324,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 3,
                        "region_name": "眉县",
                        "label": "眉县",
                        "id": 30,
                        "ancestors": "1,3,30",
                        "value": 30,
                        "region_code": 610326,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 3,
                        "region_name": "陇县",
                        "label": "陇县",
                        "id": 36,
                        "ancestors": "1,3,36",
                        "value": 36,
                        "region_code": 610327,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 3,
                        "region_name": "千阳县",
                        "label": "千阳县",
                        "id": 35,
                        "ancestors": "1,3,35",
                        "value": 35,
                        "region_code": 610328,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 3,
                        "region_name": "麟游县",
                        "label": "麟游县",
                        "id": 34,
                        "ancestors": "1,3,34",
                        "value": 34,
                        "region_code": 610329,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 3,
                        "region_name": "凤县",
                        "label": "凤县",
                        "id": 37,
                        "ancestors": "1,3,37",
                        "value": 37,
                        "region_code": 610330,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 3,
                        "region_name": "太白县",
                        "label": "太白县",
                        "id": 33,
                        "ancestors": "1,3,33",
                        "value": 33,
                        "region_code": 610331,
                        "status": false
                    }
                ],
                "parent_id": 1,
                "region_name": "宝鸡市",
                "label": "宝鸡市",
                "id": 3,
                "ancestors": "1,3",
                "value": 3,
                "region_code": 610300,
                "status": false
            },
            {
                "create_time": "2016-05-20 09:00:00",
                "children": [
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 4,
                        "region_name": "秦都区",
                        "label": "秦都区",
                        "id": 38,
                        "ancestors": "1,4,38",
                        "value": 38,
                        "region_code": 610402,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 4,
                        "region_name": "渭城区",
                        "label": "渭城区",
                        "id": 39,
                        "ancestors": "1,4,39",
                        "value": 39,
                        "region_code": 610404,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 4,
                        "region_name": "三原县",
                        "label": "三原县",
                        "id": 42,
                        "ancestors": "1,4,42",
                        "value": 42,
                        "region_code": 610422,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 4,
                        "region_name": "泾阳县",
                        "label": "泾阳县",
                        "id": 43,
                        "ancestors": "1,4,43",
                        "value": 43,
                        "region_code": 610423,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 4,
                        "region_name": "乾县",
                        "label": "乾县",
                        "id": 45,
                        "ancestors": "1,4,45",
                        "value": 45,
                        "region_code": 610424,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 4,
                        "region_name": "礼泉县",
                        "label": "礼泉县",
                        "id": 44,
                        "ancestors": "1,4,44",
                        "value": 44,
                        "region_code": 610425,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 4,
                        "region_name": "永寿县",
                        "label": "永寿县",
                        "id": 46,
                        "ancestors": "1,4,46",
                        "value": 46,
                        "region_code": 610426,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 4,
                        "region_name": "彬县",
                        "label": "彬县",
                        "id": 47,
                        "ancestors": "1,4,47",
                        "value": 47,
                        "region_code": 610427,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 4,
                        "region_name": "长武县",
                        "label": "长武县",
                        "id": 50,
                        "ancestors": "1,4,50",
                        "value": 50,
                        "region_code": 610428,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 4,
                        "region_name": "旬邑县",
                        "label": "旬邑县",
                        "id": 49,
                        "ancestors": "1,4,49",
                        "value": 49,
                        "region_code": 610429,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 4,
                        "region_name": "淳化县",
                        "label": "淳化县",
                        "id": 48,
                        "ancestors": "1,4,48",
                        "value": 48,
                        "region_code": 610430,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 4,
                        "region_name": "武功县",
                        "label": "武功县",
                        "id": 41,
                        "ancestors": "1,4,41",
                        "value": 41,
                        "region_code": 610431,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 4,
                        "region_name": "兴平市",
                        "label": "兴平市",
                        "id": 40,
                        "ancestors": "1,4,40",
                        "value": 40,
                        "region_code": 610481,
                        "status": false
                    }
                ],
                "parent_id": 1,
                "region_name": "咸阳市",
                "label": "咸阳市",
                "id": 4,
                "ancestors": "1,4",
                "value": 4,
                "region_code": 610400,
                "status": false
            },
            {
                "create_time": "2016-05-20 09:00:00",
                "children": [
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 12,
                        "region_name": "杨陵区",
                        "label": "杨陵区",
                        "id": 119,
                        "ancestors": "1,12,119",
                        "value": 119,
                        "region_code": 610403,
                        "status": false
                    }
                ],
                "parent_id": 1,
                "region_name": "杨凌示范区",
                "label": "杨凌示范区",
                "id": 12,
                "ancestors": "1,12",
                "value": 12,
                "region_code": 610405,
                "status": false
            },
            {
                "create_time": "2016-05-20 09:00:00",
                "children": [
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 6,
                        "region_name": "临渭区",
                        "label": "临渭区",
                        "id": 55,
                        "ancestors": "1,6,55",
                        "value": 55,
                        "region_code": 610502,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 6,
                        "region_name": "华州区",
                        "label": "华州区",
                        "id": 58,
                        "ancestors": "1,6,58",
                        "value": 58,
                        "region_code": 610521,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 6,
                        "region_name": "潼关县",
                        "label": "潼关县",
                        "id": 59,
                        "ancestors": "1,6,59",
                        "value": 59,
                        "region_code": 610522,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 6,
                        "region_name": "大荔县",
                        "label": "大荔县",
                        "id": 60,
                        "ancestors": "1,6,60",
                        "value": 60,
                        "region_code": 610523,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 6,
                        "region_name": "合阳县",
                        "label": "合阳县",
                        "id": 62,
                        "ancestors": "1,6,62",
                        "value": 62,
                        "region_code": 610524,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 6,
                        "region_name": "澄城县",
                        "label": "澄城县",
                        "id": 61,
                        "ancestors": "1,6,61",
                        "value": 61,
                        "region_code": 610525,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 6,
                        "region_name": "蒲城县",
                        "label": "蒲城县",
                        "id": 63,
                        "ancestors": "1,6,63",
                        "value": 63,
                        "region_code": 610526,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 6,
                        "region_name": "白水县",
                        "label": "白水县",
                        "id": 65,
                        "ancestors": "1,6,65",
                        "value": 65,
                        "region_code": 610527,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 6,
                        "region_name": "富平县",
                        "label": "富平县",
                        "id": 64,
                        "ancestors": "1,6,64",
                        "value": 64,
                        "region_code": 610528,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 6,
                        "region_name": "韩城市",
                        "label": "韩城市",
                        "id": 56,
                        "ancestors": "1,6,56",
                        "value": 56,
                        "region_code": 610581,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 6,
                        "region_name": "华阴市",
                        "label": "华阴市",
                        "id": 57,
                        "ancestors": "1,6,57",
                        "value": 57,
                        "region_code": 610582,
                        "status": false
                    }
                ],
                "parent_id": 1,
                "region_name": "渭南市",
                "label": "渭南市",
                "id": 6,
                "ancestors": "1,6",
                "value": 6,
                "region_code": 610500,
                "status": false
            },
            {
                "create_time": "2016-05-20 09:00:00",
                "children": [
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 7,
                        "region_name": "宝塔区",
                        "label": "宝塔区",
                        "id": 66,
                        "ancestors": "1,7,66",
                        "value": 66,
                        "region_code": 610602,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 7,
                        "region_name": "延长县",
                        "label": "延长县",
                        "id": 78,
                        "ancestors": "1,7,78",
                        "value": 78,
                        "region_code": 610621,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 7,
                        "region_name": "延川县",
                        "label": "延川县",
                        "id": 77,
                        "ancestors": "1,7,77",
                        "value": 77,
                        "region_code": 610622,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 7,
                        "region_name": "子长县",
                        "label": "子长县",
                        "id": 76,
                        "ancestors": "1,7,76",
                        "value": 76,
                        "region_code": 610623,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 7,
                        "region_name": "安塞县",
                        "label": "安塞县",
                        "id": 75,
                        "ancestors": "1,7,75",
                        "value": 75,
                        "region_code": 610624,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 7,
                        "region_name": "志丹县",
                        "label": "志丹县",
                        "id": 74,
                        "ancestors": "1,7,74",
                        "value": 74,
                        "region_code": 610625,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 7,
                        "region_name": "吴起县",
                        "label": "吴起县",
                        "id": 73,
                        "ancestors": "1,7,73",
                        "value": 73,
                        "region_code": 610626,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 7,
                        "region_name": "甘泉县",
                        "label": "甘泉县",
                        "id": 72,
                        "ancestors": "1,7,72",
                        "value": 72,
                        "region_code": 610627,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 7,
                        "region_name": "富县",
                        "label": "富县",
                        "id": 71,
                        "ancestors": "1,7,71",
                        "value": 71,
                        "region_code": 610628,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 7,
                        "region_name": "洛川县",
                        "label": "洛川县",
                        "id": 70,
                        "ancestors": "1,7,70",
                        "value": 70,
                        "region_code": 610629,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 7,
                        "region_name": "宜川县",
                        "label": "宜川县",
                        "id": 69,
                        "ancestors": "1,7,69",
                        "value": 69,
                        "region_code": 610630,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 7,
                        "region_name": "黄龙县",
                        "label": "黄龙县",
                        "id": 68,
                        "ancestors": "1,7,68",
                        "value": 68,
                        "region_code": 610631,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 7,
                        "region_name": "黄陵县",
                        "label": "黄陵县",
                        "id": 67,
                        "ancestors": "1,7,67",
                        "value": 67,
                        "region_code": 610632,
                        "status": false
                    }
                ],
                "parent_id": 1,
                "region_name": "延安市",
                "label": "延安市",
                "id": 7,
                "ancestors": "1,7",
                "value": 7,
                "region_code": 610600,
                "status": false
            },
            {
                "create_time": "2016-05-20 09:00:00",
                "children": [
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 9,
                        "region_name": "汉台区",
                        "label": "汉台区",
                        "id": 91,
                        "ancestors": "1,9,91",
                        "value": 91,
                        "region_code": 610702,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 9,
                        "region_name": "南郑县",
                        "label": "南郑县",
                        "id": 92,
                        "ancestors": "1,9,92",
                        "value": 92,
                        "region_code": 610721,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 9,
                        "region_name": "城固县",
                        "label": "城固县",
                        "id": 93,
                        "ancestors": "1,9,93",
                        "value": 93,
                        "region_code": 610722,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 9,
                        "region_name": "洋县",
                        "label": "洋县",
                        "id": 94,
                        "ancestors": "1,9,94",
                        "value": 94,
                        "region_code": 610723,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 9,
                        "region_name": "西乡县",
                        "label": "西乡县",
                        "id": 96,
                        "ancestors": "1,9,96",
                        "value": 96,
                        "region_code": 610724,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 9,
                        "region_name": "勉县",
                        "label": "勉县",
                        "id": 95,
                        "ancestors": "1,9,95",
                        "value": 95,
                        "region_code": 610725,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 9,
                        "region_name": "宁强县",
                        "label": "宁强县",
                        "id": 99,
                        "ancestors": "1,9,99",
                        "value": 99,
                        "region_code": 610726,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 9,
                        "region_name": "略阳县",
                        "label": "略阳县",
                        "id": 97,
                        "ancestors": "1,9,97",
                        "value": 97,
                        "region_code": 610727,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 9,
                        "region_name": "镇巴县",
                        "label": "镇巴县",
                        "id": 98,
                        "ancestors": "1,9,98",
                        "value": 98,
                        "region_code": 610728,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 9,
                        "region_name": "留坝县",
                        "label": "留坝县",
                        "id": 100,
                        "ancestors": "1,9,100",
                        "value": 100,
                        "region_code": 610729,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 9,
                        "region_name": "佛坪县",
                        "label": "佛坪县",
                        "id": 101,
                        "ancestors": "1,9,101",
                        "value": 101,
                        "region_code": 610730,
                        "status": false
                    }
                ],
                "parent_id": 1,
                "region_name": "汉中市",
                "label": "汉中市",
                "id": 9,
                "ancestors": "1,9",
                "value": 9,
                "region_code": 610700,
                "status": false
            },
            {
                "create_time": "2016-05-20 09:00:00",
                "children": [
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 8,
                        "region_name": "榆阳区",
                        "label": "榆阳区",
                        "id": 79,
                        "ancestors": "1,8,79",
                        "value": 79,
                        "region_code": 610802,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 8,
                        "region_name": "神木县",
                        "label": "神木县",
                        "id": 81,
                        "ancestors": "1,8,81",
                        "value": 81,
                        "region_code": 610821,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 8,
                        "region_name": "府谷县",
                        "label": "府谷县",
                        "id": 82,
                        "ancestors": "1,8,82",
                        "value": 82,
                        "region_code": 610822,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 8,
                        "region_name": "横山区",
                        "label": "横山区",
                        "id": 80,
                        "ancestors": "1,8,80",
                        "value": 80,
                        "region_code": 610823,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 8,
                        "region_name": "靖边县",
                        "label": "靖边县",
                        "id": 84,
                        "ancestors": "1,8,84",
                        "value": 84,
                        "region_code": 610824,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 8,
                        "region_name": "定边县",
                        "label": "定边县",
                        "id": 83,
                        "ancestors": "1,8,83",
                        "value": 83,
                        "region_code": 610825,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 8,
                        "region_name": "绥德县",
                        "label": "绥德县",
                        "id": 85,
                        "ancestors": "1,8,85",
                        "value": 85,
                        "region_code": 610826,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 8,
                        "region_name": "米脂县",
                        "label": "米脂县",
                        "id": 86,
                        "ancestors": "1,8,86",
                        "value": 86,
                        "region_code": 610827,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 8,
                        "region_name": "佳县",
                        "label": "佳县",
                        "id": 87,
                        "ancestors": "1,8,87",
                        "value": 87,
                        "region_code": 610828,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 8,
                        "region_name": "吴堡县",
                        "label": "吴堡县",
                        "id": 88,
                        "ancestors": "1,8,88",
                        "value": 88,
                        "region_code": 610829,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 8,
                        "region_name": "清涧县",
                        "label": "清涧县",
                        "id": 89,
                        "ancestors": "1,8,89",
                        "value": 89,
                        "region_code": 610830,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 8,
                        "region_name": "子洲县",
                        "label": "子洲县",
                        "id": 90,
                        "ancestors": "1,8,90",
                        "value": 90,
                        "region_code": 610831,
                        "status": false
                    }
                ],
                "parent_id": 1,
                "region_name": "榆林市",
                "label": "榆林市",
                "id": 8,
                "ancestors": "1,8",
                "value": 8,
                "region_code": 610800,
                "status": false
            },
            {
                "create_time": "2016-05-20 09:00:00",
                "children": [
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 10,
                        "region_name": "汉滨区",
                        "label": "汉滨区",
                        "id": 102,
                        "ancestors": "1,10,102",
                        "value": 102,
                        "region_code": 610902,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 10,
                        "region_name": "汉阴县",
                        "label": "汉阴县",
                        "id": 108,
                        "ancestors": "1,10,108",
                        "value": 108,
                        "region_code": 610921,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 10,
                        "region_name": "石泉县",
                        "label": "石泉县",
                        "id": 105,
                        "ancestors": "1,10,105",
                        "value": 105,
                        "region_code": 610922,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 10,
                        "region_name": "宁陕县",
                        "label": "宁陕县",
                        "id": 110,
                        "ancestors": "1,10,110",
                        "value": 110,
                        "region_code": 610923,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 10,
                        "region_name": "紫阳县",
                        "label": "紫阳县",
                        "id": 106,
                        "ancestors": "1,10,106",
                        "value": 106,
                        "region_code": 610924,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 10,
                        "region_name": "岚皋县",
                        "label": "岚皋县",
                        "id": 111,
                        "ancestors": "1,10,111",
                        "value": 111,
                        "region_code": 610925,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 10,
                        "region_name": "平利县",
                        "label": "平利县",
                        "id": 103,
                        "ancestors": "1,10,103",
                        "value": 103,
                        "region_code": 610926,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 10,
                        "region_name": "镇坪县",
                        "label": "镇坪县",
                        "id": 109,
                        "ancestors": "1,10,109",
                        "value": 109,
                        "region_code": 610927,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 10,
                        "region_name": "旬阳县",
                        "label": "旬阳县",
                        "id": 104,
                        "ancestors": "1,10,104",
                        "value": 104,
                        "region_code": 610928,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 10,
                        "region_name": "白河县",
                        "label": "白河县",
                        "id": 107,
                        "ancestors": "1,10,107",
                        "value": 107,
                        "region_code": 610929,
                        "status": false
                    }
                ],
                "parent_id": 1,
                "region_name": "安康市",
                "label": "安康市",
                "id": 10,
                "ancestors": "1,10",
                "value": 10,
                "region_code": 610900,
                "status": false
            },
            {
                "create_time": "2016-05-20 09:00:00",
                "children": [
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 11,
                        "region_name": "商州区",
                        "label": "商州区",
                        "id": 112,
                        "ancestors": "1,11,112",
                        "value": 112,
                        "region_code": 611002,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 11,
                        "region_name": "洛南县",
                        "label": "洛南县",
                        "id": 113,
                        "ancestors": "1,11,113",
                        "value": 113,
                        "region_code": 611021,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 11,
                        "region_name": "丹凤县",
                        "label": "丹凤县",
                        "id": 116,
                        "ancestors": "1,11,116",
                        "value": 116,
                        "region_code": 611022,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 11,
                        "region_name": "商南县",
                        "label": "商南县",
                        "id": 117,
                        "ancestors": "1,11,117",
                        "value": 117,
                        "region_code": 611023,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 11,
                        "region_name": "山阳县",
                        "label": "山阳县",
                        "id": 114,
                        "ancestors": "1,11,114",
                        "value": 114,
                        "region_code": 611024,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 11,
                        "region_name": "镇安县",
                        "label": "镇安县",
                        "id": 115,
                        "ancestors": "1,11,115",
                        "value": 115,
                        "region_code": 611025,
                        "status": false
                    },
                    {
                        "create_time": "2016-05-20 09:00:00",
                        "parent_id": 11,
                        "region_name": "柞水县",
                        "label": "柞水县",
                        "id": 118,
                        "ancestors": "1,11,118",
                        "value": 118,
                        "region_code": 611026,
                        "status": false
                    }
                ],
                "parent_id": 1,
                "region_name": "商洛市",
                "label": "商洛市",
                "id": 11,
                "ancestors": "1,11",
                "value": 11,
                "region_code": 611000,
                "status": false
            }
        ],
        "parent_id": 0,
        "region_name": "陕西省",
        "label": "陕西省",
        "id": 1,
        "ancestors": "1",
        "value": 1,
        "region_code": 610000,
        "status": false
    }
]

 

Guess you like

Origin blog.csdn.net/hety119/article/details/99443296