From 00a5ab9dde8a1dbbf5200d0df908bd8bae6bd72d Mon Sep 17 00:00:00 2001 From: shikong <919411476@qq.com> Date: Mon, 18 Dec 2023 15:10:52 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wvp/service/gb28181/Gb28181DownloadService.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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){