From a9a4c7a4e5fd10cf7bde65e669fc3eb315d5bb1e Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Fri, 3 Jan 2025 16:34:11 +0800 Subject: [PATCH] =?UTF-8?q?[=E9=9B=86=E7=BE=A4]=20=E4=BF=AE=E5=A4=8DBUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iot/vmp/gb28181/event/EventPublisher.java | 4 ---- .../redisMsg/control/RedisRpcPlatformController.java | 11 ++++++----- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/event/EventPublisher.java b/src/main/java/com/genersoft/iot/vmp/gb28181/event/EventPublisher.java index 4fd171ef..cbf5c161 100755 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/event/EventPublisher.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/event/EventPublisher.java @@ -109,10 +109,6 @@ public class EventPublisher { } } - public void catalogEventPublish(CatalogEvent event) { - applicationEventPublisher.publishEvent(event); - } - public void mobilePositionEventPublish(MobilePosition mobilePosition) { MobilePositionEvent event = new MobilePositionEvent(this); event.setMobilePosition(mobilePosition); diff --git a/src/main/java/com/genersoft/iot/vmp/service/redisMsg/control/RedisRpcPlatformController.java b/src/main/java/com/genersoft/iot/vmp/service/redisMsg/control/RedisRpcPlatformController.java index fbb7be5e..281d47be 100644 --- a/src/main/java/com/genersoft/iot/vmp/service/redisMsg/control/RedisRpcPlatformController.java +++ b/src/main/java/com/genersoft/iot/vmp/service/redisMsg/control/RedisRpcPlatformController.java @@ -21,6 +21,8 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.stereotype.Component; +import java.util.List; + @Component @Slf4j @RedisRpcController("platform") @@ -69,11 +71,10 @@ public class RedisRpcPlatformController extends RpcController { @RedisRpcMapping("catalogEventPublish") public RedisRpcResponse catalogEventPublish(RedisRpcRequest request) { JSONObject jsonObject = JSONObject.parseObject(request.getParam().toString()); - CatalogEvent catalogEvent = new CatalogEvent(this); - catalogEvent.setPlatform(jsonObject.getObject("platform", Platform.class)); - catalogEvent.setChannels(jsonObject.getJSONArray("channels").toJavaList(CommonGBChannel.class)); - catalogEvent.setType(jsonObject.getString("type")); - eventPublisher.catalogEventPublish(catalogEvent); + Platform platform = jsonObject.getObject("platform", Platform.class); + List channels = jsonObject.getJSONArray("channels").toJavaList(CommonGBChannel.class); + String type = jsonObject.getString("type"); + eventPublisher.catalogEventPublish(platform, channels, type); RedisRpcResponse response = request.getResponse(); response.setStatusCode(ErrorCode.SUCCESS.getCode()); return response;