新增zTree的title属性

This commit is contained in:
wenc000 2019-11-21 17:13:01 +08:00
parent 288acd6662
commit 833a0e47d2

View File

@ -29,6 +29,8 @@ public class ZTreeDTO {
private Boolean isParent; private Boolean isParent;
@ApiModelProperty(name = "checked", value = "是否勾选") @ApiModelProperty(name = "checked", value = "是否勾选")
private Boolean checked; private Boolean checked;
@ApiModelProperty(name = "title", value = "标题")
private String title;
public String getId() { public String getId() {
return id == null ? "" : id.trim(); return id == null ? "" : id.trim();
@ -94,25 +96,35 @@ public class ZTreeDTO {
this.checked = checked; this.checked = checked;
} }
public String getTitle() {
return title == null ? "" : title;
}
public void setTitle(String title) {
this.title = title;
}
@Override @Override
public String toString() { public String toString() {
final StringBuilder sb = new StringBuilder("{"); final StringBuilder sb = new StringBuilder("{");
sb.append("\"id\":") sb.append("\"id\":\"")
.append("\"").append(id).append("\""); .append(id).append('\"');
sb.append(",\"pId\":") sb.append(",\"pId\":\"")
.append("\"").append(pId).append("\""); .append(pId).append('\"');
sb.append(",\"name\":") sb.append(",\"name\":\"")
.append("\"").append(name).append("\""); .append(name).append('\"');
sb.append(",\"url\":") sb.append(",\"url\":\"")
.append("\"").append(url).append("\""); .append(url).append('\"');
sb.append(",\"icon\":") sb.append(",\"icon\":\"")
.append("\"").append(icon).append("\""); .append(icon).append('\"');
sb.append(",\"target\":") sb.append(",\"target\":\"")
.append("\"").append(target).append("\""); .append(target).append('\"');
sb.append(",\"isParent\":") sb.append(",\"isParent\":")
.append(isParent); .append(isParent);
sb.append(",\"checked\":") sb.append(",\"checked\":")
.append(checked); .append(checked);
sb.append(",\"title\":\"")
.append(title).append('\"');
sb.append('}'); sb.append('}');
return sb.toString(); return sb.toString();
} }