From 394cf7ee4ecd3bb8f9b1ca7b7bd4df36dea9cafe Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Thu, 26 Sep 2024 08:55:45 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E4=B8=B4=E6=97=B6=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iot/vmp/service/redisMsg/control/RedisRpcController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/genersoft/iot/vmp/service/redisMsg/control/RedisRpcController.java b/src/main/java/com/genersoft/iot/vmp/service/redisMsg/control/RedisRpcController.java index 3e6b824f..dde2860a 100644 --- a/src/main/java/com/genersoft/iot/vmp/service/redisMsg/control/RedisRpcController.java +++ b/src/main/java/com/genersoft/iot/vmp/service/redisMsg/control/RedisRpcController.java @@ -241,7 +241,7 @@ public class RedisRpcController { return response; } MediaInfo mediaInfo = mediaServerService.getMediaInfo(mediaServer, sendRtpItem.getApp(), sendRtpItem.getStream()); - if (mediaInfo != null) { + if (mediaInfo == null) { log.info("[redis-rpc] startSendRtp->流不在线: {}/{}", sendRtpItem.getApp(), sendRtpItem.getStream() ); WVPResult wvpResult = WVPResult.fail(ErrorCode.ERROR100.getCode(), "流不在线"); response.setBody(wvpResult); From 249bdf69beb96f38ee2c90096b324b72c6e65717 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Thu, 26 Sep 2024 14:46:08 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E5=90=88=E5=B9=B6271=20notify=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vmp/gb28181/dao/DeviceChannelMapper.java | 12 +--- .../service/IDeviceChannelService.java | 12 +--- .../impl/DeviceChannelServiceImpl.java | 68 ++++++++++++++++--- .../NotifyRequestForCatalogProcessor.java | 65 +++++++++--------- ...tifyRequestForMobilePositionProcessor.java | 10 ++- 5 files changed, 103 insertions(+), 64 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/dao/DeviceChannelMapper.java b/src/main/java/com/genersoft/iot/vmp/gb28181/dao/DeviceChannelMapper.java index a92cbeea..6ff32168 100755 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/dao/DeviceChannelMapper.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/dao/DeviceChannelMapper.java @@ -688,18 +688,10 @@ public interface DeviceChannelMapper { @Update({""}) - int batchOnlineForNotify(List channels); - - @Update({""}) - int batchOfflineForNotify(List channels); - + int batchUpdateStatus(List channels); @Select("select count(1) from wvp_device_channel where status = 'ON'") int getOnlineCount(); diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/service/IDeviceChannelService.java b/src/main/java/com/genersoft/iot/vmp/gb28181/service/IDeviceChannelService.java index f09cbb4f..8a4b7d89 100755 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/service/IDeviceChannelService.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/service/IDeviceChannelService.java @@ -3,8 +3,8 @@ package com.genersoft.iot.vmp.gb28181.service; import com.genersoft.iot.vmp.gb28181.bean.Device; import com.genersoft.iot.vmp.gb28181.bean.DeviceChannel; import com.genersoft.iot.vmp.gb28181.bean.MobilePosition; -import com.genersoft.iot.vmp.vmanager.bean.ResourceBaseInfo; import com.genersoft.iot.vmp.gb28181.controller.bean.ChannelReduce; +import com.genersoft.iot.vmp.vmanager.bean.ResourceBaseInfo; import com.genersoft.iot.vmp.web.gb28181.dto.DeviceChannelExtend; import com.github.pagehelper.PageInfo; @@ -47,15 +47,7 @@ public interface IDeviceChannelService { */ int deleteChannelsForNotify(List deleteChannelList); - /** - * 批量上线 - */ - int channelsOnlineForNotify(List channels); - - /** - * 批量下线 - */ - int channelsOfflineForNotify(List channels); + int updateChannelsStatus(List channels); /** * 获取一个通道 diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/service/impl/DeviceChannelServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/gb28181/service/impl/DeviceChannelServiceImpl.java index 32e73e8f..fce13e9a 100755 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/service/impl/DeviceChannelServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/service/impl/DeviceChannelServiceImpl.java @@ -193,13 +193,45 @@ public class DeviceChannelServiceImpl implements IDeviceChannelService { } @Override - public int deleteChannelsForNotify(List deleteChannelList) { - return channelMapper.batchDelForNotify(deleteChannelList); + @Transactional + public int deleteChannelsForNotify(List channels) { + int limitCount = 1000; + int result = 0; + if (!channels.isEmpty()) { + if (channels.size() > limitCount) { + for (int i = 0; i < channels.size(); i += limitCount) { + int toIndex = i + limitCount; + if (i + limitCount > channels.size()) { + toIndex = channels.size(); + } + result += channelMapper.batchDel(channels.subList(i, toIndex)); + } + }else { + result += channelMapper.batchDel(channels); + } + } + return result; } + @Transactional @Override - public int channelsOnlineForNotify(List channels) { - return channelMapper.batchOnlineForNotify(channels); + public int updateChannelsStatus(List channels) { + int limitCount = 1000; + int result = 0; + if (!channels.isEmpty()) { + if (channels.size() > limitCount) { + for (int i = 0; i < channels.size(); i += limitCount) { + int toIndex = i + limitCount; + if (i + limitCount > channels.size()) { + toIndex = channels.size(); + } + result += channelMapper.batchUpdateStatus(channels.subList(i, toIndex)); + } + }else { + result += channelMapper.batchUpdateStatus(channels); + } + } + return result; } @Override @@ -207,12 +239,6 @@ public class DeviceChannelServiceImpl implements IDeviceChannelService { channelMapper.online(channel.getId()); } - @Override - public int channelsOfflineForNotify(List channels) { - return channelMapper.batchOfflineForNotify(channels); - } - - @Override public void offline(DeviceChannel channel) { channelMapper.offline(channel.getId()); @@ -242,6 +268,7 @@ public class DeviceChannelServiceImpl implements IDeviceChannelService { } @Override + @Transactional public synchronized void batchUpdateChannelForNotify(List channels) { String now = DateUtil.getNow(); for (DeviceChannel channel : channels) { @@ -264,8 +291,27 @@ public class DeviceChannelServiceImpl implements IDeviceChannelService { } @Override + @Transactional public void batchAddChannel(List channels) { - channelMapper.batchAdd(channels); + String now = DateUtil.getNow(); + for (DeviceChannel channel : channels) { + channel.setUpdateTime(now); + channel.setCreateTime(now); + } + int limitCount = 1000; + if (!channels.isEmpty()) { + if (channels.size() > limitCount) { + for (int i = 0; i < channels.size(); i += limitCount) { + int toIndex = i + limitCount; + if (i + limitCount > channels.size()) { + toIndex = channels.size(); + } + channelMapper.batchAdd(channels.subList(i, toIndex)); + } + }else { + channelMapper.batchAdd(channels); + } + } for (DeviceChannel channel : channels) { if (channel.getParentId() != null) { channelMapper.updateChannelSubCount(channel.getDeviceDbId(), channel.getParentId()); diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/NotifyRequestForCatalogProcessor.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/NotifyRequestForCatalogProcessor.java index 6a504219..9e9cc35e 100755 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/NotifyRequestForCatalogProcessor.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/NotifyRequestForCatalogProcessor.java @@ -39,8 +39,7 @@ import java.util.concurrent.CopyOnWriteArrayList; @Component public class NotifyRequestForCatalogProcessor extends SIPRequestProcessorParent { - private final List updateChannelOnlineList = new CopyOnWriteArrayList<>(); - private final List updateChannelOfflineList = new CopyOnWriteArrayList<>(); + private final List updateChannelForStatusChange = new CopyOnWriteArrayList<>(); private final Map updateChannelMap = new ConcurrentHashMap<>(); private final Map addChannelMap = new ConcurrentHashMap<>(); @@ -60,6 +59,10 @@ public class NotifyRequestForCatalogProcessor extends SIPRequestProcessorParent @Autowired private IDeviceChannelService deviceChannelService; +// @Scheduled(fixedRate = 2000) //每400毫秒执行一次 +// public void showSize(){ +// log.warn("[notify-目录订阅] 待处理消息数量: {}", taskQueue.size() ); +// } @Transactional public void process(RequestEvent evt) { @@ -75,7 +78,14 @@ public class NotifyRequestForCatalogProcessor extends SIPRequestProcessorParent if (taskQueue.isEmpty()) { return; } - for (HandlerCatchData take : taskQueue) { + List handlerCatchDataList = new ArrayList<>(); + while (!taskQueue.isEmpty()) { + handlerCatchDataList.add(taskQueue.poll()); + } + if (handlerCatchDataList.isEmpty()) { + return; + } + for (HandlerCatchData take : handlerCatchDataList) { if (take == null) { continue; } @@ -119,14 +129,17 @@ public class NotifyRequestForCatalogProcessor extends SIPRequestProcessorParent log.error("[解析CatalogChannelEvent]失败原文: \n{}", new String(evt.getRequest().getRawContent(), Charset.forName(device.getCharset()))); continue; } - - log.info("[收到目录订阅]:{}/{}-{}", device.getDeviceId(), - catalogChannelEvent.getChannel().getDeviceId(), catalogChannelEvent.getEvent()); + if (log.isDebugEnabled()){ + log.debug("[收到目录订阅]:{}/{}-{}", device.getDeviceId(), + catalogChannelEvent.getChannel().getDeviceId(), catalogChannelEvent.getEvent()); + } + DeviceChannel channel = catalogChannelEvent.getChannel(); switch (catalogChannelEvent.getEvent()) { case CatalogEvent.ON: // 上线 log.info("[收到通道上线通知] 来自设备: {}, 通道 {}", device.getDeviceId(), catalogChannelEvent.getChannel().getDeviceId()); - updateChannelOnlineList.add(catalogChannelEvent.getChannel()); + channel.setStatus("ON"); + updateChannelForStatusChange.add(channel); if (userSetting.getDeviceStatusNotify()) { // 发送redis消息 redisCatchStorage.sendDeviceOrChannelStatus(device.getDeviceId(), catalogChannelEvent.getChannel().getDeviceId(), true); @@ -138,7 +151,8 @@ public class NotifyRequestForCatalogProcessor extends SIPRequestProcessorParent if (userSetting.getRefuseChannelStatusChannelFormNotify()) { log.info("[收到通道离线通知] 但是平台已配置拒绝此消息,来自设备: {}, 通道 {}", device.getDeviceId(), catalogChannelEvent.getChannel().getDeviceId()); } else { - updateChannelOfflineList.add(catalogChannelEvent.getChannel()); + channel.setStatus("OFF"); + updateChannelForStatusChange.add(channel); if (userSetting.getDeviceStatusNotify()) { // 发送redis消息 redisCatchStorage.sendDeviceOrChannelStatus(device.getDeviceId(), catalogChannelEvent.getChannel().getDeviceId(), false); @@ -151,7 +165,8 @@ public class NotifyRequestForCatalogProcessor extends SIPRequestProcessorParent if (userSetting.getRefuseChannelStatusChannelFormNotify()) { log.info("[收到通道视频丢失通知] 但是平台已配置拒绝此消息,来自设备: {}, 通道 {}", device.getDeviceId(), catalogChannelEvent.getChannel().getDeviceId()); } else { - updateChannelOfflineList.add(catalogChannelEvent.getChannel()); + channel.setStatus("OFF"); + updateChannelForStatusChange.add(channel); if (userSetting.getDeviceStatusNotify()) { // 发送redis消息 redisCatchStorage.sendDeviceOrChannelStatus(device.getDeviceId(), catalogChannelEvent.getChannel().getDeviceId(), false); @@ -164,7 +179,8 @@ public class NotifyRequestForCatalogProcessor extends SIPRequestProcessorParent if (userSetting.getRefuseChannelStatusChannelFormNotify()) { log.info("[收到通道视频故障通知] 但是平台已配置拒绝此消息,来自设备: {}, 通道 {}", device.getDeviceId(), catalogChannelEvent.getChannel().getDeviceId()); } else { - updateChannelOfflineList.add(catalogChannelEvent.getChannel()); + channel.setStatus("OFF"); + updateChannelForStatusChange.add(channel); if (userSetting.getDeviceStatusNotify()) { // 发送redis消息 redisCatchStorage.sendDeviceOrChannelStatus(device.getDeviceId(), catalogChannelEvent.getChannel().getDeviceId(), false); @@ -178,7 +194,6 @@ public class NotifyRequestForCatalogProcessor extends SIPRequestProcessorParent DeviceChannel deviceChannel = deviceChannelService.getOne(deviceId, catalogChannelEvent.getChannel().getDeviceId()); if (deviceChannel != null) { log.info("[增加通道] 已存在,不发送通知只更新,设备: {}, 通道 {}", device.getDeviceId(), catalogChannelEvent.getChannel().getDeviceId()); - DeviceChannel channel = catalogChannelEvent.getChannel(); channel.setId(deviceChannel.getId()); channel.setHasAudio(deviceChannel.isHasAudio()); channel.setUpdateTime(DateUtil.getNow()); @@ -210,7 +225,6 @@ public class NotifyRequestForCatalogProcessor extends SIPRequestProcessorParent // 判断此通道是否存在 DeviceChannel deviceChannelForUpdate = deviceChannelService.getOne(deviceId, catalogChannelEvent.getChannel().getDeviceId()); if (deviceChannelForUpdate != null) { - DeviceChannel channel = catalogChannelEvent.getChannel(); channel.setId(deviceChannelForUpdate.getId()); channel.setHasAudio(deviceChannelForUpdate.isHasAudio()); channel.setUpdateTime(DateUtil.getNow()); @@ -242,8 +256,7 @@ public class NotifyRequestForCatalogProcessor extends SIPRequestProcessorParent taskQueue.clear(); if (!updateChannelMap.keySet().isEmpty() || !addChannelMap.keySet().isEmpty() - || !updateChannelOnlineList.isEmpty() - || !updateChannelOfflineList.isEmpty() + || !updateChannelForStatusChange.isEmpty() || !deleteChannelList.isEmpty()) { executeSave(); } @@ -256,14 +269,9 @@ public class NotifyRequestForCatalogProcessor extends SIPRequestProcessorParent log.error("[存储收到的增加通道] 异常: ", e ); } try { - executeSaveForOnline(); + executeSaveForStatus(); } catch (Exception e) { - log.error("[存储收到的通道上线] 异常: ", e ); - } - try { - executeSaveForOffline(); - } catch (Exception e) { - log.error("[存储收到的通道离线] 异常: ", e ); + log.error("[存储收到的通道状态变化] 异常: ", e ); } try { executeSaveForUpdate(); @@ -301,17 +309,10 @@ public class NotifyRequestForCatalogProcessor extends SIPRequestProcessorParent } } - private void executeSaveForOnline(){ - if (!updateChannelOnlineList.isEmpty()) { - deviceChannelService.channelsOnlineForNotify(updateChannelOnlineList); - updateChannelOnlineList.clear(); - } - } - - private void executeSaveForOffline(){ - if (!updateChannelOfflineList.isEmpty()) { - deviceChannelService.channelsOfflineForNotify(updateChannelOfflineList); - updateChannelOfflineList.clear(); + private void executeSaveForStatus(){ + if (!updateChannelForStatusChange.isEmpty()) { + deviceChannelService.updateChannelsStatus(updateChannelForStatusChange); + updateChannelForStatusChange.clear(); } } } diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/NotifyRequestForMobilePositionProcessor.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/NotifyRequestForMobilePositionProcessor.java index 5d376689..a792207b 100755 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/NotifyRequestForMobilePositionProcessor.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/NotifyRequestForMobilePositionProcessor.java @@ -24,6 +24,7 @@ import org.springframework.util.ObjectUtils; import javax.sip.RequestEvent; import javax.sip.header.FromHeader; +import java.util.ArrayList; import java.util.List; import java.util.concurrent.ConcurrentLinkedQueue; @@ -65,7 +66,14 @@ public class NotifyRequestForMobilePositionProcessor extends SIPRequestProcessor if (taskQueue.isEmpty()) { return; } - for (HandlerCatchData take : taskQueue) { + List handlerCatchDataList = new ArrayList<>(); + while (!taskQueue.isEmpty()) { + handlerCatchDataList.add(taskQueue.poll()); + } + if (handlerCatchDataList.isEmpty()) { + return; + } + for (HandlerCatchData take : handlerCatchDataList) { if (take == null) { continue; } From 97b0616039e531e3f2ddb5fd5e91381c5713ac5b Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Thu, 26 Sep 2024 14:52:01 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dredis=20mobileposition=20?= =?UTF-8?q?=E6=B6=88=E6=81=AF=E5=8F=91=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/DeviceChannelServiceImpl.java | 2 +- ...tifyRequestForMobilePositionProcessor.java | 30 +++++++++++-------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/service/impl/DeviceChannelServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/gb28181/service/impl/DeviceChannelServiceImpl.java index fce13e9a..5702e2a8 100755 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/service/impl/DeviceChannelServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/service/impl/DeviceChannelServiceImpl.java @@ -386,7 +386,7 @@ public class DeviceChannelServiceImpl implements IDeviceChannelService { JSONObject jsonObject = new JSONObject(); jsonObject.put("time", DateUtil.yyyy_MM_dd_HH_mm_ssToISO8601(mobilePosition.getTime())); jsonObject.put("serial", mobilePosition.getDeviceId()); - jsonObject.put("code", mobilePosition.getChannelId()); + jsonObject.put("code", channel.getDeviceId()); jsonObject.put("longitude", mobilePosition.getLongitude()); jsonObject.put("latitude", mobilePosition.getLatitude()); jsonObject.put("altitude", mobilePosition.getAltitude()); diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/NotifyRequestForMobilePositionProcessor.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/NotifyRequestForMobilePositionProcessor.java index a792207b..9c326db4 100755 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/NotifyRequestForMobilePositionProcessor.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/NotifyRequestForMobilePositionProcessor.java @@ -97,13 +97,15 @@ public class NotifyRequestForMobilePositionProcessor extends SIPRequestProcessor mobilePosition.setDeviceId(device.getDeviceId()); mobilePosition.setDeviceName(device.getName()); mobilePosition.setCreateTime(DateUtil.getNow()); + + DeviceChannel deviceChannel = null; List elements = rootElement.elements(); for (Element element : elements) { switch (element.getName()){ case "DeviceID": String channelId = element.getStringValue(); if (!deviceId.equals(channelId)) { - DeviceChannel deviceChannel = deviceChannelService.getOne(device.getDeviceId(), channelId); + deviceChannel = deviceChannelService.getOne(device.getDeviceId(), channelId); if (deviceChannel != null) { mobilePosition.setChannelId(deviceChannel.getId()); } @@ -162,13 +164,13 @@ public class NotifyRequestForMobilePositionProcessor extends SIPRequestProcessor }catch (Exception e) { log.error("[向上级转发移动位置失败] ", e); } - if (mobilePosition.getChannelId() == null || mobilePosition.getChannelId().equals(mobilePosition.getDeviceId())) { + if (mobilePosition.getChannelId() == null) { List channels = deviceChannelService.queryChaneListByDeviceId(mobilePosition.getDeviceId()); channels.forEach(channel -> { // 发送redis消息。 通知位置信息的变化 JSONObject jsonObject = new JSONObject(); jsonObject.put("time", DateUtil.yyyy_MM_dd_HH_mm_ssToISO8601(mobilePosition.getTime())); - jsonObject.put("serial", channel.getDeviceId()); + jsonObject.put("serial", device.getDeviceId()); jsonObject.put("code", channel.getDeviceId()); jsonObject.put("longitude", mobilePosition.getLongitude()); jsonObject.put("latitude", mobilePosition.getLatitude()); @@ -179,16 +181,18 @@ public class NotifyRequestForMobilePositionProcessor extends SIPRequestProcessor }); }else { // 发送redis消息。 通知位置信息的变化 - JSONObject jsonObject = new JSONObject(); - jsonObject.put("time", DateUtil.yyyy_MM_dd_HH_mm_ssToISO8601(mobilePosition.getTime())); - jsonObject.put("serial", mobilePosition.getDeviceId()); - jsonObject.put("code", mobilePosition.getChannelId()); - jsonObject.put("longitude", mobilePosition.getLongitude()); - jsonObject.put("latitude", mobilePosition.getLatitude()); - jsonObject.put("altitude", mobilePosition.getAltitude()); - jsonObject.put("direction", mobilePosition.getDirection()); - jsonObject.put("speed", mobilePosition.getSpeed()); - redisCatchStorage.sendMobilePositionMsg(jsonObject); + if (deviceChannel != null) { + JSONObject jsonObject = new JSONObject(); + jsonObject.put("time", DateUtil.yyyy_MM_dd_HH_mm_ssToISO8601(mobilePosition.getTime())); + jsonObject.put("serial", mobilePosition.getDeviceId()); + jsonObject.put("code", deviceChannel.getDeviceId()); + jsonObject.put("longitude", mobilePosition.getLongitude()); + jsonObject.put("latitude", mobilePosition.getLatitude()); + jsonObject.put("altitude", mobilePosition.getAltitude()); + jsonObject.put("direction", mobilePosition.getDirection()); + jsonObject.put("speed", mobilePosition.getSpeed()); + redisCatchStorage.sendMobilePositionMsg(jsonObject); + } } } catch (DocumentException e) { log.error("未处理的异常 ", e); From c3267403ba13f9cafc460688aea4ffb772f7d2a9 Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Thu, 26 Sep 2024 15:57:55 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=88=86=E7=BB=84?= =?UTF-8?q?=E6=A0=91=EF=BC=8C=E8=A1=8C=E6=94=BF=E5=8C=BA=E5=88=92=E6=A0=91?= =?UTF-8?q?=E7=9A=84=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/genersoft/iot/vmp/gb28181/bean/GroupTree.java | 2 +- .../java/com/genersoft/iot/vmp/gb28181/bean/RegionTree.java | 3 +++ .../genersoft/iot/vmp/gb28181/dao/CommonGBChannelMapper.java | 2 ++ .../java/com/genersoft/iot/vmp/gb28181/dao/GroupMapper.java | 1 + .../java/com/genersoft/iot/vmp/gb28181/dao/RegionMapper.java | 1 + .../iot/vmp/gb28181/dao/provider/ChannelProvider.java | 4 ++-- web_src/src/components/common/GroupTree.vue | 3 ++- web_src/src/components/common/RegionTree.vue | 3 ++- web_src/src/components/group.vue | 4 ++-- 9 files changed, 16 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/bean/GroupTree.java b/src/main/java/com/genersoft/iot/vmp/gb28181/bean/GroupTree.java index 5265ada6..8ac1278e 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/bean/GroupTree.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/bean/GroupTree.java @@ -10,7 +10,7 @@ import lombok.Data; @Schema(description = "业务分组树") public class GroupTree extends Group{ - @Schema(description = "是否有子节点") + @Schema(description = "树节点ID") private String treeId; @Schema(description = "是否有子节点") diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/bean/RegionTree.java b/src/main/java/com/genersoft/iot/vmp/gb28181/bean/RegionTree.java index 8e6929a1..b771a603 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/bean/RegionTree.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/bean/RegionTree.java @@ -10,6 +10,9 @@ import lombok.Data; @Schema(description = "区域树") public class RegionTree extends Region { + @Schema(description = "树节点ID") + private String treeId; + @Schema(description = "是否有子节点") private boolean isLeaf; diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/dao/CommonGBChannelMapper.java b/src/main/java/com/genersoft/iot/vmp/gb28181/dao/CommonGBChannelMapper.java index a6bd3a6c..172537c1 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/dao/CommonGBChannelMapper.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/dao/CommonGBChannelMapper.java @@ -263,6 +263,7 @@ public interface CommonGBChannelMapper { @Select("