【8.0】【sys】修复获取用户信息

pull/57/head
fengshuonan 2023-09-07 18:14:42 +08:00
parent 6971d36af0
commit 69cafdcd2f
1 changed files with 5 additions and 7 deletions

View File

@ -337,14 +337,12 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
// 获取头像文件id信息转化为头像URL
Long avatarFileId = sysUser.getAvatar();
if (avatarFileId == null) {
return null;
if (avatarFileId != null) {
// 获取头像的访问地址
String fileAuthUrl = fileInfoApi.getFileAuthUrl(avatarFileId);
simpleUserDTO.setAvatarUrl(fileAuthUrl);
}
// 获取头像的访问地址
String fileAuthUrl = fileInfoApi.getFileAuthUrl(avatarFileId);
simpleUserDTO.setAvatarUrl(fileAuthUrl);
return simpleUserDTO;
}