29 lines
973 B
Java
29 lines
973 B
Java
package com.zhgd.xmgl.security.entity;
|
|
|
|
import org.springframework.security.core.GrantedAuthority;
|
|
import org.springframework.security.core.userdetails.User;
|
|
|
|
import java.util.Collection;
|
|
|
|
public class UserInfo extends User {
|
|
private Long userId;
|
|
|
|
public UserInfo(String username, String password, Collection<? extends GrantedAuthority> authorities, Long userId) {
|
|
super(username, password, authorities);
|
|
this.userId = userId;
|
|
}
|
|
|
|
public UserInfo(String username, String password, boolean enabled, boolean accountNonExpired, boolean credentialsNonExpired, boolean accountNonLocked, Collection<? extends GrantedAuthority> authorities, Long userId) {
|
|
super(username, password, enabled, accountNonExpired, credentialsNonExpired, accountNonLocked, authorities);
|
|
this.userId = userId;
|
|
}
|
|
|
|
public Long getUserId() {
|
|
return userId;
|
|
}
|
|
|
|
public void setUserId(Long userId) {
|
|
this.userId = userId;
|
|
}
|
|
}
|