|
@@ -1,16 +1,10 @@
|
|
|
package com.diagbot.entity;
|
|
|
|
|
|
+import com.baomidou.mybatisplus.annotation.TableName;
|
|
|
import com.baomidou.mybatisplus.annotation.IdType;
|
|
|
import com.baomidou.mybatisplus.annotation.TableId;
|
|
|
-import com.baomidou.mybatisplus.annotation.TableName;
|
|
|
-import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
|
-import org.springframework.security.core.GrantedAuthority;
|
|
|
-import org.springframework.security.core.userdetails.UserDetails;
|
|
|
-
|
|
|
+import java.time.LocalDateTime;
|
|
|
import java.io.Serializable;
|
|
|
-import java.util.Collection;
|
|
|
-import java.util.Date;
|
|
|
-import java.util.List;
|
|
|
|
|
|
/**
|
|
|
* <p>
|
|
@@ -18,10 +12,10 @@ import java.util.List;
|
|
|
* </p>
|
|
|
*
|
|
|
* @author gaodm
|
|
|
- * @since 2018-08-30
|
|
|
+ * @since 2020-04-09
|
|
|
*/
|
|
|
@TableName("sys_user")
|
|
|
-public class User implements UserDetails, Serializable {
|
|
|
+public class User implements Serializable {
|
|
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
|
@@ -39,12 +33,12 @@ public class User implements UserDetails, Serializable {
|
|
|
/**
|
|
|
* 记录创建时间
|
|
|
*/
|
|
|
- private Date gmtCreate;
|
|
|
+ private LocalDateTime gmtCreate;
|
|
|
|
|
|
/**
|
|
|
* 记录修改时间,如果时间是1970年则表示纪录未修改
|
|
|
*/
|
|
|
- private Date gmtModified;
|
|
|
+ private LocalDateTime gmtModified;
|
|
|
|
|
|
/**
|
|
|
* 创建人,0表示无创建人值
|
|
@@ -56,51 +50,60 @@ public class User implements UserDetails, Serializable {
|
|
|
*/
|
|
|
private String modifier;
|
|
|
|
|
|
+ /**
|
|
|
+ * 用户名
|
|
|
+ */
|
|
|
+ private String username;
|
|
|
+
|
|
|
/**
|
|
|
* 用户密码
|
|
|
*/
|
|
|
private String password;
|
|
|
|
|
|
/**
|
|
|
- * 用户名
|
|
|
+ * 联系人
|
|
|
*/
|
|
|
- private String username;
|
|
|
+ private String linkman;
|
|
|
|
|
|
- private List<? extends GrantedAuthority> authorities;
|
|
|
+ /**
|
|
|
+ * 手机号(如果是客户,phone与username是一样的)
|
|
|
+ */
|
|
|
+ private String phone;
|
|
|
|
|
|
- @Override
|
|
|
- @JsonIgnore
|
|
|
- public boolean isAccountNonExpired() {
|
|
|
- return true;
|
|
|
- }
|
|
|
+ /**
|
|
|
+ * 所属岗位
|
|
|
+ */
|
|
|
+ private String position;
|
|
|
|
|
|
- @Override
|
|
|
- @JsonIgnore
|
|
|
- public boolean isAccountNonLocked() {
|
|
|
- return true;
|
|
|
- }
|
|
|
+ /**
|
|
|
+ * 所属部门
|
|
|
+ */
|
|
|
+ private String dept;
|
|
|
|
|
|
- @Override
|
|
|
- @JsonIgnore
|
|
|
- public boolean isCredentialsNonExpired() {
|
|
|
- return true;
|
|
|
- }
|
|
|
+ /**
|
|
|
+ * 邮箱
|
|
|
+ */
|
|
|
+ private String email;
|
|
|
|
|
|
- @Override
|
|
|
- @JsonIgnore
|
|
|
- public boolean isEnabled() {
|
|
|
- return true;
|
|
|
- }
|
|
|
+ /**
|
|
|
+ * 认证状态: 0 未认证,1 已认证,2 认证中
|
|
|
+ */
|
|
|
+ private Integer authStatus;
|
|
|
|
|
|
- @JsonIgnore
|
|
|
- public Collection<? extends GrantedAuthority> getAuthorities() {
|
|
|
- return authorities;
|
|
|
- }
|
|
|
+ /**
|
|
|
+ * 认证通过时间
|
|
|
+ */
|
|
|
+ private LocalDateTime passauthTime;
|
|
|
|
|
|
- public void setGrantedAuthorities(List<? extends GrantedAuthority> authorities) {
|
|
|
- this.authorities = authorities;
|
|
|
- }
|
|
|
+ /**
|
|
|
+ * 1内部用户,0外部用户(默认0)
|
|
|
+ */
|
|
|
+ private Integer type;
|
|
|
|
|
|
+ /**
|
|
|
+ * 备注
|
|
|
+ */
|
|
|
+ private String remark;
|
|
|
|
|
|
public Long getId() {
|
|
|
return id;
|
|
@@ -109,7 +112,6 @@ public class User implements UserDetails, Serializable {
|
|
|
public void setId(Long id) {
|
|
|
this.id = id;
|
|
|
}
|
|
|
-
|
|
|
public String getIsDeleted() {
|
|
|
return isDeleted;
|
|
|
}
|
|
@@ -117,23 +119,20 @@ public class User implements UserDetails, Serializable {
|
|
|
public void setIsDeleted(String isDeleted) {
|
|
|
this.isDeleted = isDeleted;
|
|
|
}
|
|
|
-
|
|
|
- public Date getGmtCreate() {
|
|
|
+ public LocalDateTime getGmtCreate() {
|
|
|
return gmtCreate;
|
|
|
}
|
|
|
|
|
|
- public void setGmtCreate(Date gmtCreate) {
|
|
|
+ public void setGmtCreate(LocalDateTime gmtCreate) {
|
|
|
this.gmtCreate = gmtCreate;
|
|
|
}
|
|
|
-
|
|
|
- public Date getGmtModified() {
|
|
|
+ public LocalDateTime getGmtModified() {
|
|
|
return gmtModified;
|
|
|
}
|
|
|
|
|
|
- public void setGmtModified(Date gmtModified) {
|
|
|
+ public void setGmtModified(LocalDateTime gmtModified) {
|
|
|
this.gmtModified = gmtModified;
|
|
|
}
|
|
|
-
|
|
|
public String getCreator() {
|
|
|
return creator;
|
|
|
}
|
|
@@ -141,7 +140,6 @@ public class User implements UserDetails, Serializable {
|
|
|
public void setCreator(String creator) {
|
|
|
this.creator = creator;
|
|
|
}
|
|
|
-
|
|
|
public String getModifier() {
|
|
|
return modifier;
|
|
|
}
|
|
@@ -149,7 +147,13 @@ public class User implements UserDetails, Serializable {
|
|
|
public void setModifier(String modifier) {
|
|
|
this.modifier = modifier;
|
|
|
}
|
|
|
+ public String getUsername() {
|
|
|
+ return username;
|
|
|
+ }
|
|
|
|
|
|
+ public void setUsername(String username) {
|
|
|
+ this.username = username;
|
|
|
+ }
|
|
|
public String getPassword() {
|
|
|
return password;
|
|
|
}
|
|
@@ -157,26 +161,90 @@ public class User implements UserDetails, Serializable {
|
|
|
public void setPassword(String password) {
|
|
|
this.password = password;
|
|
|
}
|
|
|
+ public String getLinkman() {
|
|
|
+ return linkman;
|
|
|
+ }
|
|
|
|
|
|
- public String getUsername() {
|
|
|
- return username;
|
|
|
+ public void setLinkman(String linkman) {
|
|
|
+ this.linkman = linkman;
|
|
|
+ }
|
|
|
+ public String getPhone() {
|
|
|
+ return phone;
|
|
|
}
|
|
|
|
|
|
- public void setUsername(String username) {
|
|
|
- this.username = username;
|
|
|
+ public void setPhone(String phone) {
|
|
|
+ this.phone = phone;
|
|
|
+ }
|
|
|
+ public String getPosition() {
|
|
|
+ return position;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setPosition(String position) {
|
|
|
+ this.position = position;
|
|
|
+ }
|
|
|
+ public String getDept() {
|
|
|
+ return dept;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setDept(String dept) {
|
|
|
+ this.dept = dept;
|
|
|
+ }
|
|
|
+ public String getEmail() {
|
|
|
+ return email;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setEmail(String email) {
|
|
|
+ this.email = email;
|
|
|
+ }
|
|
|
+ public Integer getAuthStatus() {
|
|
|
+ return authStatus;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setAuthStatus(Integer authStatus) {
|
|
|
+ this.authStatus = authStatus;
|
|
|
+ }
|
|
|
+ public LocalDateTime getPassauthTime() {
|
|
|
+ return passauthTime;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setPassauthTime(LocalDateTime passauthTime) {
|
|
|
+ this.passauthTime = passauthTime;
|
|
|
+ }
|
|
|
+ public Integer getType() {
|
|
|
+ return type;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setType(Integer type) {
|
|
|
+ this.type = type;
|
|
|
+ }
|
|
|
+ public String getRemark() {
|
|
|
+ return remark;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setRemark(String remark) {
|
|
|
+ this.remark = remark;
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public String toString() {
|
|
|
return "User{" +
|
|
|
- "id=" + id +
|
|
|
- ", isDeleted=" + isDeleted +
|
|
|
- ", gmtCreate=" + gmtCreate +
|
|
|
- ", gmtModified=" + gmtModified +
|
|
|
- ", creator=" + creator +
|
|
|
- ", modifier=" + modifier +
|
|
|
- ", password=" + password +
|
|
|
- ", username=" + username +
|
|
|
- "}";
|
|
|
+ "id=" + id +
|
|
|
+ ", isDeleted=" + isDeleted +
|
|
|
+ ", gmtCreate=" + gmtCreate +
|
|
|
+ ", gmtModified=" + gmtModified +
|
|
|
+ ", creator=" + creator +
|
|
|
+ ", modifier=" + modifier +
|
|
|
+ ", username=" + username +
|
|
|
+ ", password=" + password +
|
|
|
+ ", linkman=" + linkman +
|
|
|
+ ", phone=" + phone +
|
|
|
+ ", position=" + position +
|
|
|
+ ", dept=" + dept +
|
|
|
+ ", email=" + email +
|
|
|
+ ", authStatus=" + authStatus +
|
|
|
+ ", passauthTime=" + passauthTime +
|
|
|
+ ", type=" + type +
|
|
|
+ ", remark=" + remark +
|
|
|
+ "}";
|
|
|
}
|
|
|
}
|