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);
|
||||
|
||||
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);
|
||||
userService.updateById(userEntity);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user