| | |
| | | ardCameras.setCreateTime(DateUtils.getNowDate()); |
| | | ardCameras.setUserId(SecurityUtils.getUserId()); |
| | | redisCache.setCacheObject(getCacheKey(ardCameras.getId()), ardCameras); |
| | | int i = ardCamerasMapper.insertArdCameras(ardCameras); |
| | | if (i > 0) { |
| | | // //删除当前相机的所有通道 |
| | | // ardChannelMapper.deleteArdChannelByDeviceId(ardCameras.getId()); |
| | | // //获取相机通道 |
| | | // List<ArdChannel> ipChannelList = hikClientService.getCameraChannelList(ardCameras); |
| | | // if (ipChannelList.size() > 0) { |
| | | // for (ArdChannel channel : ipChannelList) { |
| | | // channel.setId(IdUtils.simpleUUID()); |
| | | // ardChannelMapper.insertArdChannel(channel); |
| | | // } |
| | | // } |
| | | } |
| | | return i; |
| | | return ardCamerasMapper.insertArdCameras(ardCameras); |
| | | } |
| | | |
| | | /** |