This commit is contained in:
77
2024-04-07 23:55:15 +08:00
parent 70104b6c29
commit b42ffc27df
4 changed files with 80 additions and 1 deletions

View File

@@ -0,0 +1,39 @@
package com.ruoyi.xq.dto.app.areacode;
import com.ruoyi.xq.domain.AreaCode;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.ArrayList;
import java.util.List;
@EqualsAndHashCode(callSuper = true)
@Data
public class AreaCodeTree extends AreaCode {
private Integer code;
/**
* 名字
*/
private String name;
/**
* country:国家、province:省份直辖市会在province和city显示、city:市直辖市会在province和city显示、district:区县
*/
private String level;
/**
* 所属上级行政区划代码
*/
private Integer pcode;
/**
* 所属行政区划名字
*/
private String pname;
private List<AreaCode> childrenArea;
public void addChild(AreaCodeTree child) {
if (childrenArea == null) {
childrenArea = new ArrayList<>();
}
childrenArea.add(child);
}
}