user类:
@Table("sys_user")
public class SysUser implements Serializable {
/**
* 用户信息主键id
*/
//@Id
private int pk_user_id;
/**
* 工号
*/
@Excel(name = "工号", width = 20, orderNum = "4")
private String user_employee_id;
/**
* 用户姓名
*/
@Excel(name = "用户姓名", width = 20, orderNum = "5")
private String user_name;
/**
* 用户登录账号
*/
@Name
@Excel(name = "登陆帐号", width = 20, orderNum = "8")
private String user_account;
/**
* 用户性别 1:男 0:女
*/
@Excel(name = "性别", width = 20, orderNum = "6", replace = {"男_1", "女_0"})
private Integer user_sex;
/**
* 用户联系电话
*/
@Excel(name = "联系电话", width = 20, orderNum = "10")
private String user_telphone;
/**
* 用户手机号码
*/
@Excel(name = "手机号码", width = 20, orderNum = "11")
private String user_mobilephone;
/**
* 用户归属公司
*/
@Excel(name = "归属公司", width = 20, orderNum = "1")
private String user_company;
/***
* 用户归属部门
*/
@Excel(name = "归属部门", width = 20, orderNum = "2")
private String user_department;
/**
* 用户职务
*/
@Excel(name = "职务", width = 20, orderNum = "3")
private String user_duty;
/**
* 用户密码
*/
@Excel(name = "登陆密码", width = 20, orderNum = "9")
private String user_password;
/**
* 密码盐
*/
private String salt;
/**
* 用户电子邮箱
*/
private String user_email;
/**
* 用户电子邮箱密码
*/
private String user_email_password;
/**
* 用户身份证号码
*/
@Excel(name = "身份证号码", width = 20, orderNum = "7")
private String user_idcard;
/**
* 用户QQ号码
*/
private String user_qq;
/**
* 用户头像
*/
private String user_avatar;
/**
* 是否允许登录 1:允许登录 0:禁止登录
*/
@Excel(name = "是否允许登陆", width = 20, orderNum = "12", replace = {"允许_1", "禁止_0"})
private Integer is_login;
/**
* 记录创建时间
*/
private Date gmt_create;
/**
* 记录最近修改时间
*/
private Date gmt_modified;
@ManyMany(relation = "sys_role_user",from = "user_account", to = "pk_role_id")
private List<SysRole> roles;
public int getPk_user_id() {
return pk_user_id;
}
public void setPk_user_id(int pk_user_id) {
this.pk_user_id = pk_user_id;
}
public String getUser_employee_id() {
return user_employee_id;
}
public void setUser_employee_id(String user_employee_id) {
this.user_employee_id = user_employee_id;
}
public String getUser_name() {
return user_name;
}
public void setUser_name(String user_name) {
this.user_name = user_name;
}
public String getUser_account() {
return user_account;
}
public void setUser_account(String user_account) {
this.user_account = user_account;
}
public Integer getUser_sex() {
return user_sex;
}
public void setUser_sex(Integer user_sex) {
this.user_sex = user_sex;
}
public String getUser_telphone() {
return user_telphone;
}
public void setUser_telphone(String user_telphone) {
this.user_telphone = user_telphone;
}
public String getUser_mobilephone() {
return user_mobilephone;
}
public void setUser_mobilephone(String user_mobilephone) {
this.user_mobilephone = user_mobilephone;
}
public String getUser_company() {
return user_company;
}
public void setUser_company(String user_company) {
this.user_company = user_company;
}
public String getUser_department() {
return user_department;
}
public void setUser_department(String user_department) {
this.user_department = user_department;
}
public String getUser_duty() {
return user_duty;
}
public void setUser_duty(String user_duty) {
this.user_duty = user_duty;
}
public String getUser_password() {
return user_password;
}
public void setUser_password(String user_password) {
this.user_password = user_password;
}
public String getSalt() {
return salt;
}
public void setSalt(String salt) {
this.salt = salt;
}
public String getUser_email() {
return user_email;
}
public void setUser_email(String user_email) {
this.user_email = user_email;
}
public String getUser_email_password() {
return user_email_password;
}
public void setUser_email_password(String user_email_password) {
this.user_email_password = user_email_password;
}
public String getUser_idcard() {
return user_idcard;
}
public void setUser_idcard(String user_idcard) {
this.user_idcard = user_idcard;
}
public String getUser_qq() {
return user_qq;
}
public void setUser_qq(String user_qq) {
this.user_qq = user_qq;
}
public String getUser_avatar() {
return user_avatar;
}
public void setUser_avatar(String user_avatar) {
this.user_avatar = user_avatar;
}
public Integer getIs_login() {
return is_login;
}
public void setIs_login(Integer is_login) {
this.is_login = is_login;
}
public Date getGmt_create() {
return gmt_create;
}
public void setGmt_create(Date gmt_create) {
this.gmt_create = gmt_create;
}
public Date getGmt_modified() {
return gmt_modified;
}
public void setGmt_modified(Date gmt_modified) {
this.gmt_modified = gmt_modified;
}
public List<SysRole> getRoles() {
return roles;
}
public void setRoles(List<SysRole> roles) {
this.roles = roles;
}
role类:
@Table("sys_role")
@ExcelTarget("sys_role")
public class SysRole implements Serializable {
/**
* 角色信息主键id
*/
@Id
private int pk_role_id;
/**
* 角色名称
*/
@Name
@Excel(name = "名称", width = 20, orderNum = "1")
private String role_name;
/**
* 角色所属部门编号
*/
@Excel(name = "所属部门", width = 20, orderNum = "2")
private Integer pk_dep_id;
/**
* 是否有效 1:有效 0:无效
*/
@Excel(name = "是否有效", width = 20, orderNum = "3", replace = {"已启用_1", "已禁用_0"})
private Integer is_valid;
/**
* 角色备注描述
*/
@Excel(name = "备注描述", width = 20, orderNum = "4")
private String role_remraks;
/**
* 记录创建时间
*/
@Excel(name = "创建时间", orderNum = "5", width = 20, format = "yyyy-MM-dd")
private Date gmt_create;
/**
* 记录最近修改时间
*/
@Excel(name = "修改时间", orderNum = "6", width = 20, format = "yyyy-MM-dd")
private Date gmt_modified;
@ManyMany(from = "pk_role_id", relation = "sys_role_user", to = "user_account")
private List<SysUser> users;
@ManyMany(from = "pk_role_id", relation = "sys_role_menu", to = "pk_menu_id")
protected List<SysMenu> menus;
public int getPk_role_id() {
return pk_role_id;
}
public void setPk_role_id(int pk_role_id) {
this.pk_role_id = pk_role_id;
}
public String getRole_name() {
return role_name;
}
public void setRole_name(String role_name) {
this.role_name = role_name;
}
public Integer getPk_dep_id() {
return pk_dep_id;
}
public void setPk_dep_id(Integer pk_dep_id) {
this.pk_dep_id = pk_dep_id;
}
public Integer getIs_valid() {
return is_valid;
}
public void setIs_valid(Integer is_valid) {
this.is_valid = is_valid;
}
public String getRole_remraks() {
return role_remraks;
}
public void setRole_remraks(String role_remraks) {
this.role_remraks = role_remraks;
}
public Date getGmt_create() {
return gmt_create;
}
public void setGmt_create(Date gmt_create) {
this.gmt_create = gmt_create;
}
public Date getGmt_modified() {
return gmt_modified;
}
public void setGmt_modified(Date gmt_modified) {
this.gmt_modified = gmt_modified;
}
public List<SysUser> getUsers() {
return users;
}
public void setUsers(List<SysUser> users) {
this.users = users;
}
public List<SysMenu> getMenus() {
return menus;
}
public void setMenus(List<SysMenu> menus) {
this.menus = menus;
}