REM:
1. 接口更新设备状态是,同步更新缓存中的设备数据
This commit is contained in:
HuangXin 2021-02-03 09:09:26 +08:00
parent cd9cc0d617
commit 40f044c2e7
1 changed files with 6 additions and 3 deletions

View File

@ -103,9 +103,12 @@ public class DisposeAbilityRouterServiceImpl implements DisposeAbilityRouterServ
*/
@Override
public void upgradeDisposeDevice(Long id, ObjectStatus objStatus) {
getAllAbilityDevices().stream()
.filter(v -> v.getDev().getId().equals(id))
.forEach(v -> v.getDev().setStatus(objStatus));
DisposeDevice dev = disposeDeviceManager.getDisposeDeviceById(id);
for (AbilityInfo ai : getAllAbilityDevices()) {
if (ai.getDev().getId().equals(id)) {
ai.setDev(dev);
}
}
}
/**