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
结构优化
648540858 2024-01-16 14:53:26 +08:00
commit 2a4a0d36f2
5 changed files with 25 additions and 4 deletions

View File

@ -66,17 +66,17 @@ public class SIPSender {
// 添加错误订阅
if (errorEvent != null) {
sipSubscribe.addErrorSubscribe(callIdHeader.getCallId(), (eventResult -> {
errorEvent.response(eventResult);
sipSubscribe.removeErrorSubscribe(eventResult.callId);
sipSubscribe.removeOkSubscribe(eventResult.callId);
errorEvent.response(eventResult);
}));
}
// 添加订阅
if (okEvent != null) {
sipSubscribe.addOkSubscribe(callIdHeader.getCallId(), eventResult -> {
okEvent.response(eventResult);
sipSubscribe.removeOkSubscribe(eventResult.callId);
sipSubscribe.removeErrorSubscribe(eventResult.callId);
okEvent.response(eventResult);
});
}
if ("TCP".equals(transport)) {

View File

@ -695,6 +695,7 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
}else {
subChannels = channelList.subList(index, channelList.size());
}
logger.info("[发送NOTIFY通知]类型: {},发送数量: {}", type, channels.size());
Integer finalIndex = index;
String catalogXmlContent = getCatalogXmlContentForCatalogOther(parentPlatform, subChannels, type);
sendNotify(parentPlatform, catalogXmlContent, subscribeInfo, eventResult -> {

View File

@ -285,7 +285,7 @@ public class DeviceServiceImpl implements IDeviceService {
// 设置最小值为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;
}

View File

@ -154,6 +154,26 @@ public class PlatformChannelServiceImpl implements IPlatformChannelService {
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
public List<CommonGbChannel> queryCommonGbChannellList(Integer platformId) {
return platformChannelMapper.queryCommonGbChannellList(platformId);

View File

@ -20,7 +20,7 @@
<el-input v-model="form.name" clearable></el-input>
</el-form-item>
<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 label="收流IP" prop="sdpIp">
<el-input type="sdpIp" v-model="form.sdpIp" clearable></el-input>