diff --git a/cloud-common/src/main/java/com/cm/common/pojo/dtos/ZTreeDTO.java b/cloud-common/src/main/java/com/cm/common/pojo/dtos/ZTreeDTO.java index db469bb..b6fb705 100644 --- a/cloud-common/src/main/java/com/cm/common/pojo/dtos/ZTreeDTO.java +++ b/cloud-common/src/main/java/com/cm/common/pojo/dtos/ZTreeDTO.java @@ -29,6 +29,8 @@ public class ZTreeDTO { private Boolean isParent; @ApiModelProperty(name = "checked", value = "是否勾选") private Boolean checked; + @ApiModelProperty(name = "title", value = "标题") + private String title; public String getId() { return id == null ? "" : id.trim(); @@ -94,25 +96,35 @@ public class ZTreeDTO { this.checked = checked; } + public String getTitle() { + return title == null ? "" : title; + } + + public void setTitle(String title) { + this.title = title; + } + @Override public String toString() { final StringBuilder sb = new StringBuilder("{"); - sb.append("\"id\":") - .append("\"").append(id).append("\""); - sb.append(",\"pId\":") - .append("\"").append(pId).append("\""); - sb.append(",\"name\":") - .append("\"").append(name).append("\""); - sb.append(",\"url\":") - .append("\"").append(url).append("\""); - sb.append(",\"icon\":") - .append("\"").append(icon).append("\""); - sb.append(",\"target\":") - .append("\"").append(target).append("\""); + sb.append("\"id\":\"") + .append(id).append('\"'); + sb.append(",\"pId\":\"") + .append(pId).append('\"'); + sb.append(",\"name\":\"") + .append(name).append('\"'); + sb.append(",\"url\":\"") + .append(url).append('\"'); + sb.append(",\"icon\":\"") + .append(icon).append('\"'); + sb.append(",\"target\":\"") + .append(target).append('\"'); sb.append(",\"isParent\":") .append(isParent); sb.append(",\"checked\":") .append(checked); + sb.append(",\"title\":\"") + .append(title).append('\"'); sb.append('}'); return sb.toString(); }