添加登录用户头像字段

This commit is contained in:
wanggeng888 2021-01-20 18:48:10 +08:00
parent 3d1dd27edc
commit 73b24c5941
3 changed files with 7 additions and 1 deletions

View File

@ -46,6 +46,8 @@ public class UserAuthConverter implements UserAuthenticationConverter {
userInfo.put("username", userBO.getUsername()); userInfo.put("username", userBO.getUsername());
userInfo.put("userName", userBO.getUserName()); userInfo.put("userName", userBO.getUserName());
userInfo.put("userPhone", userBO.getUserPhone()); userInfo.put("userPhone", userBO.getUserPhone());
userInfo.put("userAvatar", userBO.getUserAvatar());
userInfo.put("userEmail", userBO.getUserEmail());
response.put("user_info", userInfo); response.put("user_info", userInfo);
return response; return response;
} }
@ -64,6 +66,8 @@ public class UserAuthConverter implements UserAuthenticationConverter {
userInfoBO.setUserUsername(userInfo.get("username").toString()); userInfoBO.setUserUsername(userInfo.get("username").toString());
userInfoBO.setUserName(userInfo.get("userName").toString()); userInfoBO.setUserName(userInfo.get("userName").toString());
userInfoBO.setUserPhone(userInfo.get("userPhone") == null ? "" : userInfo.get("userPhone").toString()); userInfoBO.setUserPhone(userInfo.get("userPhone") == null ? "" : userInfo.get("userPhone").toString());
userInfoBO.setUserAvatar(userInfo.get("userAvatar") == null ? "" : userInfo.get("userAvatar").toString());
userInfoBO.setUserEmail(userInfo.get("userEmail") == null ? "" : userInfo.get("userEmail").toString());
if (ISystemConstant.ADMIN.equals(userName)) { if (ISystemConstant.ADMIN.equals(userName)) {
authorities = new LinkedHashSet(); authorities = new LinkedHashSet();
authorities.add(new RoleGrantedAuthority("ROLE_ALL")); authorities.add(new RoleGrantedAuthority("ROLE_ALL"));

View File

@ -140,6 +140,8 @@ public class UserDetailServiceImpl implements UserDetailsService {
userBO.setUserPhone(userPO.getUserPhone()); userBO.setUserPhone(userPO.getUserPhone());
userBO.setUserUKey(userPO.getUserUKey()); userBO.setUserUKey(userPO.getUserUKey());
userBO.setLoginType(userPO.getLoginType()); userBO.setLoginType(userPO.getLoginType());
userBO.setUserEmail(userPO.getUserEmail());
userBO.setUserAvatar(userPO.getUserAvatar());
return userBO; return userBO;
} }

View File

@ -53,7 +53,7 @@ public class UserImService extends BaseService implements IUserImService {
if (!StringUtils.equals(departmentSimpleDTO.getDepartmentId(), departmentUserDTO.getDepartmentId())) { if (!StringUtils.equals(departmentSimpleDTO.getDepartmentId(), departmentUserDTO.getDepartmentId())) {
continue; continue;
} }
departmentUserDTOMap.put(departmentUserDTO.getDepartmentId(), departmentUserDTO); departmentUserDTOMap.put(departmentUserDTO.getUserId(), departmentUserDTO);
departmentUserDTOs.remove(j); departmentUserDTOs.remove(j);
j--; j--;
} }