From 73b24c59412aee207df46af1f39587df3a84ae47 Mon Sep 17 00:00:00 2001 From: wanggeng888 <450292408@qq.com> Date: Wed, 20 Jan 2021 18:48:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=99=BB=E5=BD=95=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E5=A4=B4=E5=83=8F=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/cm/serviceusercenter/converter/UserAuthConverter.java | 4 ++++ .../cm/serviceusercenter/service/UserDetailServiceImpl.java | 2 ++ .../service/system/user/impl/UserImService.java | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/cm/serviceusercenter/converter/UserAuthConverter.java b/src/main/java/com/cm/serviceusercenter/converter/UserAuthConverter.java index d861736..cb5d3e0 100644 --- a/src/main/java/com/cm/serviceusercenter/converter/UserAuthConverter.java +++ b/src/main/java/com/cm/serviceusercenter/converter/UserAuthConverter.java @@ -46,6 +46,8 @@ public class UserAuthConverter implements UserAuthenticationConverter { userInfo.put("username", userBO.getUsername()); userInfo.put("userName", userBO.getUserName()); userInfo.put("userPhone", userBO.getUserPhone()); + userInfo.put("userAvatar", userBO.getUserAvatar()); + userInfo.put("userEmail", userBO.getUserEmail()); response.put("user_info", userInfo); return response; } @@ -64,6 +66,8 @@ public class UserAuthConverter implements UserAuthenticationConverter { userInfoBO.setUserUsername(userInfo.get("username").toString()); userInfoBO.setUserName(userInfo.get("userName").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)) { authorities = new LinkedHashSet(); authorities.add(new RoleGrantedAuthority("ROLE_ALL")); diff --git a/src/main/java/com/cm/serviceusercenter/service/UserDetailServiceImpl.java b/src/main/java/com/cm/serviceusercenter/service/UserDetailServiceImpl.java index 0672455..bdf4c04 100644 --- a/src/main/java/com/cm/serviceusercenter/service/UserDetailServiceImpl.java +++ b/src/main/java/com/cm/serviceusercenter/service/UserDetailServiceImpl.java @@ -140,6 +140,8 @@ public class UserDetailServiceImpl implements UserDetailsService { userBO.setUserPhone(userPO.getUserPhone()); userBO.setUserUKey(userPO.getUserUKey()); userBO.setLoginType(userPO.getLoginType()); + userBO.setUserEmail(userPO.getUserEmail()); + userBO.setUserAvatar(userPO.getUserAvatar()); return userBO; } diff --git a/src/main/java/com/cm/serviceusercenter/service/system/user/impl/UserImService.java b/src/main/java/com/cm/serviceusercenter/service/system/user/impl/UserImService.java index 4c42672..bcc8b23 100644 --- a/src/main/java/com/cm/serviceusercenter/service/system/user/impl/UserImService.java +++ b/src/main/java/com/cm/serviceusercenter/service/system/user/impl/UserImService.java @@ -53,7 +53,7 @@ public class UserImService extends BaseService implements IUserImService { if (!StringUtils.equals(departmentSimpleDTO.getDepartmentId(), departmentUserDTO.getDepartmentId())) { continue; } - departmentUserDTOMap.put(departmentUserDTO.getDepartmentId(), departmentUserDTO); + departmentUserDTOMap.put(departmentUserDTO.getUserId(), departmentUserDTO); departmentUserDTOs.remove(j); j--; }