|
@ -0,0 +1,457 @@
|
|
|
package com.yihu.wlyy.entity.manage;
|
|
|
|
|
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
|
import com.google.common.collect.ImmutableList;
|
|
|
import com.yihu.wlyy.entity.IdEntity;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
|
|
|
|
|
import javax.persistence.Column;
|
|
|
import javax.persistence.Entity;
|
|
|
import javax.persistence.Table;
|
|
|
import javax.persistence.Transient;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
|
* 用户表
|
|
|
* @author George
|
|
|
*
|
|
|
*/
|
|
|
@Entity
|
|
|
@Table(name = "wlyy_user")
|
|
|
public class User extends IdEntity {
|
|
|
|
|
|
private static final long serialVersionUID = 5397123441067268436L;
|
|
|
|
|
|
// 用户标识
|
|
|
private String code;
|
|
|
// 姓名
|
|
|
private String name;
|
|
|
// 手机号
|
|
|
private String mobile;
|
|
|
// 登录密码
|
|
|
private String password;
|
|
|
// 密码加密密钥
|
|
|
private String salt;
|
|
|
// 用户类型:1超级管理员,2医生 3客服管理员 4普通客服
|
|
|
private int type;
|
|
|
//用户类型名称
|
|
|
private String typeName;
|
|
|
//用户拥有的权限标识,以逗号分隔
|
|
|
private String roles;
|
|
|
// 用户找拥有的权限以逗号分隔
|
|
|
private String roleName;
|
|
|
// 添加日期
|
|
|
private Date czrq;
|
|
|
// 所属机构
|
|
|
private long organizationId;
|
|
|
|
|
|
// 所属机构名称
|
|
|
private String organizationName;
|
|
|
|
|
|
//客服工号
|
|
|
private String jobNo;
|
|
|
|
|
|
//客服坐席号
|
|
|
private String seat;
|
|
|
|
|
|
//客服电话
|
|
|
private String phone;
|
|
|
|
|
|
//是否在线 0不在线 1离开 2在线
|
|
|
private String online;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public String getCode() {
|
|
|
return code;
|
|
|
}
|
|
|
|
|
|
public void setCode(String code) {
|
|
|
this.code = code;
|
|
|
}
|
|
|
|
|
|
public String getName() {
|
|
|
return name;
|
|
|
}
|
|
|
|
|
|
public void setName(String name) {
|
|
|
this.name = name;
|
|
|
}
|
|
|
|
|
|
public String getMobile() {
|
|
|
return mobile;
|
|
|
}
|
|
|
|
|
|
public void setMobile(String mobile) {
|
|
|
this.mobile = mobile;
|
|
|
}
|
|
|
|
|
|
public String getPassword() {
|
|
|
return password;
|
|
|
}
|
|
|
|
|
|
public void setPassword(String password) {
|
|
|
this.password = password;
|
|
|
}
|
|
|
|
|
|
public String getSalt() {
|
|
|
return salt;
|
|
|
}
|
|
|
|
|
|
public void setSalt(String salt) {
|
|
|
this.salt = salt;
|
|
|
}
|
|
|
|
|
|
public int getType() {
|
|
|
return type;
|
|
|
}
|
|
|
|
|
|
public void setType(int type) {
|
|
|
this.type = type;
|
|
|
}
|
|
|
|
|
|
@Transient
|
|
|
public String getTypeName() {
|
|
|
return typeName;
|
|
|
}
|
|
|
|
|
|
public void setTypeName(String typeName) {
|
|
|
this.typeName = typeName;
|
|
|
}
|
|
|
|
|
|
public String getRoles() {
|
|
|
return roles;
|
|
|
}
|
|
|
|
|
|
public void setRoles(String roles) {
|
|
|
this.roles = roles;
|
|
|
}
|
|
|
|
|
|
@Transient
|
|
|
@JsonIgnore
|
|
|
public String getRoleName() {
|
|
|
return roleName;
|
|
|
}
|
|
|
|
|
|
public void setRoleName(String roleName) {
|
|
|
this.roleName = roleName;
|
|
|
}
|
|
|
|
|
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
|
|
|
public Date getCzrq() {
|
|
|
return czrq;
|
|
|
}
|
|
|
|
|
|
public void setCzrq(Date czrq) {
|
|
|
this.czrq = czrq;
|
|
|
}
|
|
|
|
|
|
@Column(name = "organization_id")
|
|
|
public long getOrganizationId() {
|
|
|
return organizationId;
|
|
|
}
|
|
|
|
|
|
public void setOrganizationId(long organizationId) {
|
|
|
this.organizationId = organizationId;
|
|
|
}
|
|
|
|
|
|
@Transient
|
|
|
public String getOrganizationName() {
|
|
|
return organizationName;
|
|
|
}
|
|
|
|
|
|
public void setOrganizationName(String organizationName) {
|
|
|
this.organizationName = organizationName;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public String toString() {
|
|
|
return ToStringBuilder.reflectionToString(this);
|
|
|
}
|
|
|
|
|
|
@Transient
|
|
|
@JsonIgnore
|
|
|
public List<String> getRoleList() {
|
|
|
// 角色列表在数据库中实际以逗号分隔字符串存储,因此返回不能修改的List.
|
|
|
return ImmutableList.copyOf(StringUtils.split("", ","));
|
|
|
}
|
|
|
|
|
|
public String getJobNo() {
|
|
|
return jobNo;
|
|
|
}
|
|
|
|
|
|
public void setJobNo(String jobNo) {
|
|
|
this.jobNo = jobNo;
|
|
|
}
|
|
|
|
|
|
public String getSeat() {
|
|
|
return seat;
|
|
|
}
|
|
|
|
|
|
public void setSeat(String seat) {
|
|
|
this.seat = seat;
|
|
|
}
|
|
|
|
|
|
public String getPhone() {
|
|
|
return phone;
|
|
|
}
|
|
|
|
|
|
public void setPhone(String phone) {
|
|
|
this.phone = phone;
|
|
|
}
|
|
|
|
|
|
public String getOnline() {
|
|
|
return online;
|
|
|
}
|
|
|
|
|
|
public void setOnline(String online) {
|
|
|
this.online = online;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
*
|
|
|
*/
|
|
|
// private static final long serialVersionUID = 5397123441067268436L;
|
|
|
//
|
|
|
// // 用户标识
|
|
|
// private String code;
|
|
|
// // 添加日期
|
|
|
// private Date czrq;
|
|
|
// //科室code
|
|
|
// private String hospitalDept;
|
|
|
// //是否签约 1是 0否
|
|
|
// private String isSign;
|
|
|
// //职务code
|
|
|
// private String mbjob;
|
|
|
// // 手机号
|
|
|
// private String mobile;
|
|
|
// // 姓名
|
|
|
// private String name;
|
|
|
// //部门code
|
|
|
// private String organizationDept;
|
|
|
// // 所属机构
|
|
|
// private long organizationId;
|
|
|
// // 登录密码
|
|
|
// private String password;
|
|
|
// //简介
|
|
|
// private String remark;
|
|
|
// // 密码加密密钥
|
|
|
// private String salt;
|
|
|
// //性别
|
|
|
// private String sex;
|
|
|
// //专场
|
|
|
// private String speciality;
|
|
|
// // 用户类型:1超级管理员,2医生
|
|
|
// private int type;
|
|
|
//
|
|
|
// // 用户找拥有的权限以逗号分隔
|
|
|
// private String roles;
|
|
|
// // 用户找拥有的权限以逗号分隔
|
|
|
// private String roleName;
|
|
|
// private String photo;
|
|
|
// //职务code
|
|
|
// private String mbjobName;;
|
|
|
// //科室code
|
|
|
// private String hospitalDeptName;
|
|
|
//
|
|
|
// private String organizationDeptName;
|
|
|
//
|
|
|
// public String getCode() {
|
|
|
// return code;
|
|
|
// }
|
|
|
//
|
|
|
// @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
|
|
|
// public Date getCzrq() {
|
|
|
// return czrq;
|
|
|
// }
|
|
|
//
|
|
|
// @Column(name = "hospital_dept")
|
|
|
// public String getHospitalDept() {
|
|
|
// return hospitalDept;
|
|
|
// }
|
|
|
//
|
|
|
// @Column(name = "is_sign")
|
|
|
// public String getIsSign() {
|
|
|
// return isSign;
|
|
|
// }
|
|
|
//
|
|
|
// @Column(name = "mbjob")
|
|
|
// public String getMbjob() {
|
|
|
// return mbjob;
|
|
|
// }
|
|
|
//
|
|
|
// public String getMobile() {
|
|
|
// return mobile;
|
|
|
// }
|
|
|
//
|
|
|
// public String getName() {
|
|
|
// return name;
|
|
|
// }
|
|
|
//
|
|
|
// @Column(name = "organization_dept")
|
|
|
// public String getOrganizationDept() {
|
|
|
// return organizationDept;
|
|
|
// }
|
|
|
//
|
|
|
// @Column(name = "organization_id")
|
|
|
// public long getOrganizationId() {
|
|
|
// return organizationId;
|
|
|
// }
|
|
|
//
|
|
|
// public String getPassword() {
|
|
|
// return password;
|
|
|
// }
|
|
|
//
|
|
|
// @Column(name = "remark")
|
|
|
// public String getRemark() {
|
|
|
// return remark;
|
|
|
// }
|
|
|
//
|
|
|
// @Transient
|
|
|
// @JsonIgnore
|
|
|
// public List<String> getRoleList() {
|
|
|
// // 角色列表在数据库中实际以逗号分隔字符串存储,因此返回不能修改的List.
|
|
|
// return ImmutableList.copyOf(StringUtils.split("", ","));
|
|
|
// }
|
|
|
//
|
|
|
// public String getRoles() {
|
|
|
// return roles;
|
|
|
// }
|
|
|
//
|
|
|
// public String getSalt() {
|
|
|
// return salt;
|
|
|
// }
|
|
|
//
|
|
|
// public String getSex() {
|
|
|
// return sex;
|
|
|
// }
|
|
|
//
|
|
|
//
|
|
|
//
|
|
|
// public String getPhoto() {
|
|
|
// return photo;
|
|
|
// }
|
|
|
//
|
|
|
// public void setPhoto(String photo) {
|
|
|
// this.photo = photo;
|
|
|
// }
|
|
|
//
|
|
|
// @Column(name = "speciality")
|
|
|
// public String getSpeciality() {
|
|
|
// return speciality;
|
|
|
// }
|
|
|
//
|
|
|
// public int getType() {
|
|
|
// return type;
|
|
|
// }
|
|
|
//
|
|
|
// public void setCode(String code) {
|
|
|
// this.code = code;
|
|
|
// }
|
|
|
//
|
|
|
// public void setCzrq(Date czrq) {
|
|
|
// this.czrq = czrq;
|
|
|
// }
|
|
|
//
|
|
|
// public void setHospitalDept(String hospitalDept) {
|
|
|
// this.hospitalDept = hospitalDept;
|
|
|
// }
|
|
|
//
|
|
|
// public void setIsSign(String isSign) {
|
|
|
// this.isSign = isSign;
|
|
|
// }
|
|
|
//
|
|
|
// public void setMbjob(String mbjob) {
|
|
|
// this.mbjob = mbjob;
|
|
|
// }
|
|
|
//
|
|
|
// public void setMobile(String mobile) {
|
|
|
// this.mobile = mobile;
|
|
|
// }
|
|
|
//
|
|
|
// public void setName(String name) {
|
|
|
// this.name = name;
|
|
|
// }
|
|
|
//
|
|
|
// public void setOrganizationDept(String organizationDept) {
|
|
|
// this.organizationDept = organizationDept;
|
|
|
// }
|
|
|
//
|
|
|
// public void setOrganizationId(long organizationId) {
|
|
|
// this.organizationId = organizationId;
|
|
|
// }
|
|
|
//
|
|
|
// public void setPassword(String password) {
|
|
|
// this.password = password;
|
|
|
// }
|
|
|
//
|
|
|
// public void setRemark(String remark) {
|
|
|
// this.remark = remark;
|
|
|
// }
|
|
|
//
|
|
|
// public void setRoles(String roles) {
|
|
|
// this.roles = roles;
|
|
|
// }
|
|
|
//
|
|
|
// public void setSalt(String salt) {
|
|
|
// this.salt = salt;
|
|
|
// }
|
|
|
//
|
|
|
// public void setSex(String sex) {
|
|
|
// this.sex = sex;
|
|
|
// }
|
|
|
//
|
|
|
// public void setSpeciality(String speciality) {
|
|
|
// this.speciality = speciality;
|
|
|
// }
|
|
|
//
|
|
|
// public void setType(int type) {
|
|
|
// this.type = type;
|
|
|
// }
|
|
|
//
|
|
|
// @Override
|
|
|
// public String toString() {
|
|
|
// return ToStringBuilder.reflectionToString(this);
|
|
|
// }
|
|
|
//
|
|
|
// @Transient
|
|
|
// public String getRoleName() {
|
|
|
// return roleName;
|
|
|
// }
|
|
|
//
|
|
|
// public void setRoleName(String roleName) {
|
|
|
// this.roleName = roleName;
|
|
|
// }
|
|
|
//
|
|
|
// @Transient
|
|
|
// public String getMbjobName() {
|
|
|
// return mbjobName;
|
|
|
// }
|
|
|
//
|
|
|
// public void setMbjobName(String mbjobName) {
|
|
|
// this.mbjobName = mbjobName;
|
|
|
// }
|
|
|
//
|
|
|
// @Transient
|
|
|
// public String getHospitalDeptName() {
|
|
|
// return hospitalDeptName;
|
|
|
// }
|
|
|
//
|
|
|
// public void setHospitalDeptName(String hospitalDeptName) {
|
|
|
// this.hospitalDeptName = hospitalDeptName;
|
|
|
// }
|
|
|
//
|
|
|
// @Transient
|
|
|
// public String getOrganizationDeptName() {
|
|
|
// return organizationDeptName;
|
|
|
// }
|
|
|
//
|
|
|
// public void setOrganizationDeptName(String organizationDeptName) {
|
|
|
// this.organizationDeptName = organizationDeptName;
|
|
|
// }
|
|
|
|
|
|
}
|