|
|
@@ -1,73 +0,0 @@ |
|
|
|
package com.ningdatech.pmapi.user.model; |
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.Collection; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
import org.springframework.security.core.GrantedAuthority; |
|
|
|
import org.springframework.security.core.userdetails.UserDetails; |
|
|
|
|
|
|
|
import com.ningdatech.basic.auth.AbstractLoginUser; |
|
|
|
|
|
|
|
import lombok.Data; |
|
|
|
import lombok.EqualsAndHashCode; |
|
|
|
|
|
|
|
/** |
|
|
|
* @author LiuXinXin |
|
|
|
* @date 2022/8/1 下午3:32 |
|
|
|
*/ |
|
|
|
@Data |
|
|
|
@EqualsAndHashCode(callSuper = true) |
|
|
|
public class UserInfoDetails extends AbstractLoginUser implements UserDetails { |
|
|
|
|
|
|
|
private static final long serialVersionUID = 1L; |
|
|
|
|
|
|
|
private String nickName; |
|
|
|
|
|
|
|
private String password; |
|
|
|
|
|
|
|
private List<String> roleList; |
|
|
|
|
|
|
|
private Integer dataScope; |
|
|
|
|
|
|
|
private Long roleId; |
|
|
|
|
|
|
|
private Long companyId; |
|
|
|
|
|
|
|
private String companyName; |
|
|
|
|
|
|
|
private Long regionId; |
|
|
|
|
|
|
|
private String regionName; |
|
|
|
|
|
|
|
private List<Long> roleIdList; |
|
|
|
|
|
|
|
/** |
|
|
|
* 获取用户权限 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public Collection<? extends GrantedAuthority> getAuthorities() { |
|
|
|
return new ArrayList<>(); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public boolean isAccountNonExpired() { |
|
|
|
return true; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public boolean isAccountNonLocked() { |
|
|
|
return true; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public boolean isCredentialsNonExpired() { |
|
|
|
return true; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public boolean isEnabled() { |
|
|
|
return true; |
|
|
|
} |
|
|
|
|
|
|
|
} |