| | |
| | | */ |
| | | @Override |
| | | public boolean deleteFwDefenseSceneManage(List<Long> longList) { |
| | | //删除场景管理 |
| | | boolean b = deleteLogic(longList); |
| | | if (b) { |
| | | // 1.遍历所有删除的场景管理ID |
| | |
| | | List<Long> deviceIdList = baseMapper.selectDeviceId(sceneManageId); |
| | | AllDeviceId.addAll(deviceIdList); |
| | | } |
| | | if (AllDeviceId == null || AllDeviceId.isEmpty()) { |
| | | return true; |
| | | } |
| | | // 3.禁用设备 |
| | | return fwDeviceService.update(Wrappers.<FwDeviceEntity>lambdaUpdate() |
| | | .set(FwDeviceEntity::getIsEnabled, 0) |
| | |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * 获取场景管理下的所有设备ID |
| | | * |
| | | * @param sceneManageId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<Long> selectDeviceId(Long sceneManageId) { |
| | | return baseMapper.selectDeviceId(sceneManageId); |
| | | } |
| | | } |