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 9c641d1c..6f6e1821 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 @@ -538,6 +538,54 @@ public interface DeviceChannelMapper { " from wvp_device_channel where device_db_id = #{deviceDbId}") List queryAllChannels(@Param("deviceDbId") int deviceDbId); + @Select("select " + + " id,\n" + + " device_db_id,\n" + + " create_time,\n" + + " update_time,\n" + + " sub_count,\n" + + " stream_id,\n" + + " has_audio,\n" + + " gps_time,\n" + + " stream_identification,\n" + + " channel_type,\n" + + " device_id,\n" + + " name,\n" + + " manufacturer,\n" + + " model,\n" + + " owner,\n" + + " civil_code,\n" + + " block,\n" + + " address,\n" + + " parental,\n" + + " parent_id,\n" + + " safety_way,\n" + + " register_way,\n" + + " cert_num,\n" + + " certifiable,\n" + + " err_code,\n" + + " end_time,\n" + + " secrecy,\n" + + " ip_address,\n" + + " port,\n" + + " password,\n" + + " status,\n" + + " longitude,\n" + + " latitude,\n" + + " ptz_type,\n" + + " position_type,\n" + + " room_type,\n" + + " use_type,\n" + + " supply_light_type,\n" + + " direction_type,\n" + + " resolution,\n" + + " business_group_id,\n" + + " download_speed,\n" + + " svc_space_support_mod,\n" + + " svc_time_support_mode\n" + + " from wvp_device_channel where device_db_id = #{deviceDbId}") + List queryAllChannelsForRefresh(@Param("deviceDbId") int deviceDbId); + @Select("select de.* from wvp_device de left join wvp_device_channel dc on de.device_id = dc.deviceId where dc.device_id=#{channelId}") List getDeviceByChannelDeviceId(String channelId); 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 e24c22f1..e184134c 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 @@ -425,7 +425,7 @@ public class DeviceChannelServiceImpl implements IDeviceChannelService { if (CollectionUtils.isEmpty(deviceChannelList)) { return false; } - List allChannels = channelMapper.queryAllChannels(deviceDbId); + List allChannels = channelMapper.queryAllChannelsForRefresh(deviceDbId); Map allChannelMap = new ConcurrentHashMap<>(); if (!allChannels.isEmpty()) { for (DeviceChannel deviceChannel : allChannels) { @@ -444,11 +444,11 @@ public class DeviceChannelServiceImpl implements IDeviceChannelService { // 数据去重 Set gbIdSet = new HashSet<>(); for (DeviceChannel deviceChannel : deviceChannelList) { - if (gbIdSet.contains(deviceChannel.getDeviceId())) { + if (gbIdSet.contains(deviceChannel.getDeviceDbId() + deviceChannel.getDeviceId())) { stringBuilder.append(deviceChannel.getDeviceId()).append(","); continue; } - gbIdSet.add(deviceChannel.getDeviceId()); + gbIdSet.add(deviceChannel.getDeviceDbId() + deviceChannel.getDeviceId()); DeviceChannel channelInDb = allChannelMap.get(deviceChannel.getDeviceDbId() + deviceChannel.getDeviceId()); if (channelInDb != null) { deviceChannel.setStreamId(channelInDb.getStreamId()); diff --git a/src/main/java/com/genersoft/iot/vmp/service/impl/RtpServerServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/service/impl/RtpServerServiceImpl.java index 7321e94b..ccd7780e 100644 --- a/src/main/java/com/genersoft/iot/vmp/service/impl/RtpServerServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/service/impl/RtpServerServiceImpl.java @@ -147,7 +147,6 @@ public class RtpServerServiceImpl implements IReceiveRtpServerService { @Override public void closeRTPServer(MediaServer mediaServer, SSRCInfo ssrcInfo) { - System.out.println(4444); if (mediaServer == null) { return; } diff --git a/web_src/src/components/live.vue b/web_src/src/components/live.vue index 64d169f9..1529cdf8 100755 --- a/web_src/src/components/live.vue +++ b/web_src/src/components/live.vue @@ -14,7 +14,7 @@
- +