mirror of https://gitee.com/stylefeng/roses
【8.0】【system】用户信息接口返回账号
parent
7b62b050cb
commit
c705036e32
|
@ -42,6 +42,12 @@ public class SimpleUserDTO {
|
||||||
@ChineseDescription("主键")
|
@ChineseDescription("主键")
|
||||||
private Long userId;
|
private Long userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 账号
|
||||||
|
*/
|
||||||
|
@ChineseDescription("账号")
|
||||||
|
private String account;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 姓名
|
* 姓名
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -324,7 +324,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
||||||
|
|
||||||
LambdaQueryWrapper<SysUser> sysUserLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<SysUser> sysUserLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
sysUserLambdaQueryWrapper.eq(SysUser::getUserId, userId);
|
sysUserLambdaQueryWrapper.eq(SysUser::getUserId, userId);
|
||||||
sysUserLambdaQueryWrapper.select(SysUser::getRealName, SysUser::getAvatar);
|
sysUserLambdaQueryWrapper.select(SysUser::getRealName, SysUser::getAvatar, SysUser::getAccount);
|
||||||
SysUser sysUser = this.getOne(sysUserLambdaQueryWrapper);
|
SysUser sysUser = this.getOne(sysUserLambdaQueryWrapper);
|
||||||
if (sysUser == null) {
|
if (sysUser == null) {
|
||||||
return null;
|
return null;
|
||||||
|
@ -333,6 +333,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
||||||
SimpleUserDTO simpleUserDTO = new SimpleUserDTO();
|
SimpleUserDTO simpleUserDTO = new SimpleUserDTO();
|
||||||
simpleUserDTO.setUserId(userId);
|
simpleUserDTO.setUserId(userId);
|
||||||
simpleUserDTO.setRealName(sysUser.getRealName());
|
simpleUserDTO.setRealName(sysUser.getRealName());
|
||||||
|
simpleUserDTO.setAccount(sysUser.getAccount());
|
||||||
|
|
||||||
// 获取头像文件id信息,转化为头像URL
|
// 获取头像文件id信息,转化为头像URL
|
||||||
Long avatarFileId = sysUser.getAvatar();
|
Long avatarFileId = sysUser.getAvatar();
|
||||||
|
|
Loading…
Reference in New Issue