Skip to content

Commit

Permalink
fix bug 多角色 无法更新个人信息
Browse files Browse the repository at this point in the history
  • Loading branch information
Dionys committed Mar 19, 2024
1 parent 99958da commit 6da61b5
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ public Boolean deleteUserByIds(Long[] ids) {
@Override
@CacheEvict(value = CacheConstants.USER_DETAILS, key = "#userDto.username")
public R<Boolean> updateUserInfo(UserDTO userDto) {
UserVO userVO = baseMapper.getUserVoByUsername(userDto.getUsername());
UserVO userVO = baseMapper.getUserVoById(SecurityUtils.getUser().getId());

SysUser sysUser = new SysUser();
sysUser.setPhone(userDto.getPhone());
Expand Down Expand Up @@ -412,7 +412,7 @@ public R<Boolean> lockUser(String username) {
@Override
@CacheEvict(value = CacheConstants.USER_DETAILS, key = "#userDto.username")
public R changePassword(UserDTO userDto) {
UserVO userVO = baseMapper.getUserVoByUsername(userDto.getUsername());
UserVO userVO = baseMapper.getUserVoById(SecurityUtils.getUser().getId());
if (Objects.isNull(userVO)) {
return R.failed("用户不存在");
}
Expand Down

0 comments on commit 6da61b5

Please sign in to comment.