fix(manager): preserve profile binding when toggling device enable state

This commit is contained in:
sq
2024-05-10 11:05:46 +08:00
parent 909c8329be
commit 0aa90103b3
@@ -152,7 +152,7 @@ public class DeviceServiceImpl implements DeviceService {
// 删除的模版
Set<Long> delete = new HashSet<>(oldProfileIds);
delete.removeAll(newProfileIds);
delete.forEach(profileId -> profileBindService.removeByDeviceIdAndProfileId(entityBO.getId(), profileId));
// delete.forEach(profileId -> profileBindService.removeByDeviceIdAndProfileId(entityBO.getId(), profileId));
entityDO = deviceBuilder.buildDOByBO(entityBO);
entityBO.setOperateTime(null);