Merge branch 'wvp-28181-2.0' into 结构优化
# Conflicts: # src/main/java/com/genersoft/iot/vmp/service/impl/GbStreamServiceImpl.java # src/main/java/com/genersoft/iot/vmp/service/impl/PlatformChannelServiceImpl.java # src/main/java/com/genersoft/iot/vmp/storager/dao/PlatformChannelMapper.java # src/main/java/com/genersoft/iot/vmp/storager/dao/PlatformGbStreamMapper.java # src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/gbStream/GbStreamController.java结构优化
commit
2a4a0d36f2
|
@ -66,17 +66,17 @@ public class SIPSender {
|
||||||
// 添加错误订阅
|
// 添加错误订阅
|
||||||
if (errorEvent != null) {
|
if (errorEvent != null) {
|
||||||
sipSubscribe.addErrorSubscribe(callIdHeader.getCallId(), (eventResult -> {
|
sipSubscribe.addErrorSubscribe(callIdHeader.getCallId(), (eventResult -> {
|
||||||
errorEvent.response(eventResult);
|
|
||||||
sipSubscribe.removeErrorSubscribe(eventResult.callId);
|
sipSubscribe.removeErrorSubscribe(eventResult.callId);
|
||||||
sipSubscribe.removeOkSubscribe(eventResult.callId);
|
sipSubscribe.removeOkSubscribe(eventResult.callId);
|
||||||
|
errorEvent.response(eventResult);
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
// 添加订阅
|
// 添加订阅
|
||||||
if (okEvent != null) {
|
if (okEvent != null) {
|
||||||
sipSubscribe.addOkSubscribe(callIdHeader.getCallId(), eventResult -> {
|
sipSubscribe.addOkSubscribe(callIdHeader.getCallId(), eventResult -> {
|
||||||
okEvent.response(eventResult);
|
|
||||||
sipSubscribe.removeOkSubscribe(eventResult.callId);
|
sipSubscribe.removeOkSubscribe(eventResult.callId);
|
||||||
sipSubscribe.removeErrorSubscribe(eventResult.callId);
|
sipSubscribe.removeErrorSubscribe(eventResult.callId);
|
||||||
|
okEvent.response(eventResult);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if ("TCP".equals(transport)) {
|
if ("TCP".equals(transport)) {
|
||||||
|
|
|
@ -695,6 +695,7 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
|
||||||
}else {
|
}else {
|
||||||
subChannels = channelList.subList(index, channelList.size());
|
subChannels = channelList.subList(index, channelList.size());
|
||||||
}
|
}
|
||||||
|
logger.info("[发送NOTIFY通知]类型: {},发送数量: {}", type, channels.size());
|
||||||
Integer finalIndex = index;
|
Integer finalIndex = index;
|
||||||
String catalogXmlContent = getCatalogXmlContentForCatalogOther(parentPlatform, subChannels, type);
|
String catalogXmlContent = getCatalogXmlContentForCatalogOther(parentPlatform, subChannels, type);
|
||||||
sendNotify(parentPlatform, catalogXmlContent, subscribeInfo, eventResult -> {
|
sendNotify(parentPlatform, catalogXmlContent, subscribeInfo, eventResult -> {
|
||||||
|
|
|
@ -285,7 +285,7 @@ public class DeviceServiceImpl implements IDeviceService {
|
||||||
// 设置最小值为30
|
// 设置最小值为30
|
||||||
int subscribeCycleForCatalog = Math.max(device.getSubscribeCycleForMobilePosition(),30);
|
int subscribeCycleForCatalog = Math.max(device.getSubscribeCycleForMobilePosition(),30);
|
||||||
// 刷新订阅
|
// 刷新订阅
|
||||||
dynamicTask.startCron(device.getDeviceId() + "mobile_position" , mobilePositionSubscribeTask, (subscribeCycleForCatalog) * 1000);
|
dynamicTask.startCron(device.getDeviceId() + "mobile_position" , mobilePositionSubscribeTask, subscribeCycleForCatalog * 1000);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -154,6 +154,26 @@ public class PlatformChannelServiceImpl implements IPlatformChannelService {
|
||||||
return platformChannelMapper.queryChannelByPlatformIdAndChannelDeviceId(platformId, channelId);
|
return platformChannelMapper.queryChannelByPlatformIdAndChannelDeviceId(platformId, channelId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int delAllChannelForGB(String platformId, String catalogId) {
|
||||||
|
|
||||||
|
int result;
|
||||||
|
if (platformId == null) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
ParentPlatform platform = platformMapper.getParentPlatByServerGBId(platformId);
|
||||||
|
if (platform == null) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
if (ObjectUtils.isEmpty(catalogId)) {
|
||||||
|
catalogId = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<DeviceChannel> deviceChannels = platformChannelMapper.queryAllChannelInCatalog(platformId, catalogId);
|
||||||
|
eventPublisher.catalogEventPublish(platformId, deviceChannels, CatalogEvent.DEL);
|
||||||
|
|
||||||
|
return platformChannelMapper.delChannelForGBByCatalogId(platformId, catalogId);
|
||||||
|
}
|
||||||
@Override
|
@Override
|
||||||
public List<CommonGbChannel> queryCommonGbChannellList(Integer platformId) {
|
public List<CommonGbChannel> queryCommonGbChannellList(Integer platformId) {
|
||||||
return platformChannelMapper.queryCommonGbChannellList(platformId);
|
return platformChannelMapper.queryCommonGbChannellList(platformId);
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
<el-input v-model="form.name" clearable></el-input>
|
<el-input v-model="form.name" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="密码" prop="password">
|
<el-form-item label="密码" prop="password">
|
||||||
<el-input type="password" v-model="form.password" clearable></el-input>
|
<el-input v-model="form.password" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="收流IP" prop="sdpIp">
|
<el-form-item label="收流IP" prop="sdpIp">
|
||||||
<el-input type="sdpIp" v-model="form.sdpIp" clearable></el-input>
|
<el-input type="sdpIp" v-model="form.sdpIp" clearable></el-input>
|
||||||
|
|
Loading…
Reference in New Issue