package com.hotent.system.model; import java.util.ArrayList; import java.util.List; import com.fasterxml.jackson.annotation.JsonInclude; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import com.hotent.base.model.Tree; import com.hotent.base.util.JsonUtil; @SuppressWarnings({ "unchecked", "rawtypes" }) public class WxOrg implements Tree{ private static final Log logger= LogFactory.getLog(WxOrg.class); @JsonInclude(JsonInclude.Include.NON_EMPTY) private String id; private String code; private String parentid; private String name; private Integer order; /** * 第三方组织ID */ private String deptId; /** * 组织名称路径 */ private String pathName; protected List children = new ArrayList(); public String getPathName() { return pathName; } public void setPathName(String pathName) { this.pathName = pathName; } public String getDeptId() { return deptId; } public void setDeptId(String deptId) { this.deptId = deptId; } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getParentid() { return parentid; } public void setParentid(String parentid) { this.parentid = parentid; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Integer getOrder() { return order; } public void setOrder(Integer order) { this.order = order; } @Override public String toString() { String json = ""; try { json = JsonUtil.toJson(this); }catch (Exception e){ logger.error(e); } return json; } /** * 对象转字符串,去掉非空值或者非空 * @return */ public String toStringIndent() { String json = ""; try { json = JsonUtil.toJsonIndent(this); }catch (Exception e){ logger.error(e); } return json; } @Override public String getParentId() { return this.parentid; } @Override public String getText() { return this.name; } @Override public void setIsParent(String isParent) { } @Override public List getChildren() { return this.children; } @Override public void setChildren(List list) { this.children = list; } public String getCode() { return code; } public void setCode(String code) { this.code = code; } }