diff --git a/gb28181-wvp-proxy-service/src/main/java/cn/skcks/docking/gb28181/wvp/service/gb28181/Gb28181DownloadService.java b/gb28181-wvp-proxy-service/src/main/java/cn/skcks/docking/gb28181/wvp/service/gb28181/Gb28181DownloadService.java index afcfd91..9245074 100644 --- a/gb28181-wvp-proxy-service/src/main/java/cn/skcks/docking/gb28181/wvp/service/gb28181/Gb28181DownloadService.java +++ b/gb28181-wvp-proxy-service/src/main/java/cn/skcks/docking/gb28181/wvp/service/gb28181/Gb28181DownloadService.java @@ -241,7 +241,7 @@ public class Gb28181DownloadService { return result; } - String existUrl = RedisUtil.StringOps.get(CacheUtil.getKey(deviceCode, MediaSdpHelper.Action.PLAY.getAction())); + String existUrl = RedisUtil.StringOps.get(CacheUtil.getKey(MediaSdpHelper.Action.PLAY.getAction(), deviceCode)); if(Optional.ofNullable(existUrl).isPresent()){ result.setResult(JsonResponse.success(existUrl)); return result; @@ -255,12 +255,12 @@ public class Gb28181DownloadService { } log.info("获取媒体信息 {}", videoInfo); String cacheKey = CacheUtil.getKey(docking.getGbDeviceId(), device.getGbDeviceChannelId()); - RedisUtil.StringOps.set(CacheUtil.getKey(MediaSdpHelper.Action.PLAY.getAction(),videoInfo.getCallId()), JsonUtils.toJson(videoInfo)); + RedisUtil.StringOps.set(CacheUtil.getKey(MediaSdpHelper.Action.PLAY.getAction(), videoInfo.getCallId()), JsonUtils.toJson(videoInfo)); String url = StringUtils.isNotBlank(proxySipConfig.getProxyMediaUrl()) ? StringUtils.replace(videoInfo.getUrl(), zlmMediaConfig.getUrl(), proxySipConfig.getProxyMediaUrl()): videoInfo.getUrl(); - RedisUtil.StringOps.set(CacheUtil.getKey(deviceCode, MediaSdpHelper.Action.PLAY.getAction()), url); + RedisUtil.StringOps.set(CacheUtil.getKey(MediaSdpHelper.Action.PLAY.getAction(), deviceCode), url); result.setResult(JsonResponse.success(url)); }); }, 200, TimeUnit.MILLISECONDS); @@ -298,7 +298,7 @@ public class Gb28181DownloadService { String cacheKey = CacheUtil.getKey(docking.getGbDeviceId(), device.getGbDeviceChannelId()); String existCallId = RedisUtil.StringOps.get(cacheKey); - RedisUtil.KeyOps.delete(CacheUtil.getKey(deviceCode, MediaSdpHelper.Action.PLAY.getAction())); + RedisUtil.KeyOps.delete(CacheUtil.getKey(MediaSdpHelper.Action.PLAY.getAction(), deviceCode)); String infoKey = CacheUtil.getKey(MediaSdpHelper.Action.PLAY.getAction(), existCallId); VideoInfo videoInfo = JsonUtils.parse(RedisUtil.StringOps.get(infoKey), VideoInfo.class); if(videoInfo != null){