|
|
@@ -12,82 +12,109 @@ import org.springframework.security.core.userdetails.UserDetails;
|
|
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
|
|
|
|
|
/**
|
|
|
- * 文件名:User
|
|
|
- * 版本信息:日期:2017/3/30 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
|
|
|
+ * 文件名:User 版本信息:日期:2017/3/30 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
|
|
|
*/
|
|
|
@Data
|
|
|
-public class User implements UserDetails {
|
|
|
- private Integer id;
|
|
|
- private String username;
|
|
|
- private String truename;
|
|
|
- private Integer age;
|
|
|
- //工号
|
|
|
- private String workno;
|
|
|
- //身份证
|
|
|
- private String idno;
|
|
|
- //手机号
|
|
|
- private String mobile;
|
|
|
- //性别
|
|
|
- private String sex;
|
|
|
- //生日
|
|
|
- private Date birth;
|
|
|
- //部门id
|
|
|
- private Integer deptId;
|
|
|
- //职位id
|
|
|
- private Integer positionId;
|
|
|
- @JsonIgnore
|
|
|
- private String password;
|
|
|
- @JsonIgnore
|
|
|
- private List<Role> roles;
|
|
|
- private List<? extends GrantedAuthority> authorities;
|
|
|
-
|
|
|
-
|
|
|
- public User(){
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- public User(String username, String password, List<GrantedAuthority> grantedAuthorities) {
|
|
|
- this.username = username;
|
|
|
- this.password = password;
|
|
|
- this.authorities = grantedAuthorities;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- @JsonIgnore
|
|
|
- @Override
|
|
|
- public boolean isAccountNonExpired() {
|
|
|
- return true;
|
|
|
- }
|
|
|
-
|
|
|
- @JsonIgnore
|
|
|
- @Override
|
|
|
- public boolean isAccountNonLocked() {
|
|
|
- return true;
|
|
|
- }
|
|
|
-
|
|
|
- @JsonIgnore
|
|
|
- @Override
|
|
|
- public boolean isCredentialsNonExpired() {
|
|
|
- return true;
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- @JsonIgnore
|
|
|
- @Override
|
|
|
- public boolean isEnabled() {
|
|
|
- return true;
|
|
|
- }
|
|
|
-
|
|
|
- @JsonIgnore
|
|
|
- @Override
|
|
|
- public Collection<? extends GrantedAuthority> getAuthorities() {
|
|
|
- return authorities;
|
|
|
- }
|
|
|
-
|
|
|
- public void setGrantedAuthorities(List<? extends GrantedAuthority> authorities) {
|
|
|
- this.authorities = authorities;
|
|
|
- }
|
|
|
-
|
|
|
+public class User implements UserDetails {
|
|
|
+ private Integer id;
|
|
|
+ // 登录名
|
|
|
+ private String username;
|
|
|
+ // 姓名
|
|
|
+ private String truename;
|
|
|
+ // 密码
|
|
|
+ @JsonIgnore
|
|
|
+ private String password;
|
|
|
+ // 组织机构ID
|
|
|
+ private int organid;
|
|
|
+ // 班次
|
|
|
+ private int classid;
|
|
|
+ // 电话号码
|
|
|
+ private String phone;
|
|
|
+ // 状态(-1-删除;1未删除)
|
|
|
+ private int status;
|
|
|
+ // 手机号
|
|
|
+ private String mobile;
|
|
|
+ // 短号
|
|
|
+ private String cornet;
|
|
|
+ // 手机号是否为外地 0:不是 1:是
|
|
|
+ private String mobileaddress;
|
|
|
+ // 座机号是否为外地 0:不是 1:是
|
|
|
+ private String phoneadderss;
|
|
|
+ // 工号
|
|
|
+ private String worknumber;
|
|
|
+ // 工号+密码组合后的值
|
|
|
+ private String workidpassword;
|
|
|
+ // 是否内部人员(1-是 2-否)
|
|
|
+ private String isinner;
|
|
|
+ // 是否是经理
|
|
|
+ private String ismanage;
|
|
|
+ // 宅电
|
|
|
+ private String homephone;
|
|
|
+ // 宅电是否为外地 0:不是 1:是
|
|
|
+ private String homephoneadderss;
|
|
|
+ // 手机号2
|
|
|
+ private String mobile2;
|
|
|
+ // 手机号2是否为外地 0:不是 1:是
|
|
|
+ private String ismobileaddress;
|
|
|
+ // 生日
|
|
|
+ private Date birth;
|
|
|
+ // 年龄
|
|
|
+ private int age;
|
|
|
+ // 职位ID
|
|
|
+ private int positionid;
|
|
|
+ // 性别
|
|
|
+ private String sex;
|
|
|
+ // 工号
|
|
|
+ private int workno;
|
|
|
+ // 身份证号
|
|
|
+ private String idno;
|
|
|
+
|
|
|
+ @JsonIgnore
|
|
|
+ private List<Role> roles;
|
|
|
+ private List<? extends GrantedAuthority> authorities;
|
|
|
+
|
|
|
+ public User() {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ public User(String username, String password, List<GrantedAuthority> grantedAuthorities) {
|
|
|
+ this.username = username;
|
|
|
+ this.password = password;
|
|
|
+ this.authorities = grantedAuthorities;
|
|
|
+ }
|
|
|
+
|
|
|
+ @JsonIgnore
|
|
|
+ @Override
|
|
|
+ public boolean isAccountNonExpired() {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ @JsonIgnore
|
|
|
+ @Override
|
|
|
+ public boolean isAccountNonLocked() {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ @JsonIgnore
|
|
|
+ @Override
|
|
|
+ public boolean isCredentialsNonExpired() {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ @JsonIgnore
|
|
|
+ @Override
|
|
|
+ public boolean isEnabled() {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ @JsonIgnore
|
|
|
+ @Override
|
|
|
+ public Collection<? extends GrantedAuthority> getAuthorities() {
|
|
|
+ return authorities;
|
|
|
+ }
|
|
|
+
|
|
|
+ public void setGrantedAuthorities(List<? extends GrantedAuthority> authorities) {
|
|
|
+ this.authorities = authorities;
|
|
|
+ }
|
|
|
|
|
|
}
|