Merge remote-tracking branch 'origin/wvp-28181-2.0' into wvp-28181-2.0
This commit is contained in:
@@ -344,10 +344,10 @@ public interface DeviceChannelMapper {
|
||||
"select * " +
|
||||
"from device_channel " +
|
||||
"where deviceId=#{deviceId}" +
|
||||
" <if test='parentId != null and length != null' > and parentId = #{parentId} or left(channelId, #{parentId.length()}) = #{parentId} and length(channelId)=#{length} </if>" +
|
||||
" <if test='parentId != null and length != null' > and parentId = #{parentId} or left(channelId, LENGTH(#{parentId})) = #{parentId} and length(channelId)=#{length} </if>" +
|
||||
" <if test='parentId == null and length != null' > and parentId = #{parentId} or length(channelId)=#{length} </if>" +
|
||||
" <if test='parentId == null and length == null' > and parentId = #{parentId} </if>" +
|
||||
" <if test='parentId != null and length == null' > and parentId = #{parentId} or left(channelId, #{parentId.length()}) = #{parentId} </if>" +
|
||||
" <if test='parentId != null and length == null' > and parentId = #{parentId} or left(channelId, LENGTH(#{parentId})) = #{parentId} </if>" +
|
||||
" </script>"})
|
||||
List<DeviceChannel> getChannelsWithCivilCodeAndLength(String deviceId, String parentId, Integer length);
|
||||
|
||||
|
||||
@@ -177,12 +177,14 @@ public class RedisCatchStorageImpl implements IRedisCatchStorage {
|
||||
@Override
|
||||
public boolean startDownload(StreamInfo stream, String callId) {
|
||||
boolean result;
|
||||
String key=String.format("%S_%s_%s_%s_%s_%s_%s", VideoManagerConstants.DOWNLOAD_PREFIX,
|
||||
userSetting.getServerId(), stream.getMediaServerId(), stream.getDeviceID(), stream.getChannelId(), stream.getStream(), callId);
|
||||
if (stream.getProgress() == 1) {
|
||||
result = RedisUtil.set(String.format("%S_%s_%s_%s_%s_%s_%s", VideoManagerConstants.DOWNLOAD_PREFIX,
|
||||
userSetting.getServerId(), stream.getMediaServerId(), stream.getDeviceID(), stream.getChannelId(), stream.getStream(), callId), stream);
|
||||
logger.debug("添加下载缓存==已完成下载=》{}",key);
|
||||
result = RedisUtil.set(key, stream);
|
||||
}else {
|
||||
result = RedisUtil.set(String.format("%S_%s_%s_%s_%s_%s_%s", VideoManagerConstants.DOWNLOAD_PREFIX,
|
||||
userSetting.getServerId(), stream.getMediaServerId(), stream.getDeviceID(), stream.getChannelId(), stream.getStream(), callId), stream, 60*60);
|
||||
logger.debug("添加下载缓存==未完成下载=》{}",key);
|
||||
result = RedisUtil.set(key, stream, 60*60);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -617,7 +619,7 @@ public class RedisCatchStorageImpl implements IRedisCatchStorage {
|
||||
stream,
|
||||
callId
|
||||
);
|
||||
List<Object> streamInfoScan = RedisUtil.scan(key);
|
||||
List<Object> streamInfoScan = RedisUtil.scan2(key);
|
||||
if (streamInfoScan.size() > 0) {
|
||||
return (StreamInfo) RedisUtil.get((String) streamInfoScan.get(0));
|
||||
}else {
|
||||
|
||||
Reference in New Issue
Block a user