fix:修复Bug
This commit is contained in:
parent
cace0eb2f5
commit
b386ef9106
@ -140,6 +140,13 @@ public class AdminUserServiceImpl implements AdminUserService {
|
|||||||
AssertUtils.notNull(adminUserEntity,ResultCodeEnum.USER_NOT_FOUND);
|
AssertUtils.notNull(adminUserEntity,ResultCodeEnum.USER_NOT_FOUND);
|
||||||
|
|
||||||
UserEntity userEntity = AdminUserConvert.INSTANCE.convertOne(params);
|
UserEntity userEntity = AdminUserConvert.INSTANCE.convertOne(params);
|
||||||
|
// 如果密码不为空,则修改密码
|
||||||
|
if (params.getPassword() != null && !params.getPassword().isEmpty()) {
|
||||||
|
String password = CommonUtils.encryptPassword(params.getPassword());
|
||||||
|
userEntity.setPassword(password);
|
||||||
|
} else {
|
||||||
|
userEntity.setPassword(adminUserEntity.getPassword());
|
||||||
|
}
|
||||||
userEntity.setId(id);
|
userEntity.setId(id);
|
||||||
userService.updateById(userEntity);
|
userService.updateById(userEntity);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user