| | |
| | | String now = this.format.format(System.currentTimeMillis()); |
| | | device.setUpdateTime(now); |
| | | Device deviceByDeviceId = deviceMapper.getDeviceByDeviceId(device.getDeviceId()); |
| | | device.setCharset(device.getCharset().toUpperCase()); |
| | | if (deviceByDeviceId == null) { |
| | | device.setCreateTime(now); |
| | | redisCatchStorage.updateDevice(device); |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<ChannelReduce> queryChannelListInParentPlatform(String platformId) { |
| | | public List<DeviceChannelInPlatform> queryChannelListInParentPlatform(String platformId) { |
| | | |
| | | return deviceChannelMapper.queryChannelListInAll(null, null, null, platformId, platformId); |
| | | return deviceChannelMapper.queryChannelByPlatformId(platformId); |
| | | } |
| | | |
| | | @Override |
| | |
| | | try { |
| | | if (streamProxyMapper.update(streamProxyItem) > 0) { |
| | | if (!StringUtils.isEmpty(streamProxyItem.getGbId())) { |
| | | if (gbStreamMapper.update(streamProxyItem) > 0) { |
| | | if (gbStreamMapper.updateByAppAndStream(streamProxyItem) == 0) { |
| | | //事务回滚 |
| | | dataSourceTransactionManager.rollback(transactionStatus); |
| | | return false; |
| | |
| | | List<ParentPlatform> parentPlatforms = parentPlatformMapper.selectAllAhareAllLiveStream(); |
| | | if (parentPlatforms.size() > 0) { |
| | | for (ParentPlatform parentPlatform : parentPlatforms) { |
| | | StreamProxyItem streamProxyItems = platformGbStreamMapper.selectOne(streamPushItem.getApp(), streamPushItem.getStream(), |
| | | StreamProxyItem streamProxyItem = platformGbStreamMapper.selectOne(streamPushItem.getApp(), streamPushItem.getStream(), |
| | | parentPlatform.getServerGBId()); |
| | | if (streamProxyItems == null) { |
| | | if (streamProxyItem == null) { |
| | | streamPushItem.setCatalogId(parentPlatform.getCatalogId()); |
| | | streamPushItem.setPlatformId(parentPlatform.getServerGBId()); |
| | | platformGbStreamMapper.add(streamPushItem); |
| | |
| | | deviceChannel.setParentId(catalog.getParentId()); |
| | | deviceChannel.setRegisterWay(1); |
| | | // 行政区划应该是Domain的前八位 |
| | | deviceChannel.setCivilCode(sipConfig.getDomain().substring(0, sipConfig.getDomain().length() - 2)); |
| | | deviceChannel.setCivilCode(parentPlatByServerGBId.getDeviceGBId().substring(0,6)); |
| | | deviceChannel.setModel("live"); |
| | | deviceChannel.setOwner("wvp-pro"); |
| | | deviceChannel.setSecrecy("0"); |