Browse Source

增加用户名

master
WendyYang 8 months ago
parent
commit
e25d37f0a5
4 changed files with 9 additions and 0 deletions
  1. +1
    -0
      kq-vas-api/src/main/java/com/ningdatech/kqapi/security/password/UsernamePasswordAuthFilter.java
  2. +2
    -0
      kq-vas-api/src/main/java/com/ningdatech/kqapi/user/manage/UserInfoManage.java
  3. +3
    -0
      kq-vas-api/src/main/java/com/ningdatech/kqapi/user/model/vo/LoginUserDetailVO.java
  4. +3
    -0
      kq-vas-api/src/main/java/com/ningdatech/kqapi/user/model/vo/UserListVO.java

+ 1
- 0
kq-vas-api/src/main/java/com/ningdatech/kqapi/security/password/UsernamePasswordAuthFilter.java View File

@@ -49,6 +49,7 @@ public class UsernamePasswordAuthFilter extends AbstractAuthenticationProcessing
} catch (BadCredentialsException | UsernameNotFoundException e) {
throw e;
} catch (Exception e) {
logger.error("登录失败:", e);
throw BizException.wrap("登录失败,请联系管理员!");
}
}


+ 2
- 0
kq-vas-api/src/main/java/com/ningdatech/kqapi/user/manage/UserInfoManage.java View File

@@ -165,6 +165,7 @@ public class UserInfoManage {
UserListVO res = new UserListVO();
res.setUserId(r.getId());
res.setRealName(r.getRealName());
res.setUserName(r.getUsername());
res.setCreateTime(r.getCreateOn());
res.setPhoneNo(r.getMobile());
res.setAccountStatus(r.getAccountStatus());
@@ -178,6 +179,7 @@ public class UserInfoManage {
LoginUserDetailVO result = new LoginUserDetailVO();
result.setUserId(details.getUserId());
result.setRealName(details.getRealName());
result.setUserName(details.getIdentifier());
return result;
}



+ 3
- 0
kq-vas-api/src/main/java/com/ningdatech/kqapi/user/model/vo/LoginUserDetailVO.java View File

@@ -19,6 +19,9 @@ public class LoginUserDetailVO {
@ApiModelProperty("用户id")
private Long userId;

@ApiModelProperty("用户名")
private String userName;

@ApiModelProperty("用户真实姓名")
private String realName;



+ 3
- 0
kq-vas-api/src/main/java/com/ningdatech/kqapi/user/model/vo/UserListVO.java View File

@@ -23,6 +23,9 @@ public class UserListVO {
@ApiModelProperty("用户id")
private Long userId;

@ApiModelProperty("用户名")
private String userName;

@ApiModelProperty("用户姓名")
private String realName;



Loading…
Cancel
Save