mirror of
https://gitee.com/pan648540858/wvp-GB28181-pro.git
synced 2026-05-06 14:07:49 +08:00
修复目录订阅通道删除,修复多wvp鉴权信息不共用导致鉴权失败的BUG
This commit is contained in:
parent
6ced304143
commit
c507709690
@ -247,6 +247,7 @@ public class DeviceChannel extends CommonGBChannel {
|
||||
Element deviceElement = element.element("DeviceID");
|
||||
DeviceChannel deviceChannel = new DeviceChannel();
|
||||
deviceChannel.setDeviceId(deviceElement.getText());
|
||||
deviceChannel.setDataType(ChannelDataType.GB28181);
|
||||
return deviceChannel;
|
||||
}
|
||||
|
||||
|
||||
@ -432,7 +432,7 @@ public interface CommonGBChannelMapper {
|
||||
", gb_download_speed=#{item.gbDownloadSpeed}" +
|
||||
", gb_svc_space_support_mod=#{item.gbSvcSpaceSupportMod}" +
|
||||
", gb_svc_time_support_mode=#{item.gbSvcTimeSupportMode}" +
|
||||
", enable_broadcast = #{enableBroadcast}" +
|
||||
", enable_broadcast = #{item.enableBroadcast}" +
|
||||
" WHERE id=#{item.gbId}" +
|
||||
"</foreach>" +
|
||||
"</script>"})
|
||||
@ -593,7 +593,7 @@ public interface CommonGBChannelMapper {
|
||||
List<CommonGBChannel> queryOnlineListsByGbDeviceId(@Param("deviceId") int deviceId);
|
||||
|
||||
@SelectProvider(type = ChannelProvider.class, method = "queryCommonChannelByDeviceChannel")
|
||||
CommonGBChannel queryCommonChannelByDeviceChannel(DeviceChannel channel);
|
||||
CommonGBChannel queryCommonChannelByDeviceChannel(@Param("dataType") Integer dataType, @Param("dataDeviceId") Integer dataDeviceId, @Param("deviceId") String deviceId);
|
||||
|
||||
@Update("UPDATE wvp_device_channel SET stream_id = #{stream} where id = #{gbId}")
|
||||
void updateStream(int gbId, String stream);
|
||||
@ -696,5 +696,4 @@ public interface CommonGBChannelMapper {
|
||||
@SelectProvider(type = ChannelProvider.class, method = "queryListOutExtent")
|
||||
List<CommonGBChannel> queryListOutExtent(@Param("minLng") double minLng, @Param("maxLng") double maxLng,
|
||||
@Param("minLat") double minLat, @Param("maxLat") double maxLat);
|
||||
|
||||
}
|
||||
|
||||
@ -105,7 +105,7 @@ public interface DeviceChannelMapper {
|
||||
@Delete("DELETE FROM wvp_device_channel WHERE data_type =1 and data_device_id=#{dataDeviceId}")
|
||||
int cleanChannelsByDeviceId(@Param("dataDeviceId") int dataDeviceId);
|
||||
|
||||
@Delete("DELETE FROM wvp_device_channel WHERE WHERE data_type=#{dataType} and data_device_id=#{dataDeviceId} AND device_id=#{deviceId}")
|
||||
@Delete("DELETE FROM wvp_device_channel WHERE data_type=#{dataType} and data_device_id=#{dataDeviceId} AND device_id=#{deviceId}")
|
||||
int deleteForNotify(DeviceChannel channel);
|
||||
|
||||
@Select(value = {" <script>" +
|
||||
|
||||
@ -2,6 +2,7 @@ package com.genersoft.iot.vmp.gb28181.service.impl;
|
||||
|
||||
import com.alibaba.excel.support.cglib.beans.BeanMap;
|
||||
import com.alibaba.excel.util.BeanMapUtils;
|
||||
import com.alibaba.fastjson2.JSON;
|
||||
import com.genersoft.iot.vmp.common.VideoManagerConstants;
|
||||
import com.genersoft.iot.vmp.common.enums.ChannelDataType;
|
||||
import com.genersoft.iot.vmp.conf.DynamicTask;
|
||||
@ -873,7 +874,8 @@ public class GbChannelServiceImpl implements IGbChannelService {
|
||||
|
||||
@Override
|
||||
public CommonGBChannel queryCommonChannelByDeviceChannel(DeviceChannel channel) {
|
||||
return commonGBChannelMapper.queryCommonChannelByDeviceChannel(channel);
|
||||
System.out.println(JSON.toJSONString(channel));
|
||||
return commonGBChannelMapper.queryCommonChannelByDeviceChannel(channel.getDataType(), channel.getDataDeviceId(), channel.getDeviceId());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -212,21 +212,21 @@ public class RedisCatchStorageImpl implements IRedisCatchStorage {
|
||||
|
||||
@Override
|
||||
public void updateStreamAuthorityInfo(String app, String stream, StreamAuthorityInfo streamAuthorityInfo) {
|
||||
String key = VideoManagerConstants.MEDIA_STREAM_AUTHORITY + userSetting.getServerId();
|
||||
String key = VideoManagerConstants.MEDIA_STREAM_AUTHORITY;
|
||||
String objectKey = app+ "_" + stream;
|
||||
redisTemplate.opsForHash().put(key, objectKey, streamAuthorityInfo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeStreamAuthorityInfo(String app, String stream) {
|
||||
String key = VideoManagerConstants.MEDIA_STREAM_AUTHORITY + userSetting.getServerId();
|
||||
String key = VideoManagerConstants.MEDIA_STREAM_AUTHORITY;
|
||||
String objectKey = app+ "_" + stream;
|
||||
redisTemplate.opsForHash().delete(key, objectKey);
|
||||
}
|
||||
|
||||
@Override
|
||||
public StreamAuthorityInfo getStreamAuthorityInfo(String app, String stream) {
|
||||
String key = VideoManagerConstants.MEDIA_STREAM_AUTHORITY + userSetting.getServerId();
|
||||
String key = VideoManagerConstants.MEDIA_STREAM_AUTHORITY;
|
||||
String objectKey = app+ "_" + stream;
|
||||
return (StreamAuthorityInfo)redisTemplate.opsForHash().get(key, objectKey);
|
||||
|
||||
@ -234,7 +234,7 @@ public class RedisCatchStorageImpl implements IRedisCatchStorage {
|
||||
|
||||
@Override
|
||||
public List<StreamAuthorityInfo> getAllStreamAuthorityInfo() {
|
||||
String key = VideoManagerConstants.MEDIA_STREAM_AUTHORITY + userSetting.getServerId();
|
||||
String key = VideoManagerConstants.MEDIA_STREAM_AUTHORITY;
|
||||
List<StreamAuthorityInfo> result = new ArrayList<>();
|
||||
List<Object> values = redisTemplate.opsForHash().values(key);
|
||||
for (Object value : values) {
|
||||
|
||||
@ -32,6 +32,7 @@ public class RedisPushStreamMessage {
|
||||
push.setGbModel(model);
|
||||
push.setGbPtzType(ptzType);
|
||||
push.setGbStatus(status?"ON":"OFF");
|
||||
push.setEnableBroadcast(0);
|
||||
return push;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div id="CommonChannelEdit" v-loading="loading" style="width: 100%; overflow: auto; height: calc(-148px + 100vh);">
|
||||
<div id="CommonChannelEdit" v-loading="loading" style="width: 100%; height: calc(-218px + 100vh); overflow: auto;">
|
||||
<el-form ref="channelForm" :model="form" :rules="rules" status-icon label-width="160px" class="channel-form" size="medium">
|
||||
<div class="form-box">
|
||||
<el-form-item label="名称" prop="gbName">
|
||||
|
||||
@ -6,7 +6,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<el-tabs tab-position="top" style="padding-top: 1rem">
|
||||
<el-tab-pane label="拉流代理信息" style="padding-top: 1rem">
|
||||
<el-tab-pane label="拉流代理信息" style="padding-top: 1rem; height: calc(-218px + 100vh);
|
||||
overflow: auto;">
|
||||
<el-form ref="streamProxy" :rules="rules" :model="streamProxy" label-width="140px" style="width: 50%; margin: 0 auto">
|
||||
<el-form-item label="类型" prop="type">
|
||||
<el-select
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div id="addUser" v-loading="isLoging">
|
||||
<div id="buildPushStreamUrl">
|
||||
<el-dialog
|
||||
v-el-drag-dialog
|
||||
title="构建推流地址"
|
||||
|
||||
@ -5,8 +5,9 @@
|
||||
<el-page-header content="编辑推流信息" @back="close" />
|
||||
</div>
|
||||
</div>
|
||||
<el-tabs tab-position="top" style="padding: 1rem 0">
|
||||
<el-tab-pane label="推流信息编辑" style="background-color: #FFFFFF; padding: 1rem">
|
||||
<el-tabs tab-position="top" style="padding-top: 1rem;">
|
||||
<el-tab-pane label="推流信息编辑" style="background-color: #FFFFFF; padding: 1rem; height: calc(-218px + 100vh);
|
||||
overflow: auto;">
|
||||
<el-divider content-position="center">基础信息</el-divider>
|
||||
<el-form ref="streamPushForm" v-loading="locading" status-icon label-width="160px" class="channel-form">
|
||||
<el-form-item label="应用名">
|
||||
|
||||
@ -93,6 +93,12 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="gbDeviceId" label="国标编码" min-width="200" />
|
||||
<el-table-column label="国标状态" min-width="100">
|
||||
<template v-slot:default="scope">
|
||||
<el-tag v-if="scope.row.gbStatus === 'ON' " size="medium">在线</el-tag>
|
||||
<el-tag v-if="scope.row.gbStatus !== 'ON' " size="medium" type="info">离线</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="位置信息" min-width="150">
|
||||
<template v-slot:default="scope">
|
||||
<span v-if="scope.row.gbLongitude && scope.row.gbLatitude" size="medium">{{ scope.row.gbLongitude }}<br>{{ scope.row.gbLatitude }}</span>
|
||||
@ -137,7 +143,7 @@
|
||||
<devicePlayer ref="devicePlayer" />
|
||||
<addStreamTOGB ref="addStreamTOGB" />
|
||||
<importChannel ref="importChannel" />
|
||||
<stream-push-edit v-if="streamPush" :stream-push="streamPush" :close-edit="closeEdit" style="height: calc(100vh - 90px);" />
|
||||
<stream-push-edit v-if="streamPush" :stream-push="streamPush" :close-edit="closeEdit" />
|
||||
<buildPushStreamUrl ref="buildPushStreamUrl" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user