修复目录订阅通道删除,修复多wvp鉴权信息不共用导致鉴权失败的BUG
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user