| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691 |
- package com.dgtly.system.domain;
- import java.util.Date;
- import java.util.List;
- import java.util.Map;
- import javax.validation.constraints.*;
- import com.dgtly.common.core.domain.Ztree;
- import com.fasterxml.jackson.annotation.JsonFormat;
- import org.apache.commons.lang3.builder.ToStringBuilder;
- import org.apache.commons.lang3.builder.ToStringStyle;
- import com.dgtly.common.annotation.Excel;
- import com.dgtly.common.annotation.Excel.ColumnType;
- import com.dgtly.common.annotation.Excel.Type;
- import com.dgtly.common.annotation.Excels;
- import com.dgtly.common.core.domain.BaseEntity;
- /**
- * 用户对象 sys_user
- *
- * @author dgtly
- */
- public class SysUser extends BaseEntity
- {
- private static final long serialVersionUID = 1L;
- /** 用户ID */
- @Excel(name = "用户序号", cellType = ColumnType.NUMERIC, prompt = "用户编号")
- private Long userId;
- /** 公司ID */
- @Excel(name = "公司编号", type = Type.IMPORT)
- private Long companyId;
- /** 部门ID */
- @Excel(name = "部门编号", type = Type.IMPORT)
- private Long deptId;
- /** 部门父ID */
- private Long parentId;
- /** 角色ID */
- private Long roleId;
- /** 登录名称 */
- @Excel(name = "登录名称")
- private String loginName;
- /** 用户名称 */
- @Excel(name = "用户名称")
- private String userName;
- /** 用户邮箱 */
- @Excel(name = "用户邮箱")
- private String email;
- /** 手机号码 */
- @Excel(name = "手机号码")
- private String phonenumber;
- /** 用户性别 */
- @Excel(name = "用户性别", readConverterExp = "0=男,1=女,2=未知")
- private String sex;
- /** 用户头像 */
- private String avatar;
- /** 密码 */
- private String password;
- /** 盐加密 */
- private String salt;
- /** 帐号状态(0正常 1停用) */
- @Excel(name = "帐号状态", readConverterExp = "0=正常,1=停用")
- private String status;
- /** 删除标志(0代表存在 2代表删除) */
- private String delFlag;
- /** 最后登陆IP */
- @Excel(name = "最后登陆IP", type = Type.EXPORT)
- private String loginIp;
- /** 最后登陆时间 */
- @Excel(name = "最后登陆时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss", type = Type.EXPORT)
- private Date loginDate;
- /** 部门对象 */
- @Excels({
- @Excel(name = "部门名称", targetAttr = "deptName", type = Type.EXPORT),
- @Excel(name = "部门负责人", targetAttr = "leader", type = Type.EXPORT)
- })
- private SysDept dept;
- private SysCompany company;
- private List<SysRole> roles;
- /** 角色组 */
- private Long[] roleIds;
- /** 岗位组 */
- private Long[] postIds;
- /** 证件类型 */
- private String idType;
- /** 证件号 */
- private String idNumber;
- /** 注册后id */
- private String accountId;
- /** 是否认证 */
- private String isAuthentication;
- /** 更新时间 */
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
- private Date personAttestationTime;
- /** 接受认证的手机号 */
- private String receiveUrlMobileNo;
- /** 用户销售信息扩展 */
- private SysUserExt sysUserExt;
- /** 用户销售信息扩展 */
- private List<SysUserExt> sysUserExtLsit;
- /** 是否收货人 0否 1是*/
- private String isConsignee;
- /** 自主下单是否授权(0否1是)*/
- private String isIndependently;
- /**自提是否授权 0否1是*/
- private String isSelfDelivery;
- /*企业认证状态0未认证1已认证*/
- private String isOrgAuthentication;
- /*企业认证时间*/
- private Date orgAttestationTime;
- /** 是否同步 */
- private String isSync;
- /**
- * 订单在线权限
- */
- private List<Ztree> author;
- /** 用户权限 TUC*/
- private String authorType;
- //2离职
- private String quit;
- //门店账号标识 1门店账号 0非门店账号
- private String isShopAccount;
- private String shopType;
- //大区
- private String officeName;
- //销售部
- private String subOfficeName;
- //销售部编码
- private String subOfficeCode;
- //公司名称
- private String companyName;
- //应用类型对应关系
- private List<Map<String,Object> >loginTypeList;
- //门店对应关系
- private List<Map<String,Object> >loginTypeInfo;
- public void setLoginTypeInfo(List<Map<String, Object>> loginTypeInfo) {
- this.loginTypeInfo = loginTypeInfo;
- }
- public List<Map<String, Object>> getLoginTypeInfo() {
- return loginTypeInfo;
- }
- public void setLoginTypeList(List<Map<String, Object>> loginTypeList) {
- this.loginTypeList = loginTypeList;
- }
- public List<Map<String, Object>> getLoginTypeList() {
- return loginTypeList;
- }
- public String getCompanyName() {
- return companyName;
- }
- public String getSubOfficeCode() {
- return subOfficeCode;
- }
- public void setSubOfficeCode(String subOfficeCode) {
- this.subOfficeCode = subOfficeCode;
- }
- public void setCompanyName(String companyName) {
- this.companyName = companyName;
- }
- public String getQuit(){return quit;}
- public String getShopType() {
- return shopType;
- }
- public void setShopType(String shopType) {
- this.shopType = shopType;
- }
- public String getIsShopAccount() {
- return isShopAccount;
- }
- public void setIsShopAccount(String isShopAccount) {
- this.isShopAccount = isShopAccount;
- }
- public void setQuit(String quit){this.quit=quit;}
- public String getAuthorType() {
- return authorType;
- }
- public void setAuthorType(String authorType) {
- this.authorType = authorType;
- }
- // /** 所属销售组织等级 详见字典(sales_level) */
- // private String salesLevel;
- //
- // /** 所属销售组织名称 */
- // private String orgName;
- //
- // /** 所属销售组织code */
- // private String orgCode;
- public SysUser()
- {
- }
- public String getIsSelfDelivery() {
- return isSelfDelivery;
- }
- public String getOfficeName() {
- return officeName;
- }
- public void setOfficeName(String officeName) {
- this.officeName = officeName;
- }
- public String getSubOfficeName() {
- return subOfficeName;
- }
- public void setSubOfficeName(String subOfficeName) {
- this.subOfficeName = subOfficeName;
- }
- public void setIsSelfDelivery(String isSelfDelivery) {
- this.isSelfDelivery = isSelfDelivery;
- }
- public String getIsIndependently() {
- return isIndependently;
- }
- public void setIsIndependently(String isIndependently) {
- this.isIndependently = isIndependently;
- }
- public List<Ztree> getAuthor() {
- return author;
- }
- public void setAuthor(List<Ztree> author) {
- this.author = author;
- }
- public SysUser(Long userId)
- {
- this.userId = userId;
- }
- public Long getCompanyId() {
- return companyId;
- }
- public void setCompanyId(Long companyId) {
- this.companyId = companyId;
- }
- public Long getUserId()
- {
- return userId;
- }
- public void setUserId(Long userId)
- {
- this.userId = userId;
- }
- public boolean isAdmin()
- {
- return isAdmin(this.userId);
- }
- public static boolean isAdmin(Long userId)
- {
- return userId != null && 1L == userId;
- }
- public Long getDeptId()
- {
- return deptId;
- }
- public void setDeptId(Long deptId)
- {
- this.deptId = deptId;
- }
- public Long getParentId()
- {
- return parentId;
- }
- public void setParentId(Long parentId)
- {
- this.parentId = parentId;
- }
- public Long getRoleId()
- {
- return roleId;
- }
- public void setRoleId(Long roleId)
- {
- this.roleId = roleId;
- }
- @NotBlank(message = "登录账号不能为空")
- @Size(min = 0, max = 30, message = "登录账号长度不能超过30个字符")
- public String getLoginName()
- {
- return loginName;
- }
- public void setLoginName(String loginName)
- {
- this.loginName = loginName;
- }
- @Size(min = 0, max = 30, message = "用户昵称长度不能超过30个字符")
- public String getUserName()
- {
- return userName;
- }
- public void setUserName(String userName)
- {
- this.userName = userName;
- }
- @Email(message = "邮箱格式不正确")
- @Size(min = 0, max = 50, message = "邮箱长度不能超过50个字符")
- public String getEmail()
- {
- return email;
- }
- public void setEmail(String email)
- {
- this.email = email;
- }
- @Size(min = 0, max = 11, message = "手机号码长度不能超过11个字符")
- public String getPhonenumber()
- {
- return phonenumber;
- }
- public void setPhonenumber(String phonenumber)
- {
- this.phonenumber = phonenumber;
- }
- public String getSex()
- {
- return sex;
- }
- public void setSex(String sex)
- {
- this.sex = sex;
- }
- public String getAvatar()
- {
- return avatar;
- }
- public void setAvatar(String avatar)
- {
- this.avatar = avatar;
- }
- 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 String getStatus()
- {
- return status;
- }
- public void setStatus(String status)
- {
- this.status = status;
- }
- public String getDelFlag()
- {
- return delFlag;
- }
- public void setDelFlag(String delFlag)
- {
- this.delFlag = delFlag;
- }
- public String getLoginIp()
- {
- return loginIp;
- }
- public void setLoginIp(String loginIp)
- {
- this.loginIp = loginIp;
- }
- public Date getLoginDate()
- {
- return loginDate;
- }
- public void setLoginDate(Date loginDate)
- {
- this.loginDate = loginDate;
- }
- public SysDept getDept()
- {
- if (dept == null)
- {
- dept = new SysDept();
- }
- return dept;
- }
- public SysCompany getCompany() {
- return company;
- }
- public void setCompany(SysCompany company) {
- this.company = company;
- }
- public void setDept(SysDept dept)
- {
- this.dept = dept;
- }
- public List<SysRole> getRoles()
- {
- return roles;
- }
- public void setRoles(List<SysRole> roles)
- {
- this.roles = roles;
- }
- public Long[] getRoleIds()
- {
- return roleIds;
- }
- public void setRoleIds(Long[] roleIds)
- {
- this.roleIds = roleIds;
- }
- public Long[] getPostIds()
- {
- return postIds;
- }
- public void setPostIds(Long[] postIds)
- {
- this.postIds = postIds;
- }
- private String workAddr;
- private String workSchedul;
- private String addrNum;
- private String schedulDetail;
- public String getWorkAddr() {
- return workAddr;
- }
- public void setWorkAddr(String workAddr) {
- this.workAddr = workAddr;
- }
- public String getWorkSchedul() {
- return workSchedul;
- }
- public void setWorkSchedul(String workSchedul) {
- this.workSchedul = workSchedul;
- }
- public String getAddrNum() {
- return addrNum;
- }
- public void setAddrNum(String addrNum) {
- this.addrNum = addrNum;
- }
- public String getSchedulDetail() {
- return schedulDetail;
- }
- public void setSchedulDetail(String schedulDetail) {
- this.schedulDetail = schedulDetail;
- }
- public SysUserExt getSysUserExt() {
- return sysUserExt;
- }
- public void setSysUserExt(SysUserExt sysUserExt) {
- this.sysUserExt = sysUserExt;
- }
- public String getIdType() {
- return idType;
- }
- public void setIdType(String idType) {
- this.idType = idType;
- }
- public String getIdNumber() {
- return idNumber;
- }
- public void setIdNumber(String idNumber) {
- this.idNumber = idNumber;
- }
- public String getAccountId() {
- return accountId;
- }
- public void setAccountId(String accountId) {
- this.accountId = accountId;
- }
- public String getIsAuthentication() {
- return isAuthentication;
- }
- public void setIsAuthentication(String isAuthentication) {
- this.isAuthentication = isAuthentication;
- }
- public Date getPersonAttestationTime() {
- return personAttestationTime;
- }
- public void setPersonAttestationTime(Date personAttestationTime) {
- this.personAttestationTime = personAttestationTime;
- }
- public String getReceiveUrlMobileNo() {
- return receiveUrlMobileNo;
- }
- public void setReceiveUrlMobileNo(String receiveUrlMobileNo) {
- this.receiveUrlMobileNo = receiveUrlMobileNo;
- }
- public String getIsConsignee() {
- return isConsignee;
- }
- public void setIsConsignee(String isConsignee) {
- this.isConsignee = isConsignee;
- }
- public String getIsOrgAuthentication() {
- return isOrgAuthentication;
- }
- public void setIsOrgAuthentication(String isOrgAuthentication) {
- this.isOrgAuthentication = isOrgAuthentication;
- }
- public Date getOrgAttestationTime() {
- return orgAttestationTime;
- }
- public void setOrgAttestationTime(Date orgAttestationTime) {
- this.orgAttestationTime = orgAttestationTime;
- }
- public List<SysUserExt> getSysUserExtLsit() {
- return sysUserExtLsit;
- }
- public void setSysUserExtLsit(List<SysUserExt> sysUserExtLsit) {
- this.sysUserExtLsit = sysUserExtLsit;
- }
- public String getIsSync() {
- return isSync;
- }
- public void setIsSync(String isSync) {
- this.isSync = isSync;
- }
- @Override
- public String toString() {
- return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
- .append("userId", getUserId())
- .append("deptId", getDeptId())
- .append("companyId", getDeptId())
- .append("loginName", getLoginName())
- .append("userName", getUserName())
- .append("email", getEmail())
- .append("phonenumber", getPhonenumber())
- .append("sex", getSex())
- .append("avatar", getAvatar())
- .append("password", getPassword())
- .append("salt", getSalt())
- .append("status", getStatus())
- .append("delFlag", getDelFlag())
- .append("loginIp", getLoginIp())
- .append("loginDate", getLoginDate())
- .append("createBy", getCreateBy())
- .append("createTime", getCreateTime())
- .append("updateBy", getUpdateBy())
- .append("updateTime", getUpdateTime())
- .append("remark", getRemark())
- .append("dept", getDept())
- .toString();
- }
- }
|