java后台树形结构展示---懒加载

北慕城南 提交于 2020-08-08 15:45:00

一、数据库设计

 

 

 二、实体类:entity

import com.joyoung.cloud.security.common.validatedGroup.Add;
import com.joyoung.cloud.security.common.validatedGroup.Modify;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.persistence.Id;
import javax.persistence.Transient;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.util.Date;
import java.util.LinkedList;
import java.util.List;

/**
* 公司表(SysCompany)实体类
*
* @author yangyuwei
* @since 2019-06-06 13:45:23
*/
@ApiModel(value = "公司类")
@Data
@Accessors(chain = true)
public class SysCompany implements Serializable {
private static final long serialVersionUID = 600959061181555399L;
@ApiModelProperty(value = "主键Id")
@Id
@Null(message = "{add_id}", groups = {Add.class})
@NotNull(message = "{modify_id}", groups = {Modify.class})
private String id;
//上级公司id
@ApiModelProperty(value = "Id")
private String parentId;
//公司名称
@ApiModelProperty(value = "公司名称")
@NotBlank(message = "{name_null}")
@Pattern(regexp = "^[\\s\\S]{1,20}$", message = "{name_rule}")
private String coName;
//公司简称
@ApiModelProperty(value = "公司简称")
private String coAbbr;
//公司编号
@ApiModelProperty(value = "公司编号")
private String coCode;
//公司地址
@ApiModelProperty(value = "公司地址")
private String coAddr;
//邮编
@ApiModelProperty(value = "邮编")
@Pattern(regexp = "^$|[0-9]{6}$", message = "{zipCode_error}")
private String zipCode;
//法人名称
@ApiModelProperty(value = "法人名称")
private String legalName;
//法定代表人
@ApiModelProperty(value = "法定代表人")
private String legalRep;
//税号
@ApiModelProperty(value = "税号")
private String taxId;
//电话号码("XXX-XXXXXXX""XXXX-XXXXXXXX""XXX-XXXXXXX""XXX-XXXXXXXX""XXXXXXX""XXXXXXXX)
// @Pattern(regexp = "^(\\(\\d{3,4}\\)|\\d{3,4}-|\\s)?\\d{7,14}$", message = "请输入正确的电话号码")
@ApiModelProperty(value = "电话号码")
private String tel;
//开户银行名称
@ApiModelProperty(value ="开户银行名称")
private String bankName;
//开户银行账号
@ApiModelProperty(value = "开户银行账号")
private String bankAcct;
//创建人id
private String crtUser;
//创建人名称
private String crtName;
//创建时间
private Date crtTime;
//最后修改人id
private String updUser;
//最后修改人名称
private String updName;
//最后修改时间
private Date updTime;
//备注
private String remark;
//逻辑删除标识:1=删除;0=未删除
private Integer delFlag;

private String attr1;

private String attr2;

private String attr3;

/*****************************
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!