修复刷新通道

pull/1642/head
648540858 2024-09-13 10:19:18 +08:00
parent 01179d90e3
commit fa063b3fda
4 changed files with 52 additions and 5 deletions

View File

@ -538,6 +538,54 @@ public interface DeviceChannelMapper {
" from wvp_device_channel where device_db_id = #{deviceDbId}")
List<DeviceChannel> 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<DeviceChannel> 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<Device> getDeviceByChannelDeviceId(String channelId);

View File

@ -425,7 +425,7 @@ public class DeviceChannelServiceImpl implements IDeviceChannelService {
if (CollectionUtils.isEmpty(deviceChannelList)) {
return false;
}
List<DeviceChannel> allChannels = channelMapper.queryAllChannels(deviceDbId);
List<DeviceChannel> allChannels = channelMapper.queryAllChannelsForRefresh(deviceDbId);
Map<String,DeviceChannel> allChannelMap = new ConcurrentHashMap<>();
if (!allChannels.isEmpty()) {
for (DeviceChannel deviceChannel : allChannels) {
@ -444,11 +444,11 @@ public class DeviceChannelServiceImpl implements IDeviceChannelService {
// 数据去重
Set<String> 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());

View File

@ -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;
}

View File

@ -14,7 +14,7 @@
<i class="iconfont icon-a-mti-9fenpingshi btn" :class="{active: spiltIndex === 3}" @click="spiltIndex=3"/>
</div>
<div style="text-align: right">
<i class="iconfont icon-quanping1 btn" @click="fullScreen()"/>
<i class="el-icon-full-screen btn" @click="fullScreen()"/>
</div>
</el-header>
<el-main style="padding: 0; margin: 0 auto; background-color: #a9a8a8" >