浏览代码

userInfo

userAuth
master
Lierbao 1年前
父节点
当前提交
24deed45e6
共有 3 个文件被更改,包括 24 次插入15 次删除
  1. +16
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/user/security/auth/model/UserFullInfoDTO.java
  2. +0
    -6
      pmapi/src/main/java/com/ningdatech/pmapi/user/security/auth/model/UserInfoDetails.java
  3. +8
    -9
      pmapi/src/main/java/com/ningdatech/pmapi/user/security/auth/password/PasswordLoginUserDetailService.java

+ 16
- 0
pmapi/src/main/java/com/ningdatech/pmapi/user/security/auth/model/UserFullInfoDTO.java 查看文件

@@ -9,4 +9,20 @@ import lombok.Data;

@Data
public class UserFullInfoDTO {

private Long userId;

private String realName;

private String username;

private String identifier;

private String credential;

private String role;

private Long regionCode;

private Long companyId;
}

+ 0
- 6
pmapi/src/main/java/com/ningdatech/pmapi/user/security/auth/model/UserInfoDetails.java 查看文件

@@ -9,7 +9,6 @@ import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;

import java.util.Collection;
import java.util.List;

/**
* @author LiuXinXin
@@ -33,11 +32,6 @@ public class UserInfoDetails extends AbstractLoginUser implements UserDetails {
private Long companyId;

/**
* 所负责公司id列表
*/
private List<Long> responsibleCompanyIdList;

/**
* 获取用户权限
*
* @return


+ 8
- 9
pmapi/src/main/java/com/ningdatech/pmapi/user/security/auth/password/PasswordLoginUserDetailService.java 查看文件

@@ -29,15 +29,14 @@ public class PasswordLoginUserDetailService implements UserDetailsService {
throw new UsernameNotFoundException(String.format("%s user not exist", username));
}
UserInfoDetails userInfoDetails = new UserInfoDetails();
// userInfoDetails.setUserId(userFullInfoDTO.getUserId());
// userInfoDetails.setUsername(userFullInfoDTO.getUsername());
// userInfoDetails.setRealName(userFullInfoDTO.getRealName());
// userInfoDetails.setRole(userFullInfoDTO.getRole());
// userInfoDetails.setRegionCode(userFullInfoDTO.getRegionCode());
// userInfoDetails.setCompanyId(userFullInfoDTO.getCompanyId());
// userInfoDetails.setResponsibleCompanyIdList(userFullInfoDTO.getResponsibleCompanyIdList());
// userInfoDetails.setIdentifier(userFullInfoDTO.getIdentifier());
// userInfoDetails.setPassword(userFullInfoDTO.getCredential());
userInfoDetails.setUserId(userFullInfoDTO.getUserId());
userInfoDetails.setUsername(userFullInfoDTO.getUsername());
userInfoDetails.setRealName(userFullInfoDTO.getRealName());
userInfoDetails.setRole(userFullInfoDTO.getRole());
userInfoDetails.setRegionCode(userFullInfoDTO.getRegionCode());
userInfoDetails.setCompanyId(userFullInfoDTO.getCompanyId());
userInfoDetails.setIdentifier(userFullInfoDTO.getIdentifier());
userInfoDetails.setPassword(userFullInfoDTO.getCredential());
return userInfoDetails;
}
}

正在加载...
取消
保存