树结构转换工具
Data树化
行政区划树化
/**
使用方式:
queryAreaTree(null,true);
*/
public Area queryAreaTree(Area parentingAreaNode, boolean firstInitness) throws ServiceException {
//定义最外层数据
if (Objects.isNull(parentingAreaNode) && firstInitness) {
Area root = new Area();
root.setName("全国");
root.setIsParent(true);
root.setIsLeaf(false);
root.setValue(PlatformConstants.AREA_ROOT_ID);
root.setId(PlatformConstants.AREA_ROOT_ID);
root.setIsRoot(true);
root.setLevel(0);
root.setPath(PlatformConstants.AREA_ROOT_ID);
parentingAreaNode = root;
}
//叶子地区 不给这个属性
if (parentingAreaNode.isLeaf()) {
parentingAreaNode.setSubAreas(null);
return parentingAreaNode;
}
Area parent = parentingAreaNode;
Assert.state(StringUtils.isNotBlank(parentingAreaNode.getId()), "父地区节点不能为空");
//根据id获取字节点数据list
List<Area> subAres = querySubAreasByPid(parentingAreaNode.getId())
.stream().map(e -> {
e.setLevel(parent.getLevel() + 1);
e.setPath(parent.getPath() + "/" + e.getId());
e.setIsRoot(false);
return e;
}).collect(Collectors.toList());
parentingAreaNode.setSubAreas(subAres);
//递归组装子节点的数据
subAres.stream().parallel().forEach((AdjustConsumer<Area>) e -> queryAreaTree(e, false));
return parentingAreaNode;
}
public List<Area> querySubAreasByPid(String pid) throws ServiceException {
Assert.state(StringUtils.isNotBlank(pid), "查询子地区树 pid不能为空");
List<Area> response = requestGetAndResponse("获取到该id的所有子节点方法");
return response;
}
树对象
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import net.minidev.json.annotate.JsonIgnore;
import java.io.Serializable;
import java.util.List;
@Data
@Accessors(chain = true)
@ApiModel("地区")
public class Area implements Serializable {
private static final long serialVersionUID = 8195138678138842439L;
@ApiModelProperty(value = "地区id", example = "1007", position = -20)
private String id;
@ApiModelProperty(value = "地区编码", example = "1007", position = -20)
private String value;
@ApiModelProperty(value = "地区", example = "浙江省", position = -20)
private String name;
@ApiModelProperty(value = "地区上级节点id", example = "1", position = -20)
private String parentId;
@ApiModelProperty(value = "地区层级", example = "1", position = -20)
private Integer level;
@ApiModelProperty(value = "地区节点路径", example = "1/1007", position = -20)
private String path;
@ApiModelProperty(value = "地区是否为叶子节点", example = "false", position = -20)
private Boolean isLeaf;
@ApiModelProperty(value = "地区是否为父节点", example = "true", position = -20)
private Boolean isParent;
@JsonIgnore
private Boolean isRoot;
@ApiModelProperty(value = "下一级地区节点", example = "", position = -20)
private List<Area> subAreas;
public boolean isLeaf(){
return this.isLeaf;
}
}
树形结构数据一般都是以子父id的形式存在数据库中,查询的时候只是带有子id和parent_id的List集合
并不是树形结构,所以我们现在要将普通的List集合转换为树结构数据(本工具类扩展操作树结构数据方法)
import com.alibaba.druid.util.StringUtils;
import com.ywb.pms.vo.BaseTreeNode;
import org.apache.commons.collections.CollectionUtils;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
/**
* @Author: zyl
* @Date: 2019/8/19 14:32
* @Version 1.0
*/
public class TreeNodeUtil {
/**
* 获取所有关联父节点数据集合列表
* 由对应的子节点到根节点(root)
*
* @param id 要搜索对应父节点节点的id
* @param listNodes 要处理列表集合节点数据(不是组合成树状图后的数据)
*/
public static <T extends BaseTreeNode> List<T> getParentList(List<T> listNodes, String id) {
if (StringUtils.isEmpty(id) || CollectionUtils.isEmpty(listNodes)) {
return null;
}
// 数据保存的对象
List<T> treeNodes = new ArrayList<>();
int length = listNodes.size();
// 防止死循环问题
byte[] nodeIndex = new byte[length];
T t;
for (int i = 0; i < length; i++) {
t = listNodes.get(i);
// 循环找到节点id,赋值id等于该节点pid
if (id.equals(t.getId()) && nodeIndex[i] == 0) {
nodeIndex[i] = 1;
treeNodes.add(t);//第一次找到本身放进集合,然后找父节点
id = t.getpId();
// 父主键为空,null,"0",结束循环
if (StringUtils.isEmpty(id) || "null".equals(id) || "0".equals(id)) {
break;
}
i = -1;
}
}
return treeNodes;
}
/**
* 获取关联子节点数据集合列表
* 由对应的子节点向子节点搜索
*
* @param listNodes 要处理列表集合节点数据(不是组合成树状图后的数据)
* @param ids 要搜索对应子节点的id集合
*/
public static <T extends BaseTreeNode> List<T> getChildList(List<T> listNodes, List<String> ids) {
return CollectionUtils.isEmpty(ids) ? null : getChildList(listNodes, ids.toArray(new String[ids.size()]));
}
/**
*
* @param listNodes 要处理列表集合节点数据(不是组合成树状图后的数据)
* @param id 要搜索对应子节点的id
* @param <T>
* @return
*/
public static <T extends BaseTreeNode> List<T> getChildList(List<T> listNodes, String id) {
return StringUtils.isEmpty(id) ? null : getChildList(listNodes, new String[]{id});
}
/**
*
* @param listNodes 要处理列表集合节点数据(不是组合成树状图后的数据)
* @param ids 要搜索对应子节点的id(数组)
* @param <T>
* @return
*/
public static <T extends BaseTreeNode> List<T> getChildList(List<T> listNodes, String[] ids) {
if (ids == null || ids.length == 0 || CollectionUtils.isEmpty(listNodes)) {
return null;
}
// 数据保存的对象
List<T> treeNodes = new ArrayList<>();
int length = listNodes.size();
// 防止死循环问题
byte[] nodeIndex = new byte[length];
// 循环获取要获取节点
T t;
for (String id : ids) {
for (int i = 0; i < length; i++) {
t = listNodes.get(i);
if (id.equals(t.getId())) {
treeNodes.add(t);
nodeIndex[i] = 1;
}
}
}
String tempId;
int index = 0;
while (index < treeNodes.size()) {
tempId = treeNodes.get(index).getId();
if (!StringUtils.isEmpty(tempId)) {
for (int i = 0; i < length; i++) {
t = listNodes.get(i);
if (tempId.equals(t.getpId()) && nodeIndex[i] == 0) {
nodeIndex[i] = 1;
treeNodes.add(t);
}
}
}
index++;
}
return treeNodes;
}
/**
* 封装整个树状图数据
*
* @param listNodes 要处理列表集合节点数据
*/
public static <T extends BaseTreeNode> List<T> assembleTree(List<T> listNodes) {
List<T> newTreeNodes = new ArrayList<>();
// 赋值最上面节点的值
newTreeNodes.addAll(listNodes.stream()
.filter(t -> StringUtils.isEmpty(t.getpId()) || "null".equals(t.getpId()) || "0".equals(t.getpId()))
.collect(Collectors.toList()));
// 循环处理子节点数据
for (T t : newTreeNodes) {
//递归
assembleTree(t, listNodes);
}
return newTreeNodes;
}
/**
* 封装层单个树子节点数据
*
* @param id 根目录节点id
* @param listNodes 要处理的列表数据
*/
public static <T extends BaseTreeNode> T assembleTreeById(String id, List<T> listNodes) {
if (StringUtils.isEmpty(id) || CollectionUtils.isEmpty(listNodes)) {
return null;
}
// 获取对应的节点
T node = null;
for (T temp : listNodes) {
if (id.equals(temp.getId())) {
node = temp;
break;
}
}
assembleTree(node, listNodes);
return node;
}
/**
* 根据节点封装树状图集合数据
*
* @param node 处理的节点(当前节点)
* @param listNodes 要处理的列表数据
*/
static <T extends BaseTreeNode> void assembleTree(T node, List<T> listNodes) {
if (node != null && !CollectionUtils.isEmpty(listNodes)) {
// 循环节点数据,如果是子节点则添加起来
listNodes.stream().filter(t -> Objects.equals(t.getpId(), node.getId())).forEachOrdered(node::addChild);
// 循环处理子节点数据,递归
if (!CollectionUtils.isEmpty(node.getChild())) {
for (Object t : node.getChild()) {
//递归
assembleTree((T) t, listNodes);
}
}
}
}
/**
* 主键输出
*
* @param treeNodes 节点
* @return String 注解集合
*/
public static <T extends BaseTreeNode> String idToString(List<T> treeNodes) {
return idToString(treeNodes, ",");
}
/**
* 主键输出
*
* @param treeNodes 节点
* @param c 拼接字符串
* @return String 注解集合
*/
public static <T extends BaseTreeNode> String idToString(List<T> treeNodes, String c) {
StringBuilder pks = new StringBuilder();
if (treeNodes != null) {
for (T t : treeNodes) {
pks.append(t.getId()).append(c);
}
}
return pks.length() > 0 ? pks.delete(pks.length() - c.length(), pks.length()).toString() : "";
}
}
2树化方法
public Object getTree() {
// 查询数据
List<LxhpArea> areaList = areaService.list();
// 构建的整个树数据
List<TreeNode<String>> treeNodeList = areaList.stream().map(area -> {
// 扩展字段赋值,下面要取这里的值
Map<String, Object> extraMap = new HashMap<>();
extraMap.put("domain", area.getDomain());
extraMap.put("isOpen", area.getIsOpen());
extraMap.put("bigArea", area.getBigArea());
// 单个树数据构建
TreeNode<String> treeNode = new TreeNode<String>()
.setId(String.valueOf(area.getId())) // 主键
.setParentId(String.valueOf(area.getReid())) // 父节点ID
.setName(area.getName()) // 省份名称
.setWeight(area.getSortOrder()) //权重,排序
.setExtra(extraMap); // 扩展字段
return treeNode;
}).collect(Collectors.toList());
// 配置
TreeNodeConfig treeNodeConfig = new TreeNodeConfig();
// 自定义属性名(修改默认名称)
treeNodeConfig.setWeightKey("sortOrder");
treeNodeConfig.setChildrenKey("childrenNode");
// 最大递归深度
treeNodeConfig.setDeep(1);
//转换器
List<Tree<String>> treeNodes = TreeUtil.build(treeNodeList, "1", treeNodeConfig,
(treeNode, tree) -> {
// 给树节点赋值(还能set 父 或子节点树)
tree.setId(treeNode.getId());
tree.setParentId(treeNode.getParentId());
tree.setWeight(treeNode.getWeight());
tree.setName(treeNode.getName());
// 扩展属性值赋值
// treeNode.getExtra().getOrDefault("domain", null) 是获取上面Map放进去的值,没有就是 null
tree.putExtra("domain", treeNode.getExtra().getOrDefault("domain", null));
tree.putExtra("isOpen", treeNode.getExtra().getOrDefault("isOpen", null));
tree.putExtra("bigArea", treeNode.getExtra().getOrDefault("bigArea", null));
});
return JSONUtil.parse(treeNodes);
}
树转List
解析树
@Data
@Accessors(chain = true)
static class AreaTreeHolder {
Area areaLinkedNode;//树化后的数据
Map<String, Area> treeNavigate;//所有树导航结构
public static AreaTreeHolder getInstant(Area area) {
return new AreaTreeHolder()
.setAreaLinkedNode(area)
.setTreeNavigate(initNavigate(Lists.newArrayList(area), Maps.newConcurrentMap()));
}
public static Map<String, Area> initNavigate(List<Area> areas, Map<String, Area> treeNavigate) {
areas.forEach(e -> {
treeNavigate.put(e.getId(), e);
if (CollectionUtils.isNotEmpty(e.getSubAreas())) {
initNavigate(e.getSubAreas(), treeNavigate);
}
});
return treeNavigate;
}
}
Java实体类
/**
实体需要继承的java类
* @author : Latent
* @createdDate : 2019/8/12
* @updatedDate
*/
public class BaseTreeNode {
/**
* 子Id
*/
private String id;
/**
* 父ID
*/
private String pId;
private List<BaseTreeNode> child;
public BaseTreeNode() {
}
public String getId() {
return this.id;
}
public void setId(String id) {
this.id = id;
}
public String getpId() {
return this.pId;
}
public void setpId(String pId) {
this.pId = pId;
}
public List<BaseTreeNode> getChild() {
return this.child;
}
public void setChild(List<BaseTreeNode> child) {
this.child = child;
}
public void addChild(BaseTreeNode baseTreeNode) {
if (this.child == null) {
this.setChild(new ArrayList());
}
this.getChild().add(baseTreeNode);
}
}
/**
* @author : Latent
* @createdDate : 2019/8/15
* @updatedDate
*/
@Data
public class AddressDto extends BaseTreeNode {
/**
* 地址名称
*/
String addressName;
/**
* 地址编码
*/
String addressCode;
/**
* 类型
*/
String addressType;
}
Service类
@Override
public List<AddressDto> getlistAddress() {
List<AddressDto> list = dao.listAddress("");
//将集合转换成树状结构
List<AddressDto> listDto = TreeNodeUtil.assembleTree(list);
return listDto;
}
数据库
DROP TABLE IF EXISTS `address_info`;
CREATE TABLE `address_info` (
`address_pk` char(40) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '主键',
`create_time` datetime(0) NULL DEFAULT NULL COMMENT '插入时间',
`delete_flag` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '是否删除',
`address_code` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '地址编码',
`address_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '地址名',
`address_type` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '地址类型',
`p_address_pk` char(40) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '上级主键',
`baidu_city_code` varchar(5) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '百度地图编码',
`is_audit_flag` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '是否通过审核',
`update_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '最新修改时间',
`area_code` char(40) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '区',
`sort_num` int(11) NULL DEFAULT NULL COMMENT '排序',
`audit_flag` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`address_pk`) USING BTREE,
INDEX `FK20mbxgi8i8n1egyg4mee8y2ow`(`p_address_pk`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of upms_address
-- ----------------------------
INSERT INTO `address_info` VALUES ('002a3308-273e-4a8b-bdd2-f51271922211', '2017-07-21 23:09:23', 'Y', 'YT', '烟台市', 'CITY', '35a564c8-75a5-4e3f-a5a3-9707355ffbb6', '326', NULL, '2018-03-29 03:55:25', NULL, NULL, 'Y');
INSERT INTO `address_info` VALUES ('00513404-d9bd-41d9-a679-f07f86cf8252', '2017-07-25 18:21:22', 'Y', 'LN', '辽宁省', 'PROVINCE', NULL, NULL, NULL, '2018-03-29 03:55:25', NULL, NULL, 'Y');
INSERT INTO `address_info` VALUES ('00932ca7-7f7c-43c6-9a2a-a69ef9c9096d', '2017-07-25 17:14:45', 'Y', 'SC', '四川省', 'PROVINCE', NULL, NULL, NULL, '2018-03-29 03:55:25', NULL, NULL, 'Y');
INSERT INTO `address_info` VALUES ('00c1f147-8d86-4211-a3c8-d6b023b17388', '2016-06-27 17:40:57', 'Y', 'SQ', '肇庆', 'CITY', '668811cd-2158-421c-9270-4b6219aa4804', NULL, NULL, '2018-03-29 03:55:25', NULL, NULL, 'Y');
INSERT INTO `address_info` VALUES ('00e44393-c92d-45fb-9923-76704aca8cc6', '2017-07-25 16:58:51', 'Y', 'HK', '海口市', 'CITY', '9e605f4d-1dec-4105-b3c8-a7dad023cabe', '125', NULL, '2018-03-29 03:55:25', NULL, NULL, 'Y');
INSERT INTO `address_info` VALUES ('00f30856-594f-404d-af36-d0d727f2d120', '2017-07-25 17:08:16', 'Y', 'ZSQD', '中沙群岛', 'CITY', '9e605f4d-1dec-4105-b3c8-a7dad023cabe', '1498', NULL, '2018-03-29 03:55:25', NULL, NULL, 'Y');
INSERT INTO `address_info` VALUES ('011c99be-b57f-4134-8263-f92a6bde33e8', '2017-07-24 23:05:32', 'Y', 'HS', '黄石市', 'CITY', '0678bf05-47e1-4b21-bd5b-ab2ee0d4e32c', '311', NULL, '2018-03-29 03:55:25', NULL, NULL, 'Y');
INSERT INTO `address_info` VALUES ('0292fd00-b24d-4eae-b22e-53f6366c6a55', '2017-07-25 17:11:42', 'Y', 'LG', '临高县', 'CITY', '9e605f4d-1dec-4105-b3c8-a7dad023cabe', '2033', NULL, '2018-03-29 03:55:25', NULL, NULL, 'Y');
INSERT INTO `address_info` VALUES ('0323c938-b222-443b-bb23-cba047d8bd26', '2017-07-21 22:33:37', 'Y', 'LD', '娄底市', 'CITY', 'a7842f5d-be1a-4113-bdc6-613609a2bf17', '221', NULL, '2018-03-29 03:55:25', NULL, NULL, 'Y');
INSERT INTO `address_info` VALUES ('032caf42-28a8-4161-8665-7d60da75ff3f', '2017-07-24 23:12:43', 'Y', 'YC', '宜春市', 'CITY', 'c0546c2d-ae74-4dd0-acaf-f2d7e444b4ff', '278', NULL, '2018-03-29 03:55:25', NULL, NULL, 'Y');
INSERT INTO `address_info` VALUES ('03787b88-1186-4f8f-ba53-a6b75439a49c', '2017-07-24 23:04:25', 'Y', 'YC', '宜昌市', 'CITY', '0678bf05-47e1-4b21-bd5b-ab2ee0d4e32c', '270', NULL, '2018-03-29 03:55:25', NULL, NULL, 'Y');
INSERT INTO `address_info` VALUES ('044e41bc-6db3-4565-977f-d8f6bea0ee64', '2017-07-24 23:24:29', 'Y', 'AL', '阿里地区', 'CITY', '16bc37b6-cca1-477a-9708-bf791bfdb90d', '103', NULL, '2018-03-29 03:55:25', NULL, NULL, 'Y');
INSERT INTO `address_info` VALUES ('059f7386-ee96-407d-9e50-efecb339f846', '2017-07-25 18:05:00', 'Y', 'YL', '玉林市', 'CITY', '22a54667-fa5c-4342-a3a2-2a0cf866e441', '361', NULL, '2018-03-29 03:55:25', NULL, NULL, 'Y');
INSERT INTO `address_info` VALUES ('05e098e9-0b78-4cb6-9841-605e8df374cb', '2018-04-26 15:56:54', 'N', 'ES', '恩施', 'CITY', '6684e528-c123-4980-a784-90a35ce8ab55', '373', 'N', '2018-04-26 15:56:53', '422800', 88, 'Y');
INSERT INTO `address_info` VALUES ('062cfb72-e51c-44ea-8649-ffdcf3ba939e', '2017-07-24 22:07:33', 'Y', 'CD', '承德市', 'CITY', 'a7e13d9e-8e7a-45ab-9828-27e772882774', '207', NULL, '2018-03-29 03:55:25', NULL, NULL, 'Y');
INSERT INTO `address_info` VALUES ('0678bf05-47e1-4b21-bd5b-ab2ee0d4e32c', '2017-07-24 23:01:32', 'Y', 'HB', '湖北省', 'PROVINCE', NULL, NULL, NULL, '2018-03-29 03:55:25', NULL, NULL, 'Y');
INSERT INTO `address_info` VALUES ('0689c9f7-3e2a-4c96-b3b2-a41b2dd15864', '2016-06-01 11:13:51', 'Y', 'zz', '郑州', 'CITY', '1ec283ec-22cc-422f-ac9a-4cf4e018edab', NULL, NULL, '2018-03-29 03:55:25', NULL, NULL, 'Y');
INSERT INTO `address_info` VALUES ('06be4ab2-1432-47ca-a501-5064d063b3b7', '2017-07-24 21:47:14', 'Y', 'SX', '山西省', 'PROVINCE', NULL, NULL, NULL, '2018-03-29 03:55:25', NULL, NULL, 'Y');
INSERT INTO `address_info` VALUES ('06c1bc9d-6a8d-4d4f-a528-0244c1322e7e', '2017-07-24 22:14:03', 'Y', 'SQ', '宿迁市', 'CITY', '40ca140c-7539-4c55-bd64-f2711ee2d1db', '277', NULL, '2018-03-29 03:55:25', NULL, NULL, 'Y');
INSERT INTO `address_info` VALUES ('070982ba-9c07-42dc-afb4-d747a8f53bd4', '2017-07-21 22:32:17', 'Y', 'HY', '衡阳市', 'CITY', 'a7842f5d-be1a-4113-bdc6-613609a2bf17', '159', NULL, '2018-03-29 03:55:25', NULL, NULL, 'Y');
INSERT INTO `address_info` VALUES ('0756ae21-3e71-4b4e-a979-a1a7746b38c9', '2017-07-25 17:59:34', 'Y', 'GL', '桂林市', 'CITY', '22a54667-fa5c-4342-a3a2-2a0cf866e441', '142', NULL, '2018-03-29 03:55:25', NULL, NULL, 'Y');
INSERT INTO `address_info` VALUES ('07a6a88c-31eb-456e-8588-103b3ed2ee79', '2017-07-24 23:35:19', 'Y', 'ALE', '阿拉尔市', 'CITY', '69f0ce1a-f967-4c9d-a9f6-6e451dfa3956', '731', NULL, '2018-03-29 03:55:25', NULL, NULL, 'Y');
INSERT INTO `address_info` VALUES ('0837fa39-df89-4a33-83f9-ed10bf430ed0', '2017-07-21 23:13:45', 'Y', 'BY', '白银市', 'CITY', 'b33004bd-34c7-4023-a6b4-4862aa006b01', '35', NULL, '2018-03-29 03:55:25', NULL, NULL, 'Y');
INSERT INTO `address_info` VALUES ('08442620-a076-4a4c-8f81-50200372709d', '2017-07-25 18:35:03', 'Y', 'QN', '黔南布依族苗族自治州', 'CITY', '1759947f-809f-40f0-901e-1ad041991098', '306', NULL, '2018-03-29 03:55:25', NULL, NULL, 'Y');
INSERT INTO `address_info` VALUES ('087c79ab-c63f-4970-8631-38e33e158d21', '2017-07-24 22:20:44', 'Y', 'HF', '合肥市', 'CITY', '1945ba57-474f-4b3b-aaf9-0e95c116eb13', '127', NULL, '2018-03-29 03:55:25', NULL, NULL, 'Y');
INSERT INTO `address_info` VALUES ('08d811a4-f1f3-4cf4-90dc-528ccb89010e', '2017-07-24 23:06:46', 'Y', 'ESTJZ', '恩施土家族苗族自治州', 'CITY', '0678bf05-47e1-4b21-bd5b-ab2ee0d4e32c', '373', NULL, '2018-03-29 03:55:25', NULL, NULL, 'Y');
INSERT INTO `address_info` VALUES ('08dfb45b-41fc-4719-b726-57110bd97832', '2016-03-30 10:14:44', 'Y', 'BJ', '北京', 'PROVINCE', NULL, NULL, NULL, '2018-03-29 03:55:25', NULL, NULL, 'Y');
INSERT INTO `address_info` VALUES ('09077956-0a60-4f89-a1b3-109d8038b18f', '2017-07-24 22:55:24', 'Y', 'CZ', '潮州', 'CITY', '668811cd-2158-421c-9270-4b6219aa4804', '201', NULL, '2018-03-29 03:55:25', NULL, NULL, 'Y');
INSERT INTO `address_info` VALUES ('097effa5-74ad-4016-ba88-2f0720617d8d', '2017-07-25 17:06:54', 'Y', 'BT', '保亭黎族苗族自治县', 'CITY', '9e605f4d-1dec-4105-b3c8-a7dad023cabe', '1217', NULL, '2018-03-29 03:55:25', NULL, NULL, 'Y');
INSERT INTO `address_info` VALUES ('09aeb664-ef91-44c2-9c77-0d181b25dc89', '2017-07-24 22:31:59', 'Y', 'SX', '绍兴市', 'CITY', '6ee8d443-99a4-4d9f-b184-71aad2f2fa70', '293', NULL, '2018-03-29 03:55:25', NULL, NULL, 'Y');
INSERT INTO `address_info` VALUES ('09f425ad-0304-429c-98c4-8227719c19a6', '2016-06-27 17:27:42', 'Y', 'GS', '甘肃省', 'PROVINCE', NULL, NULL, NULL, '2018-03-29 03:55:25', NULL, NULL, 'Y');
INSERT INTO `address_info` VALUES ('0b51a07d-0363-4b37-9429-a496bdf22581', '2017-07-21 22:51:36', 'Y', 'PDS', '平顶山市', 'CITY', '521636ef-6cec-4763-962d-ebb3ef301430', '213', NULL, '2018-03-29 03:55:25', NULL, NULL, 'Y');
INSERT INTO `address_info` VALUES ('0b739b4f-3e3e-472e-a0b4-d9e24fe5212a', '2017-07-13 21:36:50', 'Y', 'YN、', '云南省', 'PROVINCE', NULL, NULL, NULL, '2018-03-29 03:55:25', NULL, NULL, 'Y');
INSERT INTO `address_info` VALUES ('0b9d8ef5-aa1e-4186-9ea4-df1d10877a86', '2017-07-21 22:44:38', 'Y', 'XX', '新乡市', 'CITY', '521636ef-6cec-4763-962d-ebb3ef301430', '152', NULL, '2018-03-29 03:55:25', NULL, NULL, 'Y');
INSERT INTO `address_info` VALUES ('0bf9a75f-7cfe-4509-a17f-12dd5bb757ca', '2017-07-24 21:34:34', 'Y', 'YSZZ', '玉树藏族自治州', 'CITY', 'a87e8d52-be87-4ca2-9585-87ba0004cedd', '71', NULL, '2018-03-29 03:55:25', NULL, NULL, 'Y');
INSERT INTO `address_info` VALUES ('0cea279a-1624-4d4e-a8ee-9b8d70b54766', '2017-07-25 18:32:44', 'Y', 'TR', '铜仁地区', 'CITY', '1759947f-809f-40f0-901e-1ad041991098', '205', NULL, '2018-03-29 03:55:25', NULL, NULL, 'Y');
INSERT INTO `address_info` VALUES ('0d1a7cc9-052a-420c-8078-48bc2ca839f3', '2017-07-19 23:14:11', 'Y', 'CD', '成都', 'PROVINCE', NULL, '75', NULL, '2018-03-29 03:55:25', NULL, NULL, 'Y');
INSERT INTO `address_info` VALUES ('0d219938-584e-4326-8224-cf79ed5fdd07', '2017-07-24 22:34:06', 'Y', 'DG', '东莞', 'CITY', '668811cd-2158-421c-9270-4b6219aa4804', '119', NULL, '2018-03-29 03:55:25', NULL, NULL, 'Y');
INSERT INTO `address_info` VALUES ('0db76d4e-dafc-44fe-8991-2657f4a1e7fc', '2016-06-27 17:42:04', 'Y', 'HY', '河源', 'CITY', '668811cd-2158-421c-9270-4b6219aa4804', NULL, NULL, '2018-03-29 03:55:25', NULL, NULL, 'Y');
INSERT INTO `address_info` VALUES ('0dd4a2df-ef7a-446b-b098-440c91ac698d', '2017-07-25 18:48:52', 'Y', 'PD', '屏东县', 'CITY', 'a1274f9f-193e-40f9-a569-acf719f69c47', '9012', NULL, '2018-03-29 03:55:25', NULL, NULL, 'Y');
INSERT INTO `address_info` VALUES ('0e2c0813-39b9-4437-aea2-20622e36e79f', '2017-07-24 23:32:08', 'Y', 'YLHSK', '伊犁哈萨克自治州', 'CITY', '69f0ce1a-f967-4c9d-a9f6-6e451dfa3956', '90', NULL, '2018-03-29 03:55:25', NULL, NULL, 'Y');
INSERT INTO `address_info` VALUES ('0ec5e764-f0b3-49a5-8b06-cf4c9f60d69c', '2017-07-24 22:54:08', 'Y', 'ZJ', '湛江', 'CITY', '668811cd-2158-421c-9270-4b6219aa4804', '198', NULL, '2018-03-29 03:55:25', NULL, NULL, 'Y');
INSERT INTO `address_info` VALUES ('0ff962eb-ad51-403f-a514-84f38e3f53e2', '2017-07-24 22:15:05', 'Y', 'WX', '无锡市', 'CITY', '40ca140c-7539-4c55-bd64-f2711ee2d1db', '317', NULL, '2018-03-29 03:55:25', NULL, NULL, 'Y');
INSERT INTO `address_info` VALUES ('10580daa-6143-40d4-aa2f-6a7aed4503f7', '2017-07-15 19:29:08', 'Y', 'SH', '上海', 'PROVINCE', NULL, '289', NULL, '2018-03-29 03:55:25', NULL, NULL, 'Y');
INSERT INTO `address_info` VALUES ('10d948cc-be28-4bc6-affc-bf0b37dbfd69', '2017-07-25 17:53:26', 'Y', 'XSBN', '西双版纳傣族自治州', 'CITY', '6b197334-dcdd-4350-9b49-6a2ca4dc1c8d', '109', NULL, '2018-03-29 03:55:25', NULL, NULL, 'Y');
INSERT INTO `address_info` VALUES ('110101', '2018-06-27 09:11:10', 'N', NULL, '东城区', 'AREA', '2b5facc8-fe2b-46dd-9e06-f491390f8ec1', NULL, NULL, '2018-06-27 09:11:10', '110101', NULL, 'N');
INSERT INTO `address_info` VALUES ('110102', '2018-06-27 09:11:10', 'N', NULL, '西城区', 'AREA', '2b5facc8-fe2b-46dd-9e06-f491390f8ec1', NULL, NULL, '2018-06-27 09:11:10', '110102', NULL, 'N');
INSERT INTO `address_info` VALUES ('110105', '2018-06-27 09:11:10', 'N', NULL, '朝阳区', 'AREA', '2b5facc8-fe2b-46dd-9e06-f491390f8ec1', NULL, NULL, '2018-06-27 09:11:10', '110105', NULL, 'N');