Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(设备管理): 删除设备后,解绑子设备 #365

Merged
merged 3 commits into from
Jul 18, 2023

Conversation

tancongsir
Copy link
Contributor

No description provided.

@kyouji kyouji requested a review from zhou-hao July 18, 2023 07:27
if (old != null && !Objects.equals(device.getName(), old.getName())) {
configuration.put(PropertyConstants.deviceName.getKey(), device.getName());
}
configuration.put(DeviceConfigKey.parentGatewayId.getKey(), device.getParentId());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

上面的filter 可能会导致这里设置无效。

if (StringUtils.hasText(device.getName())) {
configuration.put(PropertyConstants.deviceName.getKey(), device.getName());
}
configuration.put(DeviceConfigKey.parentGatewayId.getKey(), device.getParentId());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

企业版似乎缺失了这段逻辑? @kyouji

@zhou-hao
Copy link
Member

是 这段

  .filter(device -> {
                    DeviceInstanceEntity old = olds.get(device.getId());
                    return old != null && !Objects.equals(device.getName(), old.getName());
                })

@zhou-hao zhou-hao merged commit 69282ed into jetlinks:master Jul 18, 2023
2 checks passed
@tancongsir tancongsir deleted the 2.1-push-5 branch August 1, 2023 02:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants