mirror of https://gitee.com/stylefeng/roses
【7.6.0】【sys】【auth】更新用户验证的响应dto
parent
e616839a72
commit
04be0ee058
|
@ -93,9 +93,10 @@ public interface SysUserServiceApi {
|
||||||
/**
|
/**
|
||||||
* 获取用于用户校验的
|
* 获取用于用户校验的
|
||||||
*
|
*
|
||||||
|
* @param account 用户账号
|
||||||
* @author fengshuonan
|
* @author fengshuonan
|
||||||
* @since 2023/6/17 21:56
|
* @since 2023/6/17 21:56
|
||||||
*/
|
*/
|
||||||
UserValidateDTO getUserValidateDTO(Long account);
|
UserValidateDTO getUserValidateDTO(String account);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,6 +36,12 @@ import lombok.Data;
|
||||||
@Data
|
@Data
|
||||||
public class UserValidateDTO {
|
public class UserValidateDTO {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户id
|
||||||
|
*/
|
||||||
|
@ChineseDescription("用户id")
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 加密后的密码,存在sys_user表的password字段
|
* 加密后的密码,存在sys_user表的password字段
|
||||||
*/
|
*/
|
||||||
|
@ -51,8 +57,10 @@ public class UserValidateDTO {
|
||||||
public UserValidateDTO() {
|
public UserValidateDTO() {
|
||||||
}
|
}
|
||||||
|
|
||||||
public UserValidateDTO(String userPasswordHexed, Integer userStatus) {
|
public UserValidateDTO(Long userId, String userPasswordHexed, Integer userStatus) {
|
||||||
|
this.userId = userId;
|
||||||
this.userPasswordHexed = userPasswordHexed;
|
this.userPasswordHexed = userPasswordHexed;
|
||||||
this.userStatus = userStatus;
|
this.userStatus = userStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -178,18 +178,17 @@ public class UserIntegrationService implements SysUserServiceApi {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public UserValidateDTO getUserValidateDTO(Long account) {
|
public UserValidateDTO getUserValidateDTO(String account) {
|
||||||
|
|
||||||
LambdaQueryWrapper<SysUser> sysUserLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<SysUser> sysUserLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
sysUserLambdaQueryWrapper.eq(SysUser::getAccount, account);
|
sysUserLambdaQueryWrapper.eq(SysUser::getAccount, account);
|
||||||
sysUserLambdaQueryWrapper.select(SysUser::getPassword, SysUser::getStatusFlag);
|
sysUserLambdaQueryWrapper.select(SysUser::getPassword, SysUser::getStatusFlag, SysUser::getUserId);
|
||||||
SysUser sysUserServiceOne = this.sysUserService.getOne(sysUserLambdaQueryWrapper, false);
|
SysUser sysUserServiceOne = this.sysUserService.getOne(sysUserLambdaQueryWrapper, false);
|
||||||
|
|
||||||
if (sysUserServiceOne == null) {
|
if (sysUserServiceOne == null) {
|
||||||
throw new ServiceException(SysUserExceptionEnum.ACCOUNT_NOT_EXIST);
|
throw new ServiceException(SysUserExceptionEnum.ACCOUNT_NOT_EXIST);
|
||||||
}
|
}
|
||||||
|
|
||||||
return new UserValidateDTO(sysUserServiceOne.getPassword(), sysUserServiceOne.getStatusFlag());
|
return new UserValidateDTO(sysUserServiceOne.getUserId(), sysUserServiceOne.getPassword(), sysUserServiceOne.getStatusFlag());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue