From 3e30d4cfdf33d8bc1dbff482be11391af22d4885 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=81=E5=8C=A0=E5=90=9B?= Date: Wed, 1 Jul 2026 15:22:27 +0800 Subject: [PATCH 01/24] =?UTF-8?q?[=E4=BC=98=E5=8C=96]=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=8F=8A=E6=97=A5=E5=BF=97=E5=91=BD=E5=90=8D?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../autoconfigure/MqttAutoConfiguration.java | 28 +++++++++---------- .../MqttInboundMessageHandler.java | 6 ++-- .../AbstractExtInboundMessageHandler.java | 2 +- .../AbstractSysInboundMessageHandler.java | 2 +- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-autoconfigure/src/main/java/cn/herodotus/thingsbrain/mqtt/autoconfigure/MqttAutoConfiguration.java b/thingsbrain-mqtt/thingsbrain-mqtt-autoconfigure/src/main/java/cn/herodotus/thingsbrain/mqtt/autoconfigure/MqttAutoConfiguration.java index 8b57919..b705d3a 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-autoconfigure/src/main/java/cn/herodotus/thingsbrain/mqtt/autoconfigure/MqttAutoConfiguration.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-autoconfigure/src/main/java/cn/herodotus/thingsbrain/mqtt/autoconfigure/MqttAutoConfiguration.java @@ -81,7 +81,7 @@ public class MqttAutoConfiguration { @Bean public MqttMessageDuplicateInspector mqttMessageDuplicateInspector() { DefaultMqttMessageDuplicateInspector protector = new DefaultMqttMessageDuplicateInspector(); - log.trace("[ThingsMesh] |- Bean [Mqtt Message Duplicate Inspector] Configure."); + log.trace("[ThingsBrain] |- Bean [Mqtt Message Duplicate Inspector] Configure."); return protector; } @@ -90,28 +90,28 @@ public class MqttAutoConfiguration { * * @return Mqtt 默认消息入站消息转 Event 通道 {@link MessageChannel} */ - @Bean(name = Channels.MQTT__THINGSMESH_INBOUND_CHANNEL) - public MessageChannel mqttThingsMeshInboundChannel() { + @Bean(name = Channels.MQTT__THINGSBRAIN_INBOUND_CHANNEL) + public MessageChannel mqttThingsBrainInboundChannel() { return MessageChannels.direct().getObject(); } - @Bean(name = "mqttThingsMeshInbound") - public Mqttv5PahoMessageDrivenChannelAdapter mqttThingsMeshInbound( + @Bean(name = "mqttThingsBrainInbound") + public Mqttv5PahoMessageDrivenChannelAdapter mqttThingsBrainInbound( ClientManager clientManager, MqttTopicProperties mqttTopicProperties, - @Qualifier(Channels.MQTT__THINGSMESH_INBOUND_CHANNEL) MessageChannel mqttThingsMeshInboundChannel) { + @Qualifier(Channels.MQTT__THINGSBRAIN_INBOUND_CHANNEL) MessageChannel mqttThingsBrainInboundChannel) { Mqttv5PahoMessageDrivenChannelAdapter adapter = new Mqttv5PahoMessageDrivenChannelAdapter(clientManager, ListUtils.toStringArray(mqttTopicProperties.getDefaultSubscribes())); adapter.setPayloadType(String.class); adapter.setManualAcks(false); - adapter.setOutputChannel(mqttThingsMeshInboundChannel); + adapter.setOutputChannel(mqttThingsBrainInboundChannel); adapter.setErrorChannelName(IntegrationContextUtils.ERROR_CHANNEL_BEAN_NAME); - log.trace("[ThingsMesh] |- Bean [Things Mesh Mqtt Message Driven Channel Adapter] Configure."); + log.trace("[ThingsBrain] |- Bean [Things Mesh Mqtt Message Driven Channel Adapter] Configure."); return adapter; } @Bean - @ServiceActivator(inputChannel = Channels.MQTT__THINGSMESH_INBOUND_CHANNEL) - public MessageHandler mqttThingsMeshInboundHandler( + @ServiceActivator(inputChannel = Channels.MQTT__THINGSBRAIN_INBOUND_CHANNEL) + public MessageHandler mqttThingsBrainInboundHandler( MqttProperties mqttProperties, MqttMessageDuplicateInspector mqttMessageDuplicateInspector, MqttInboundMessageDispatcher mqttInboundMessageDispatcher) { @@ -119,16 +119,16 @@ public class MqttAutoConfiguration { } @Bean - public MqttSubscribeTopicAppenderListener mqttSubscribeTopicAppenderListener(@Qualifier("mqttThingsMeshInbound") Mqttv5PahoMessageDrivenChannelAdapter mqttThingsMeshInbound) { - MqttSubscribeTopicAppenderListener listener = new MqttSubscribeTopicAppenderListener(mqttThingsMeshInbound); - log.trace("[ThingsMesh] |- Bean [Mqtt Subscribe Topic Appender] Configure."); + public MqttSubscribeTopicAppenderListener mqttSubscribeTopicAppenderListener(@Qualifier("mqttThingsBrainInbound") Mqttv5PahoMessageDrivenChannelAdapter mqttThingsBrainInbound) { + MqttSubscribeTopicAppenderListener listener = new MqttSubscribeTopicAppenderListener(mqttThingsBrainInbound); + log.trace("[ThingsBrain] |- Bean [Mqtt Subscribe Topic Appender] Configure."); return listener; } @Bean public MqttMessagePublisher mqttMessagePublisher() { DefaultMqttMessagePublisher mqttMessageManager = new DefaultMqttMessagePublisher(); - log.trace("[ThingsMesh] |- Bean [Default Mqtt Message Manager] Configure."); + log.trace("[ThingsBrain] |- Bean [Default Mqtt Message Manager] Configure."); return mqttMessageManager; } } diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-autoconfigure/src/main/java/cn/herodotus/thingsbrain/mqtt/autoconfigure/integration/MqttInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-autoconfigure/src/main/java/cn/herodotus/thingsbrain/mqtt/autoconfigure/integration/MqttInboundMessageHandler.java index 4323a6b..d7518b9 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-autoconfigure/src/main/java/cn/herodotus/thingsbrain/mqtt/autoconfigure/integration/MqttInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-autoconfigure/src/main/java/cn/herodotus/thingsbrain/mqtt/autoconfigure/integration/MqttInboundMessageHandler.java @@ -72,15 +72,15 @@ public class MqttInboundMessageHandler implements MessageHandler { MqttMessageDetails details = toDetailsConverter.convert(message); if (!details.isEmpty()) { - log.debug("[ThingsMesh] |- LINK - [1] Receive the message from topic [{}]", details.getTopic()); + log.debug("[ThingsBrain] |- LINK - [1] Receive the message from topic [{}]", details.getTopic()); if (!mqttMessageDuplicateInspector.isDuplicate(details)) { mqttInboundMessageDispatcher.process(details); mqttMessageDuplicateInspector.record(details); } else { - log.warn("[ThingsMesh] |- LINK - Ignore message [{}], because messageId in cache or message duplicate!", message); + log.warn("[ThingsBrain] |- LINK - Ignore message [{}], because messageId in cache or message duplicate!", message); } } else { - log.warn("[ThingsMesh] |- LINK - Message [{}] payload is incorrect!", message); + log.warn("[ThingsBrain] |- LINK - Message [{}] payload is incorrect!", message); error(details); } } diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/AbstractExtInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/AbstractExtInboundMessageHandler.java index 0e67809..0370c7b 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/AbstractExtInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/AbstractExtInboundMessageHandler.java @@ -64,7 +64,7 @@ public abstract class AbstractExtInboundMessageHandler extends AbstractRep O result = getFunction(subsetSessionManager).apply(completeIdentifier, domain.getParams()); return success(domain.getId(), result); } catch (InboundMessageProcessingException e) { - log.error("[ThingsMesh] |- Ext session topic data process catch error!", e); + log.error("[ThingsBrain] |- Ext session topic data process catch error!", e); return internalServerError(domain.getId()); } } diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/AbstractSysInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/AbstractSysInboundMessageHandler.java index 2e91887..87da5bf 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/AbstractSysInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/AbstractSysInboundMessageHandler.java @@ -88,7 +88,7 @@ public abstract class AbstractSysInboundMessageHandler extends Abstract O result = getFunction(messageManager).apply(identity, domain.getParams()); return success(domain.getId(), result, isNeedReply); } catch (InboundMessageProcessingException e) { - log.error("[ThingsMesh] |- Ext session topic data process catch error!", e); + log.error("[ThingsBrain] |- Ext session topic data process catch error!", e); return internalServerError(domain.getId(), isNeedReply); } } -- Gitee From a85cf9d5d457fa48664d1e2572897f722e4e7a22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=81=E5=8C=A0=E5=90=9B?= Date: Wed, 1 Jul 2026 15:41:23 +0800 Subject: [PATCH 02/24] =?UTF-8?q?[=E4=BC=98=E5=8C=96]=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=91=BD=E5=90=8D=E5=8F=8A=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E5=86=85=E5=AE=B9=E6=A0=87=E8=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../autoconfigure/MqttAutoConfiguration.java | 24 +++--- .../MqttInboundMessageHandler.java | 12 +-- ...MqttInboundMessageDuplicateInspector.java} | 6 +- ... DefaultMqttOutboundMessagePublisher.java} | 6 +- ...MqttInboundMessageDuplicateInspector.java} | 4 +- ...java => MqttOutboundMessagePublisher.java} | 2 +- .../config/MqttInboundConfiguration.java | 66 ++++++++++++++- ...InboundMessageDispatcherConfiguration.java | 82 ------------------ ...qttInboundMessageHandlerConfiguration.java | 83 ------------------- .../AbstractReplyMessageDispatcher.java | 20 ++--- .../ExtInboundMessageDispatcher.java | 8 +- .../ShadowInboundMessageDispatcher.java | 10 +-- .../SysInboundMessageDispatcher.java | 8 +- .../InboundResponseMessageProcessor.java} | 6 +- .../MqttRegistrationSuccessListener.java | 10 +-- .../outbound/service/DeviceConfigService.java | 12 +-- .../outbound/service/DeviceJobService.java | 10 +-- .../outbound/service/DeviceShadowService.java | 10 +-- .../outbound/service/SubsetStatusService.java | 14 ++-- .../outbound/service/SubsetTopoService.java | 12 +-- .../outbound/service/TslServiceService.java | 12 +-- 21 files changed, 156 insertions(+), 261 deletions(-) rename thingsbrain-mqtt/thingsbrain-mqtt-autoconfigure/src/main/java/cn/herodotus/thingsbrain/mqtt/autoconfigure/processor/{DefaultMqttMessageDuplicateInspector.java => DefaultMqttInboundMessageDuplicateInspector.java} (92%) rename thingsbrain-mqtt/thingsbrain-mqtt-autoconfigure/src/main/java/cn/herodotus/thingsbrain/mqtt/autoconfigure/processor/{DefaultMqttMessagePublisher.java => DefaultMqttOutboundMessagePublisher.java} (92%) rename thingsbrain-mqtt/thingsbrain-mqtt-commons/src/main/java/cn/herodotus/thingsbrain/mqtt/commons/definition/{MqttMessageDuplicateInspector.java => MqttInboundMessageDuplicateInspector.java} (94%) rename thingsbrain-mqtt/thingsbrain-mqtt-commons/src/main/java/cn/herodotus/thingsbrain/mqtt/commons/definition/{MqttMessagePublisher.java => MqttOutboundMessagePublisher.java} (99%) delete mode 100644 thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/config/MqttInboundMessageDispatcherConfiguration.java delete mode 100644 thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/config/MqttInboundMessageHandlerConfiguration.java rename thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/{response/InboundMessageReplyProcessor.java => processor/InboundResponseMessageProcessor.java} (93%) diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-autoconfigure/src/main/java/cn/herodotus/thingsbrain/mqtt/autoconfigure/MqttAutoConfiguration.java b/thingsbrain-mqtt/thingsbrain-mqtt-autoconfigure/src/main/java/cn/herodotus/thingsbrain/mqtt/autoconfigure/MqttAutoConfiguration.java index b705d3a..e1d1a4e 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-autoconfigure/src/main/java/cn/herodotus/thingsbrain/mqtt/autoconfigure/MqttAutoConfiguration.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-autoconfigure/src/main/java/cn/herodotus/thingsbrain/mqtt/autoconfigure/MqttAutoConfiguration.java @@ -32,10 +32,10 @@ import cn.herodotus.dante.message.commons.constant.Channels; import cn.herodotus.thingsbrain.mqtt.autoconfigure.integration.MqttInboundMessageHandler; import cn.herodotus.thingsbrain.mqtt.autoconfigure.integration.MqttSubscribeTopicAppenderListener; import cn.herodotus.thingsbrain.mqtt.autoconfigure.integration.MqttTopicProperties; -import cn.herodotus.thingsbrain.mqtt.autoconfigure.processor.DefaultMqttMessageDuplicateInspector; -import cn.herodotus.thingsbrain.mqtt.autoconfigure.processor.DefaultMqttMessagePublisher; -import cn.herodotus.thingsbrain.mqtt.commons.definition.MqttMessageDuplicateInspector; -import cn.herodotus.thingsbrain.mqtt.commons.definition.MqttMessagePublisher; +import cn.herodotus.thingsbrain.mqtt.autoconfigure.processor.DefaultMqttInboundMessageDuplicateInspector; +import cn.herodotus.thingsbrain.mqtt.autoconfigure.processor.DefaultMqttOutboundMessagePublisher; +import cn.herodotus.thingsbrain.mqtt.commons.definition.MqttInboundMessageDuplicateInspector; +import cn.herodotus.thingsbrain.mqtt.commons.definition.MqttOutboundMessagePublisher; import cn.herodotus.thingsbrain.mqtt.inbound.config.MqttInboundConfiguration; import cn.herodotus.thingsbrain.mqtt.inbound.dispatcher.MqttInboundMessageDispatcher; import cn.herodotus.thingsbrain.mqtt.outbound.config.MqttOutboundConfiguration; @@ -79,9 +79,9 @@ public class MqttAutoConfiguration { } @Bean - public MqttMessageDuplicateInspector mqttMessageDuplicateInspector() { - DefaultMqttMessageDuplicateInspector protector = new DefaultMqttMessageDuplicateInspector(); - log.trace("[ThingsBrain] |- Bean [Mqtt Message Duplicate Inspector] Configure."); + public MqttInboundMessageDuplicateInspector mqttInboundMessageDuplicateInspector() { + DefaultMqttInboundMessageDuplicateInspector protector = new DefaultMqttInboundMessageDuplicateInspector(); + log.trace("[ThingsBrain] |- Bean [Mqtt Inbound Message Duplicate Inspector] Configure."); return protector; } @@ -113,9 +113,9 @@ public class MqttAutoConfiguration { @ServiceActivator(inputChannel = Channels.MQTT__THINGSBRAIN_INBOUND_CHANNEL) public MessageHandler mqttThingsBrainInboundHandler( MqttProperties mqttProperties, - MqttMessageDuplicateInspector mqttMessageDuplicateInspector, + MqttInboundMessageDuplicateInspector mqttInboundMessageDuplicateInspector, MqttInboundMessageDispatcher mqttInboundMessageDispatcher) { - return new MqttInboundMessageHandler(mqttProperties, mqttMessageDuplicateInspector, mqttInboundMessageDispatcher); + return new MqttInboundMessageHandler(mqttProperties, mqttInboundMessageDuplicateInspector, mqttInboundMessageDispatcher); } @Bean @@ -126,9 +126,9 @@ public class MqttAutoConfiguration { } @Bean - public MqttMessagePublisher mqttMessagePublisher() { - DefaultMqttMessagePublisher mqttMessageManager = new DefaultMqttMessagePublisher(); - log.trace("[ThingsBrain] |- Bean [Default Mqtt Message Manager] Configure."); + public MqttOutboundMessagePublisher mqttOutboundMessagePublisher() { + DefaultMqttOutboundMessagePublisher mqttMessageManager = new DefaultMqttOutboundMessagePublisher(); + log.trace("[ThingsBrain] |- Bean [Mqtt Outbound Message Manager] Configure."); return mqttMessageManager; } } diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-autoconfigure/src/main/java/cn/herodotus/thingsbrain/mqtt/autoconfigure/integration/MqttInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-autoconfigure/src/main/java/cn/herodotus/thingsbrain/mqtt/autoconfigure/integration/MqttInboundMessageHandler.java index d7518b9..c875174 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-autoconfigure/src/main/java/cn/herodotus/thingsbrain/mqtt/autoconfigure/integration/MqttInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-autoconfigure/src/main/java/cn/herodotus/thingsbrain/mqtt/autoconfigure/integration/MqttInboundMessageHandler.java @@ -31,7 +31,7 @@ import cn.herodotus.dante.message.autoconfigure.mqtt.MqttProperties; import cn.herodotus.dante.message.commons.domain.MqttMessage; import cn.herodotus.dante.message.commons.event.MqttMessageSendingEvent; import cn.herodotus.dante.spring.context.ServiceContextHolder; -import cn.herodotus.thingsbrain.mqtt.commons.definition.MqttMessageDuplicateInspector; +import cn.herodotus.thingsbrain.mqtt.commons.definition.MqttInboundMessageDuplicateInspector; import cn.herodotus.thingsbrain.mqtt.commons.domain.MqttMessageDetails; import cn.herodotus.thingsbrain.mqtt.inbound.dispatcher.MqttInboundMessageDispatcher; import org.apache.commons.lang3.ObjectUtils; @@ -56,12 +56,12 @@ public class MqttInboundMessageHandler implements MessageHandler { private static final Logger log = LoggerFactory.getLogger(MqttInboundMessageHandler.class); - private final MqttMessageDuplicateInspector mqttMessageDuplicateInspector; + private final MqttInboundMessageDuplicateInspector mqttInboundMessageDuplicateInspector; private final MqttInboundMessageDispatcher mqttInboundMessageDispatcher; private final Converter, MqttMessageDetails> toDetailsConverter; - public MqttInboundMessageHandler(MqttProperties mqttProperties, MqttMessageDuplicateInspector mqttMessageDuplicateInspector, MqttInboundMessageDispatcher mqttInboundMessageDispatcher) { - this.mqttMessageDuplicateInspector = mqttMessageDuplicateInspector; + public MqttInboundMessageHandler(MqttProperties mqttProperties, MqttInboundMessageDuplicateInspector mqttInboundMessageDuplicateInspector, MqttInboundMessageDispatcher mqttInboundMessageDispatcher) { + this.mqttInboundMessageDuplicateInspector = mqttInboundMessageDuplicateInspector; this.mqttInboundMessageDispatcher = mqttInboundMessageDispatcher; this.toDetailsConverter = new MessageToMqttMessageDetailsConverter(mqttProperties); } @@ -73,9 +73,9 @@ public class MqttInboundMessageHandler implements MessageHandler { if (!details.isEmpty()) { log.debug("[ThingsBrain] |- LINK - [1] Receive the message from topic [{}]", details.getTopic()); - if (!mqttMessageDuplicateInspector.isDuplicate(details)) { + if (!mqttInboundMessageDuplicateInspector.isDuplicate(details)) { mqttInboundMessageDispatcher.process(details); - mqttMessageDuplicateInspector.record(details); + mqttInboundMessageDuplicateInspector.record(details); } else { log.warn("[ThingsBrain] |- LINK - Ignore message [{}], because messageId in cache or message duplicate!", message); } diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-autoconfigure/src/main/java/cn/herodotus/thingsbrain/mqtt/autoconfigure/processor/DefaultMqttMessageDuplicateInspector.java b/thingsbrain-mqtt/thingsbrain-mqtt-autoconfigure/src/main/java/cn/herodotus/thingsbrain/mqtt/autoconfigure/processor/DefaultMqttInboundMessageDuplicateInspector.java similarity index 92% rename from thingsbrain-mqtt/thingsbrain-mqtt-autoconfigure/src/main/java/cn/herodotus/thingsbrain/mqtt/autoconfigure/processor/DefaultMqttMessageDuplicateInspector.java rename to thingsbrain-mqtt/thingsbrain-mqtt-autoconfigure/src/main/java/cn/herodotus/thingsbrain/mqtt/autoconfigure/processor/DefaultMqttInboundMessageDuplicateInspector.java index c08067d..da408d0 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-autoconfigure/src/main/java/cn/herodotus/thingsbrain/mqtt/autoconfigure/processor/DefaultMqttMessageDuplicateInspector.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-autoconfigure/src/main/java/cn/herodotus/thingsbrain/mqtt/autoconfigure/processor/DefaultMqttInboundMessageDuplicateInspector.java @@ -27,7 +27,7 @@ package cn.herodotus.thingsbrain.mqtt.autoconfigure.processor; import cn.herodotus.dante.cache.utils.JetCacheUtils; import cn.herodotus.thingsbrain.mqtt.commons.constant.MqttConstants; -import cn.herodotus.thingsbrain.mqtt.commons.definition.MqttMessageDuplicateInspector; +import cn.herodotus.thingsbrain.mqtt.commons.definition.MqttInboundMessageDuplicateInspector; import cn.herodotus.thingsbrain.mqtt.commons.domain.MqttMessageDetails; import com.alicp.jetcache.Cache; import com.alicp.jetcache.anno.CacheType; @@ -41,14 +41,14 @@ import java.time.Duration; * @author : gengwei_zheng * @date : 2026/6/30 14:45 */ -public class DefaultMqttMessageDuplicateInspector implements MqttMessageDuplicateInspector { +public class DefaultMqttInboundMessageDuplicateInspector implements MqttInboundMessageDuplicateInspector { /** * 当前缓存值使用 topic,只是为了防止缓存空值。后续可结合业务调整为需要的数据。 */ private final Cache cache; - public DefaultMqttMessageDuplicateInspector() { + public DefaultMqttInboundMessageDuplicateInspector() { this.cache = JetCacheUtils.create(MqttConstants.CACHE_THINGSBRAIN_MESSAGE_ID, CacheType.BOTH, Duration.ofHours(1), true); } diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-autoconfigure/src/main/java/cn/herodotus/thingsbrain/mqtt/autoconfigure/processor/DefaultMqttMessagePublisher.java b/thingsbrain-mqtt/thingsbrain-mqtt-autoconfigure/src/main/java/cn/herodotus/thingsbrain/mqtt/autoconfigure/processor/DefaultMqttOutboundMessagePublisher.java similarity index 92% rename from thingsbrain-mqtt/thingsbrain-mqtt-autoconfigure/src/main/java/cn/herodotus/thingsbrain/mqtt/autoconfigure/processor/DefaultMqttMessagePublisher.java rename to thingsbrain-mqtt/thingsbrain-mqtt-autoconfigure/src/main/java/cn/herodotus/thingsbrain/mqtt/autoconfigure/processor/DefaultMqttOutboundMessagePublisher.java index b2fd08c..f244346 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-autoconfigure/src/main/java/cn/herodotus/thingsbrain/mqtt/autoconfigure/processor/DefaultMqttMessagePublisher.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-autoconfigure/src/main/java/cn/herodotus/thingsbrain/mqtt/autoconfigure/processor/DefaultMqttOutboundMessagePublisher.java @@ -27,7 +27,7 @@ package cn.herodotus.thingsbrain.mqtt.autoconfigure.processor; import cn.herodotus.dante.cache.utils.JetCacheUtils; import cn.herodotus.thingsbrain.mqtt.commons.constant.MqttConstants; -import cn.herodotus.thingsbrain.mqtt.commons.definition.MqttMessagePublisher; +import cn.herodotus.thingsbrain.mqtt.commons.definition.MqttOutboundMessagePublisher; import cn.herodotus.thingsbrain.mqtt.commons.domain.MqttMessageDetails; import cn.herodotus.thingsbrain.mqtt.commons.domain.MqttOperation; import cn.hutool.v7.core.text.StrUtil; @@ -45,11 +45,11 @@ import java.util.Optional; * @author : gengwei.zheng * @date : 2025/10/17 14:11 */ -public class DefaultMqttMessagePublisher implements MqttMessagePublisher { +public class DefaultMqttOutboundMessagePublisher implements MqttOutboundMessagePublisher { private final Cache cache; - public DefaultMqttMessagePublisher() { + public DefaultMqttOutboundMessagePublisher() { this.cache = JetCacheUtils.create(MqttConstants.CACHE_THINGSBRAIN_REQUEST_ID, CacheType.BOTH, Duration.ofSeconds(1), true); } diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-commons/src/main/java/cn/herodotus/thingsbrain/mqtt/commons/definition/MqttMessageDuplicateInspector.java b/thingsbrain-mqtt/thingsbrain-mqtt-commons/src/main/java/cn/herodotus/thingsbrain/mqtt/commons/definition/MqttInboundMessageDuplicateInspector.java similarity index 94% rename from thingsbrain-mqtt/thingsbrain-mqtt-commons/src/main/java/cn/herodotus/thingsbrain/mqtt/commons/definition/MqttMessageDuplicateInspector.java rename to thingsbrain-mqtt/thingsbrain-mqtt-commons/src/main/java/cn/herodotus/thingsbrain/mqtt/commons/definition/MqttInboundMessageDuplicateInspector.java index a950654..fafcb49 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-commons/src/main/java/cn/herodotus/thingsbrain/mqtt/commons/definition/MqttMessageDuplicateInspector.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-commons/src/main/java/cn/herodotus/thingsbrain/mqtt/commons/definition/MqttInboundMessageDuplicateInspector.java @@ -28,12 +28,12 @@ package cn.herodotus.thingsbrain.mqtt.commons.definition; import cn.herodotus.thingsbrain.mqtt.commons.domain.MqttMessageDetails; /** - *

Description: 重复消息保护器

+ *

Description: 入站重复消息检查器

* * @author : gengwei_zheng * @date : 2026/6/30 14:57 */ -public interface MqttMessageDuplicateInspector { +public interface MqttInboundMessageDuplicateInspector { /** * 判断 Mqtt 入站消息是否重复。 diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-commons/src/main/java/cn/herodotus/thingsbrain/mqtt/commons/definition/MqttMessagePublisher.java b/thingsbrain-mqtt/thingsbrain-mqtt-commons/src/main/java/cn/herodotus/thingsbrain/mqtt/commons/definition/MqttOutboundMessagePublisher.java similarity index 99% rename from thingsbrain-mqtt/thingsbrain-mqtt-commons/src/main/java/cn/herodotus/thingsbrain/mqtt/commons/definition/MqttMessagePublisher.java rename to thingsbrain-mqtt/thingsbrain-mqtt-commons/src/main/java/cn/herodotus/thingsbrain/mqtt/commons/definition/MqttOutboundMessagePublisher.java index 4544c27..1bcb7f8 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-commons/src/main/java/cn/herodotus/thingsbrain/mqtt/commons/definition/MqttMessagePublisher.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-commons/src/main/java/cn/herodotus/thingsbrain/mqtt/commons/definition/MqttOutboundMessagePublisher.java @@ -47,7 +47,7 @@ import java.util.Optional; * @author : gengwei.zheng * @date : 2025/10/17 14:10 */ -public interface MqttMessagePublisher { +public interface MqttOutboundMessagePublisher { /** * 判断缓存中,对应的请求ID是否已经存在。 diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/config/MqttInboundConfiguration.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/config/MqttInboundConfiguration.java index cb0b690..f8dc4fb 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/config/MqttInboundConfiguration.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/config/MqttInboundConfiguration.java @@ -25,12 +25,27 @@ package cn.herodotus.thingsbrain.mqtt.inbound.config; +import cn.herodotus.dante.message.commons.definition.strategy.MessageSendingEventManager; +import cn.herodotus.thingsbrain.link.commons.definition.DeviceShadowManager; +import cn.herodotus.thingsbrain.mqtt.commons.definition.MqttOutboundMessagePublisher; +import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.ExtInboundMessageHandler; +import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.OtaInboundMessageHandler; +import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.SysInboundMessageHandler; +import cn.herodotus.thingsbrain.mqtt.inbound.dispatcher.*; +import cn.herodotus.thingsbrain.mqtt.inbound.factory.ExtMessageHandlerFactory; +import cn.herodotus.thingsbrain.mqtt.inbound.factory.OtaMessageHandlerFactory; +import cn.herodotus.thingsbrain.mqtt.inbound.factory.SysMessageHandlerFactory; +import cn.herodotus.thingsbrain.mqtt.inbound.processor.InboundResponseMessageProcessor; import jakarta.annotation.PostConstruct; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; +import java.util.Map; + /** *

Description: Mqtt 入站消息模块配置

* @@ -38,9 +53,8 @@ import org.springframework.context.annotation.Import; * @date : 2026/5/1 22:15 */ @Configuration(proxyBeanMethods = false) -@Import({ - MqttInboundMessageHandlerConfiguration.class, - MqttInboundMessageDispatcherConfiguration.class +@ComponentScan(basePackages = { + "cn.herodotus.thingsbrain.mqtt.inbound.handler", }) public class MqttInboundConfiguration { @@ -50,4 +64,50 @@ public class MqttInboundConfiguration { public void postConstruct() { log.debug("[ThingsBrain] |- Module [Mqtt Inbound] Configure."); } + + @Bean + public SysMessageHandlerFactory sysMessageHandlerFactory(Map handlers) { + SysMessageHandlerFactory factory = new SysMessageHandlerFactory(handlers); + log.trace("[ThingsBrain] |- Bean [Sys Message Handler Factory] Configure."); + return factory; + } + + @Bean + public ExtMessageHandlerFactory extMessageHandlerFactory(Map handlers) { + ExtMessageHandlerFactory factory = new ExtMessageHandlerFactory(handlers); + log.trace("[ThingsBrain] |- Bean [Ext Message Handler Factory] Configure."); + return factory; + } + + @Bean + public OtaMessageHandlerFactory otaMessageHandlerFactory(Map handlers) { + OtaMessageHandlerFactory factory = new OtaMessageHandlerFactory(handlers); + log.trace("[ThingsBrain] |- Bean [Ota Message Handler Factory] Configure."); + return factory; + } + + @Bean + public InboundResponseMessageProcessor inboundResponseMessageProcessor(MessageSendingEventManager messageSendingEventManager) { + InboundResponseMessageProcessor handler = new InboundResponseMessageProcessor(messageSendingEventManager); + log.trace("[ThingsBrain] |- Bean [Inbound Message Reply Processor] Configure."); + return handler; + } + + @Bean + public MqttInboundMessageDispatcher mqttInboundMessageDispatcher( + SysMessageHandlerFactory sysMessageHandlerFactory, + ExtMessageHandlerFactory extMessageHandlerFactory, + OtaMessageHandlerFactory otaMessageHandlerFactory, + DeviceShadowManager deviceShadowManager, + InboundResponseMessageProcessor inboundResponseMessageProcessor, + MqttOutboundMessagePublisher mqttOutboundMessagePublisher) { + + SysInboundMessageDispatcher sysInboundMessageDispatcher = new SysInboundMessageDispatcher(sysMessageHandlerFactory, inboundResponseMessageProcessor, mqttOutboundMessagePublisher); + ExtInboundMessageDispatcher extInboundMessageDispatcher = new ExtInboundMessageDispatcher(extMessageHandlerFactory, inboundResponseMessageProcessor, mqttOutboundMessagePublisher); + OtaInboundMessageDispatcher otaInboundMessageDispatcher = new OtaInboundMessageDispatcher(otaMessageHandlerFactory); + ShadowInboundMessageDispatcher shadowInboundMessageDispatcher = new ShadowInboundMessageDispatcher(deviceShadowManager, mqttOutboundMessagePublisher); + MqttInboundMessageDispatcher dispatcher = new MqttInboundMessageDispatcher(extInboundMessageDispatcher, otaInboundMessageDispatcher, shadowInboundMessageDispatcher, sysInboundMessageDispatcher); + log.trace("[ThingsBrain] |- Bean [Shadow Inbound Message Listener] Configure."); + return dispatcher; + } } diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/config/MqttInboundMessageDispatcherConfiguration.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/config/MqttInboundMessageDispatcherConfiguration.java deleted file mode 100644 index 376126e..0000000 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/config/MqttInboundMessageDispatcherConfiguration.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright 2020-2030 码匠君 - * - * ThingsBrain licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * ThingsBrain 是 Dante Cloud 系统生态产品,采用 APACHE LICENSE 2.0 开源协议,您在使用过程中,需要注意以下几点: - * - * 1. 请不要删除和修改根目录下的LICENSE文件。 - * 2. 请不要删除和修改 ThingsBrain 源码头部的版权声明。 - * 3. 请保留源码和相关描述文件的项目出处,作者声明等。 - * 4. 分发源码时候,请注明软件出处 - * 5. 在修改包名,模块名称,项目代码等时,请注明软件出处 - * 6. 若您的项目无法满足以上几点,可申请商业授权 - */ - -package cn.herodotus.thingsbrain.mqtt.inbound.config; - -import cn.herodotus.dante.message.commons.definition.strategy.MessageSendingEventManager; -import cn.herodotus.thingsbrain.link.commons.definition.DeviceShadowManager; -import cn.herodotus.thingsbrain.mqtt.commons.definition.MqttMessagePublisher; -import cn.herodotus.thingsbrain.mqtt.inbound.dispatcher.*; -import cn.herodotus.thingsbrain.mqtt.inbound.factory.ExtMessageHandlerFactory; -import cn.herodotus.thingsbrain.mqtt.inbound.factory.OtaMessageHandlerFactory; -import cn.herodotus.thingsbrain.mqtt.inbound.factory.SysMessageHandlerFactory; -import cn.herodotus.thingsbrain.mqtt.inbound.response.InboundMessageReplyProcessor; -import jakarta.annotation.PostConstruct; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -/** - *

Description: TODO

- * - * @author : gengwei_zheng - * @date : 2026/5/3 16:40 - */ -@Configuration(proxyBeanMethods = false) -class MqttInboundMessageDispatcherConfiguration { - - private static final Logger log = LoggerFactory.getLogger(MqttInboundMessageDispatcherConfiguration.class); - - @PostConstruct - public void postConstruct() { - log.debug("[ThingsBrain] |- Module [Mqtt Inbound Message Dispatcher] Configure."); - } - - @Bean - public InboundMessageReplyProcessor inboundMessageReplyProcessor(MessageSendingEventManager messageSendingEventManager) { - InboundMessageReplyProcessor handler = new InboundMessageReplyProcessor(messageSendingEventManager); - log.trace("[ThingsBrain] |- Bean [Inbound Message Reply Processor] Configure."); - return handler; - } - - @Bean - public MqttInboundMessageDispatcher mqttInboundMessageDispatcher( - SysMessageHandlerFactory sysMessageHandlerFactory, - ExtMessageHandlerFactory extMessageHandlerFactory, - OtaMessageHandlerFactory otaMessageHandlerFactory, - DeviceShadowManager deviceShadowManager, - InboundMessageReplyProcessor inboundMessageReplyProcessor, - MqttMessagePublisher mqttMessagePublisher) { - - SysInboundMessageDispatcher sysInboundMessageDispatcher = new SysInboundMessageDispatcher(sysMessageHandlerFactory, inboundMessageReplyProcessor, mqttMessagePublisher); - ExtInboundMessageDispatcher extInboundMessageDispatcher = new ExtInboundMessageDispatcher(extMessageHandlerFactory, inboundMessageReplyProcessor, mqttMessagePublisher); - OtaInboundMessageDispatcher otaInboundMessageDispatcher = new OtaInboundMessageDispatcher(otaMessageHandlerFactory); - ShadowInboundMessageDispatcher shadowInboundMessageDispatcher = new ShadowInboundMessageDispatcher(deviceShadowManager, mqttMessagePublisher); - MqttInboundMessageDispatcher dispatcher = new MqttInboundMessageDispatcher(extInboundMessageDispatcher, otaInboundMessageDispatcher, shadowInboundMessageDispatcher, sysInboundMessageDispatcher); - log.trace("[ThingsBrain] |- Bean [Shadow Inbound Message Listener] Configure."); - return dispatcher; - } -} diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/config/MqttInboundMessageHandlerConfiguration.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/config/MqttInboundMessageHandlerConfiguration.java deleted file mode 100644 index a840355..0000000 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/config/MqttInboundMessageHandlerConfiguration.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright 2020-2030 码匠君 - * - * ThingsBrain licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * ThingsBrain 是 Dante Cloud 系统生态产品,采用 APACHE LICENSE 2.0 开源协议,您在使用过程中,需要注意以下几点: - * - * 1. 请不要删除和修改根目录下的LICENSE文件。 - * 2. 请不要删除和修改 ThingsBrain 源码头部的版权声明。 - * 3. 请保留源码和相关描述文件的项目出处,作者声明等。 - * 4. 分发源码时候,请注明软件出处 - * 5. 在修改包名,模块名称,项目代码等时,请注明软件出处 - * 6. 若您的项目无法满足以上几点,可申请商业授权 - */ - -package cn.herodotus.thingsbrain.mqtt.inbound.config; - -import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.ExtInboundMessageHandler; -import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.OtaInboundMessageHandler; -import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.SysInboundMessageHandler; -import cn.herodotus.thingsbrain.mqtt.inbound.factory.ExtMessageHandlerFactory; -import cn.herodotus.thingsbrain.mqtt.inbound.factory.OtaMessageHandlerFactory; -import cn.herodotus.thingsbrain.mqtt.inbound.factory.SysMessageHandlerFactory; -import jakarta.annotation.PostConstruct; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.annotation.Configuration; - -import java.util.Map; - -/** - *

Description: Mqtt 入站消息处理器配置

- * - * @author : gengwei_zheng - * @date : 2026/5/3 15:51 - */ -@Configuration(proxyBeanMethods = false) -@ComponentScan(basePackages = { - "cn.herodotus.thingsbrain.mqtt.inbound.handler", -}) -class MqttInboundMessageHandlerConfiguration { - - private static final Logger log = LoggerFactory.getLogger(MqttInboundMessageHandlerConfiguration.class); - - @PostConstruct - public void postConstruct() { - log.debug("[ThingsBrain] |- Module [Mqtt Message Handler] Configure."); - } - - @Bean - public SysMessageHandlerFactory sysMessageHandlerFactory(Map handlers) { - SysMessageHandlerFactory factory = new SysMessageHandlerFactory(handlers); - log.trace("[ThingsBrain] |- Bean [Sys Message Handler Factory] Configure."); - return factory; - } - - @Bean - public ExtMessageHandlerFactory extMessageHandlerFactory(Map handlers) { - ExtMessageHandlerFactory factory = new ExtMessageHandlerFactory(handlers); - log.trace("[ThingsBrain] |- Bean [Ext Message Handler Factory] Configure."); - return factory; - } - - @Bean - public OtaMessageHandlerFactory otaMessageHandlerFactory(Map handlers) { - OtaMessageHandlerFactory factory = new OtaMessageHandlerFactory(handlers); - log.trace("[ThingsBrain] |- Bean [Ota Message Handler Factory] Configure."); - return factory; - } - -} diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/dispatcher/AbstractReplyMessageDispatcher.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/dispatcher/AbstractReplyMessageDispatcher.java index fe77aea..56806df 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/dispatcher/AbstractReplyMessageDispatcher.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/dispatcher/AbstractReplyMessageDispatcher.java @@ -26,10 +26,10 @@ package cn.herodotus.thingsbrain.mqtt.inbound.definition.dispatcher; import cn.herodotus.thingsbrain.kernel.link.definition.LinkResponse; -import cn.herodotus.thingsbrain.mqtt.commons.definition.MqttMessagePublisher; +import cn.herodotus.thingsbrain.mqtt.commons.definition.MqttOutboundMessagePublisher; import cn.herodotus.thingsbrain.mqtt.commons.domain.MqttMessageDetails; import cn.herodotus.thingsbrain.mqtt.commons.domain.MqttOperation; -import cn.herodotus.thingsbrain.mqtt.inbound.response.InboundMessageReplyProcessor; +import cn.herodotus.thingsbrain.mqtt.inbound.processor.InboundResponseMessageProcessor; import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.StringUtils; @@ -41,12 +41,12 @@ import org.apache.commons.lang3.StringUtils; */ public abstract class AbstractReplyMessageDispatcher implements InboundMessageDispatcher { - private final InboundMessageReplyProcessor inboundMessageReplyProcessor; - private final MqttMessagePublisher mqttMessagePublisher; + private final InboundResponseMessageProcessor inboundResponseMessageProcessor; + private final MqttOutboundMessagePublisher mqttOutboundMessagePublisher; - protected AbstractReplyMessageDispatcher(InboundMessageReplyProcessor inboundMessageReplyProcessor, MqttMessagePublisher mqttMessagePublisher) { - this.inboundMessageReplyProcessor = inboundMessageReplyProcessor; - this.mqttMessagePublisher = mqttMessagePublisher; + protected AbstractReplyMessageDispatcher(InboundResponseMessageProcessor inboundResponseMessageProcessor, MqttOutboundMessagePublisher mqttOutboundMessagePublisher) { + this.inboundResponseMessageProcessor = inboundResponseMessageProcessor; + this.mqttOutboundMessagePublisher = mqttOutboundMessagePublisher; } @Override @@ -62,7 +62,7 @@ public abstract class AbstractReplyMessageDispatcher implements InboundMessageDi requestProcess(details); } else { // 下行数据的反馈响应 - mqttMessagePublisher.get(details) + mqttOutboundMessagePublisher.get(details) .ifPresent(operation -> responseProcess(operation, details)); } } @@ -81,7 +81,7 @@ public abstract class AbstractReplyMessageDispatcher implements InboundMessageDi * @param details details Mqtt 消息详情 {@link MqttMessageDetails} */ private void responseProcess(MqttOperation operation, MqttMessageDetails details) { - inboundMessageReplyProcessor.process(operation, details); + inboundResponseMessageProcessor.process(operation, details); } /** @@ -92,7 +92,7 @@ public abstract class AbstractReplyMessageDispatcher implements InboundMessageDi */ protected void response(MqttMessageDetails details, LinkResponse response) { if (ObjectUtils.isNotEmpty(response)) { - mqttMessagePublisher.response(details, response); + mqttOutboundMessagePublisher.response(details, response); } } } diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/dispatcher/ExtInboundMessageDispatcher.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/dispatcher/ExtInboundMessageDispatcher.java index 6cd54a7..11693c7 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/dispatcher/ExtInboundMessageDispatcher.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/dispatcher/ExtInboundMessageDispatcher.java @@ -26,12 +26,12 @@ package cn.herodotus.thingsbrain.mqtt.inbound.dispatcher; import cn.herodotus.thingsbrain.kernel.link.definition.LinkResponse; -import cn.herodotus.thingsbrain.mqtt.commons.definition.MqttMessagePublisher; +import cn.herodotus.thingsbrain.mqtt.commons.definition.MqttOutboundMessagePublisher; import cn.herodotus.thingsbrain.mqtt.commons.domain.MqttMessageDetails; import cn.herodotus.thingsbrain.mqtt.inbound.definition.dispatcher.AbstractReplyMessageDispatcher; import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.ExtInboundMessageHandler; import cn.herodotus.thingsbrain.mqtt.inbound.factory.ExtMessageHandlerFactory; -import cn.herodotus.thingsbrain.mqtt.inbound.response.InboundMessageReplyProcessor; +import cn.herodotus.thingsbrain.mqtt.inbound.processor.InboundResponseMessageProcessor; import java.util.Optional; @@ -53,8 +53,8 @@ public class ExtInboundMessageDispatcher extends AbstractReplyMessageDispatcher private final ExtMessageHandlerFactory extMessageHandlerFactory; - public ExtInboundMessageDispatcher(ExtMessageHandlerFactory extMessageHandlerFactory, InboundMessageReplyProcessor inboundMessageReplyProcessor, MqttMessagePublisher mqttMessagePublisher) { - super(inboundMessageReplyProcessor, mqttMessagePublisher); + public ExtInboundMessageDispatcher(ExtMessageHandlerFactory extMessageHandlerFactory, InboundResponseMessageProcessor inboundResponseMessageProcessor, MqttOutboundMessagePublisher mqttOutboundMessagePublisher) { + super(inboundResponseMessageProcessor, mqttOutboundMessagePublisher); this.extMessageHandlerFactory = extMessageHandlerFactory; } diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/dispatcher/ShadowInboundMessageDispatcher.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/dispatcher/ShadowInboundMessageDispatcher.java index 955a220..f5a355c 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/dispatcher/ShadowInboundMessageDispatcher.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/dispatcher/ShadowInboundMessageDispatcher.java @@ -33,7 +33,7 @@ import cn.herodotus.thingsbrain.kernel.commons.domain.Shadow; import cn.herodotus.thingsbrain.kernel.link.domain.shadow.ShadowRequest; import cn.herodotus.thingsbrain.kernel.link.domain.shadow.ShadowResponse; import cn.herodotus.thingsbrain.link.commons.definition.DeviceShadowManager; -import cn.herodotus.thingsbrain.mqtt.commons.definition.MqttMessagePublisher; +import cn.herodotus.thingsbrain.mqtt.commons.definition.MqttOutboundMessagePublisher; import cn.herodotus.thingsbrain.mqtt.commons.domain.MqttMessageDetails; import cn.herodotus.thingsbrain.mqtt.inbound.definition.dispatcher.InboundMessageDispatcher; import cn.herodotus.thingsbrain.persistence.commons.domain.DeviceShadow; @@ -61,11 +61,11 @@ public class ShadowInboundMessageDispatcher implements InboundMessageDispatcher public static final MqttTopic SHADOW_MQTT_TOPIC = new MqttTopic(SHADOW_UPDATE_TOPIC_TEMPLATE, SHADOW_GET_TOPIC_TEMPLATE); private final DeviceShadowManager deviceShadowManager; - private final MqttMessagePublisher mqttMessagePublisher; + private final MqttOutboundMessagePublisher mqttOutboundMessagePublisher; - public ShadowInboundMessageDispatcher(DeviceShadowManager deviceShadowManager, MqttMessagePublisher mqttMessagePublisher) { + public ShadowInboundMessageDispatcher(DeviceShadowManager deviceShadowManager, MqttOutboundMessagePublisher mqttOutboundMessagePublisher) { this.deviceShadowManager = deviceShadowManager; - this.mqttMessagePublisher = mqttMessagePublisher; + this.mqttOutboundMessagePublisher = mqttOutboundMessagePublisher; } @Override @@ -80,7 +80,7 @@ public class ShadowInboundMessageDispatcher implements InboundMessageDispatcher response = process(request.getMethod(), completeIdentifier.getProductKey(), completeIdentifier.getDeviceName(), request); } - mqttMessagePublisher.publish(SHADOW_MQTT_TOPIC.getReplyTopic(completeIdentifier.getProductKey(), completeIdentifier.getDeviceName()), JacksonUtils.toJson(response)); + mqttOutboundMessagePublisher.publish(SHADOW_MQTT_TOPIC.getReplyTopic(completeIdentifier.getProductKey(), completeIdentifier.getDeviceName()), JacksonUtils.toJson(response)); } private ShadowResponse process(String method, String productKey, String deviceName, ShadowRequest request) { diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/dispatcher/SysInboundMessageDispatcher.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/dispatcher/SysInboundMessageDispatcher.java index 283db79..0502a61 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/dispatcher/SysInboundMessageDispatcher.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/dispatcher/SysInboundMessageDispatcher.java @@ -26,12 +26,12 @@ package cn.herodotus.thingsbrain.mqtt.inbound.dispatcher; import cn.herodotus.thingsbrain.kernel.link.definition.LinkResponse; -import cn.herodotus.thingsbrain.mqtt.commons.definition.MqttMessagePublisher; +import cn.herodotus.thingsbrain.mqtt.commons.definition.MqttOutboundMessagePublisher; import cn.herodotus.thingsbrain.mqtt.commons.domain.MqttMessageDetails; import cn.herodotus.thingsbrain.mqtt.inbound.definition.dispatcher.AbstractReplyMessageDispatcher; import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.SysInboundMessageHandler; import cn.herodotus.thingsbrain.mqtt.inbound.factory.SysMessageHandlerFactory; -import cn.herodotus.thingsbrain.mqtt.inbound.response.InboundMessageReplyProcessor; +import cn.herodotus.thingsbrain.mqtt.inbound.processor.InboundResponseMessageProcessor; import java.util.Optional; @@ -45,8 +45,8 @@ public class SysInboundMessageDispatcher extends AbstractReplyMessageDispatcher private final SysMessageHandlerFactory sysMessageHandlerFactory; - public SysInboundMessageDispatcher(SysMessageHandlerFactory sysMessageHandlerFactory, InboundMessageReplyProcessor inboundMessageReplyProcessor, MqttMessagePublisher mqttMessagePublisher) { - super(inboundMessageReplyProcessor, mqttMessagePublisher); + public SysInboundMessageDispatcher(SysMessageHandlerFactory sysMessageHandlerFactory, InboundResponseMessageProcessor inboundResponseMessageProcessor, MqttOutboundMessagePublisher mqttOutboundMessagePublisher) { + super(inboundResponseMessageProcessor, mqttOutboundMessagePublisher); this.sysMessageHandlerFactory = sysMessageHandlerFactory; } diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/response/InboundMessageReplyProcessor.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/processor/InboundResponseMessageProcessor.java similarity index 93% rename from thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/response/InboundMessageReplyProcessor.java rename to thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/processor/InboundResponseMessageProcessor.java index d388602..c3bb3a5 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/response/InboundMessageReplyProcessor.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/processor/InboundResponseMessageProcessor.java @@ -23,7 +23,7 @@ * 6. 若您的项目无法满足以上几点,可申请商业授权 */ -package cn.herodotus.thingsbrain.mqtt.inbound.response; +package cn.herodotus.thingsbrain.mqtt.inbound.processor; import cn.herodotus.dante.core.jackson.JacksonUtils; import cn.herodotus.dante.message.commons.definition.strategy.MessageSendingEventManager; @@ -40,11 +40,11 @@ import org.apache.commons.lang3.StringUtils; * @author : gengwei.zheng * @date : 2025/10/18 23:19 */ -public class InboundMessageReplyProcessor { +public class InboundResponseMessageProcessor { private final MessageSendingEventManager messageSendingEventManager; - public InboundMessageReplyProcessor(MessageSendingEventManager messageSendingEventManager) { + public InboundResponseMessageProcessor(MessageSendingEventManager messageSendingEventManager) { this.messageSendingEventManager = messageSendingEventManager; } diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-outbound/src/main/java/cn/herodotus/thingsbrain/mqtt/outbound/listener/MqttRegistrationSuccessListener.java b/thingsbrain-mqtt/thingsbrain-mqtt-outbound/src/main/java/cn/herodotus/thingsbrain/mqtt/outbound/listener/MqttRegistrationSuccessListener.java index ab8b2a1..3d7078f 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-outbound/src/main/java/cn/herodotus/thingsbrain/mqtt/outbound/listener/MqttRegistrationSuccessListener.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-outbound/src/main/java/cn/herodotus/thingsbrain/mqtt/outbound/listener/MqttRegistrationSuccessListener.java @@ -27,7 +27,7 @@ package cn.herodotus.thingsbrain.mqtt.outbound.listener; import cn.herodotus.thingsbrain.kernel.commons.enums.AuthType; import cn.herodotus.thingsbrain.kernel.commons.event.MqttRegistrationResponseEvent; -import cn.herodotus.thingsbrain.mqtt.commons.definition.MqttMessagePublisher; +import cn.herodotus.thingsbrain.mqtt.commons.definition.MqttOutboundMessagePublisher; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.context.ApplicationListener; @@ -44,10 +44,10 @@ public class MqttRegistrationSuccessListener implements ApplicationListener param, UserPrincipal userPrincipal) { - mqttMessagePublisher.request(TOPIC_ADD_NOTIFY, productKey, deviceName, param, userPrincipal); + mqttOutboundMessagePublisher.request(TOPIC_ADD_NOTIFY, productKey, deviceName, param, userPrincipal); } /** @@ -72,6 +72,6 @@ public class SubsetTopoService { * @param param 配置信息 {@link TopoChange} */ public void change(String productKey, String deviceName, TopoChange param, UserPrincipal userPrincipal) { - mqttMessagePublisher.request(TOPIC_CHANGE, productKey, deviceName, param, userPrincipal); + mqttOutboundMessagePublisher.request(TOPIC_CHANGE, productKey, deviceName, param, userPrincipal); } } diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-outbound/src/main/java/cn/herodotus/thingsbrain/mqtt/outbound/service/TslServiceService.java b/thingsbrain-mqtt/thingsbrain-mqtt-outbound/src/main/java/cn/herodotus/thingsbrain/mqtt/outbound/service/TslServiceService.java index ac2fd1d..0d7f42c 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-outbound/src/main/java/cn/herodotus/thingsbrain/mqtt/outbound/service/TslServiceService.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-outbound/src/main/java/cn/herodotus/thingsbrain/mqtt/outbound/service/TslServiceService.java @@ -30,7 +30,7 @@ import cn.herodotus.thingsbrain.kernel.commons.constant.MethodConstants; import cn.herodotus.thingsbrain.kernel.commons.constant.ProtocolConstants; import cn.herodotus.thingsbrain.kernel.commons.domain.MqttTopic; import cn.herodotus.thingsbrain.link.commons.definition.SpecificationManager; -import cn.herodotus.thingsbrain.mqtt.commons.definition.MqttMessagePublisher; +import cn.herodotus.thingsbrain.mqtt.commons.definition.MqttOutboundMessagePublisher; import org.springframework.stereotype.Service; import java.util.Map; @@ -48,22 +48,22 @@ public class TslServiceService { private static final MqttTopic TOPIC_INVOKE = new MqttTopic(MethodConstants.METHOD__THING_SERVICE_IDENTIFIER, MqttTopic.Parameter.SERVICE); private final SpecificationManager specificationManager; - private final MqttMessagePublisher mqttMessagePublisher; + private final MqttOutboundMessagePublisher mqttOutboundMessagePublisher; - public TslServiceService(SpecificationManager specificationManager, MqttMessagePublisher mqttMessagePublisher) { + public TslServiceService(SpecificationManager specificationManager, MqttOutboundMessagePublisher mqttOutboundMessagePublisher) { this.specificationManager = specificationManager; - this.mqttMessagePublisher = mqttMessagePublisher; + this.mqttOutboundMessagePublisher = mqttOutboundMessagePublisher; } public void set(String productKey, String deviceName, Map params, UserPrincipal userPrincipal) { specificationManager.verification(productKey, ProtocolConstants.ACTION__SET, params); - mqttMessagePublisher.request(TOPIC_SET, productKey, deviceName, params, userPrincipal); + mqttOutboundMessagePublisher.request(TOPIC_SET, productKey, deviceName, params, userPrincipal); } public void invoke(String productKey, String deviceName, String identifier, Map params, UserPrincipal userPrincipal) { specificationManager.verification(productKey, identifier, params); - mqttMessagePublisher.request(TOPIC_INVOKE, productKey, deviceName, identifier, params, userPrincipal); + mqttOutboundMessagePublisher.request(TOPIC_INVOKE, productKey, deviceName, identifier, params, userPrincipal); } } -- Gitee From 7f15cb59114178ee69c6ecc67b8f7d25a82c09a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=81=E5=8C=A0=E5=90=9B?= Date: Wed, 1 Jul 2026 15:52:21 +0800 Subject: [PATCH 03/24] =?UTF-8?q?[=E4=BC=98=E5=8C=96]=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=91=BD=E5=90=8D=E5=8F=8A=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E5=86=85=E5=AE=B9=E6=A0=87=E8=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../config/MqttInboundConfiguration.java | 49 +++++++++---------- ...=> AbstractResponseMessageDispatcher.java} | 4 +- ... => AbstractInboundExtMessageHandler.java} | 6 +-- ... => AbstractInboundOtaMessageHandler.java} | 4 +- ...bstractInboundResponseMessageHandler.java} | 4 +- ... => AbstractInboundSysMessageHandler.java} | 6 +-- ...ler.java => InboundExtMessageHandler.java} | 2 +- ...ler.java => InboundOtaMessageHandler.java} | 2 +- ...ler.java => InboundSysMessageHandler.java} | 2 +- ....java => InboundExtMessageDispatcher.java} | 16 +++--- ....java => InboundOtaMessageDispatcher.java} | 12 ++--- ...va => InboundShadowMessageDispatcher.java} | 4 +- ....java => InboundSysMessageDispatcher.java} | 16 +++--- .../MqttInboundMessageDispatcher.java | 26 +++++----- ...a => InboundExtMessageHandlerFactory.java} | 6 +-- ...a => InboundOtaMessageHandlerFactory.java} | 6 +-- ...a => InboundSysMessageHandlerFactory.java} | 6 +-- ...ombineBatchLoginInboundMessageHandler.java | 4 +- ...mbineBatchLogoutInboundMessageHandler.java | 4 +- ...sionCombineLoginInboundMessageHandler.java | 4 +- ...ionCombineLogoutInboundMessageHandler.java | 4 +- .../OtaDeviceInformInboundMessageHandler.java | 4 +- ...taDeviceProgressInboundMessageHandler.java | 4 +- ...ysThingConfigGetInboundMessageHandler.java | 4 +- ...hingConfigLogGetInboundMessageHandler.java | 4 +- ...DeviceInfoDeleteInboundMessageHandler.java | 4 +- ...ingDeviceInfoGetInboundMessageHandler.java | 4 +- ...DeviceInfoUpdateInboundMessageHandler.java | 4 +- ...ventIdentityPostInboundMessageHandler.java | 4 +- ...ropertyBatchPostInboundMessageHandler.java | 4 +- ...pertyHistoryPostInboundMessageHandler.java | 4 +- ...PropertyPackPostInboundMessageHandler.java | 4 +- ...ventPropertyPostInboundMessageHandler.java | 4 +- .../SysThingJobGetInboundMessageHandler.java | 4 +- ...ysThingJobUpdateInboundMessageHandler.java | 4 +- .../SysThingLogPostInboundMessageHandler.java | 4 +- ...ngOtaFirmwareGetInboundMessageHandler.java | 4 +- .../SysThingTopoAddInboundMessageHandler.java | 4 +- ...sThingTopoDeleteInboundMessageHandler.java | 4 +- .../SysThingTopoGetInboundMessageHandler.java | 4 +- 40 files changed, 131 insertions(+), 132 deletions(-) rename thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/dispatcher/{AbstractReplyMessageDispatcher.java => AbstractResponseMessageDispatcher.java} (94%) rename thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/{AbstractExtInboundMessageHandler.java => AbstractInboundExtMessageHandler.java} (91%) rename thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/{AbstractOtaInboundMessageHandler.java => AbstractInboundOtaMessageHandler.java} (92%) rename thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/{AbstractReplyInboundMessageHandler.java => AbstractInboundResponseMessageHandler.java} (95%) rename thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/{AbstractSysInboundMessageHandler.java => AbstractInboundSysMessageHandler.java} (93%) rename thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/{ExtInboundMessageHandler.java => InboundExtMessageHandler.java} (97%) rename thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/{OtaInboundMessageHandler.java => InboundOtaMessageHandler.java} (97%) rename thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/{SysInboundMessageHandler.java => InboundSysMessageHandler.java} (97%) rename thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/dispatcher/{ExtInboundMessageDispatcher.java => InboundExtMessageDispatcher.java} (81%) rename thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/dispatcher/{OtaInboundMessageDispatcher.java => InboundOtaMessageDispatcher.java} (82%) rename thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/dispatcher/{ShadowInboundMessageDispatcher.java => InboundShadowMessageDispatcher.java} (98%) rename thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/dispatcher/{SysInboundMessageDispatcher.java => InboundSysMessageDispatcher.java} (76%) rename thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/factory/{ExtMessageHandlerFactory.java => InboundExtMessageHandlerFactory.java} (88%) rename thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/factory/{OtaMessageHandlerFactory.java => InboundOtaMessageHandlerFactory.java} (88%) rename thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/factory/{SysMessageHandlerFactory.java => InboundSysMessageHandlerFactory.java} (90%) diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/config/MqttInboundConfiguration.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/config/MqttInboundConfiguration.java index f8dc4fb..88a4d2a 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/config/MqttInboundConfiguration.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/config/MqttInboundConfiguration.java @@ -28,13 +28,13 @@ package cn.herodotus.thingsbrain.mqtt.inbound.config; import cn.herodotus.dante.message.commons.definition.strategy.MessageSendingEventManager; import cn.herodotus.thingsbrain.link.commons.definition.DeviceShadowManager; import cn.herodotus.thingsbrain.mqtt.commons.definition.MqttOutboundMessagePublisher; -import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.ExtInboundMessageHandler; -import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.OtaInboundMessageHandler; -import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.SysInboundMessageHandler; +import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.InboundExtMessageHandler; +import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.InboundOtaMessageHandler; +import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.InboundSysMessageHandler; import cn.herodotus.thingsbrain.mqtt.inbound.dispatcher.*; -import cn.herodotus.thingsbrain.mqtt.inbound.factory.ExtMessageHandlerFactory; -import cn.herodotus.thingsbrain.mqtt.inbound.factory.OtaMessageHandlerFactory; -import cn.herodotus.thingsbrain.mqtt.inbound.factory.SysMessageHandlerFactory; +import cn.herodotus.thingsbrain.mqtt.inbound.factory.InboundExtMessageHandlerFactory; +import cn.herodotus.thingsbrain.mqtt.inbound.factory.InboundOtaMessageHandlerFactory; +import cn.herodotus.thingsbrain.mqtt.inbound.factory.InboundSysMessageHandlerFactory; import cn.herodotus.thingsbrain.mqtt.inbound.processor.InboundResponseMessageProcessor; import jakarta.annotation.PostConstruct; import org.slf4j.Logger; @@ -42,7 +42,6 @@ import org.slf4j.LoggerFactory; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.Import; import java.util.Map; @@ -66,23 +65,23 @@ public class MqttInboundConfiguration { } @Bean - public SysMessageHandlerFactory sysMessageHandlerFactory(Map handlers) { - SysMessageHandlerFactory factory = new SysMessageHandlerFactory(handlers); - log.trace("[ThingsBrain] |- Bean [Sys Message Handler Factory] Configure."); + public InboundSysMessageHandlerFactory inboundSysMessageHandlerFactory(Map handlers) { + InboundSysMessageHandlerFactory factory = new InboundSysMessageHandlerFactory(handlers); + log.trace("[ThingsBrain] |- Bean [Inbound Sys Message Handler Factory] Configure."); return factory; } @Bean - public ExtMessageHandlerFactory extMessageHandlerFactory(Map handlers) { - ExtMessageHandlerFactory factory = new ExtMessageHandlerFactory(handlers); - log.trace("[ThingsBrain] |- Bean [Ext Message Handler Factory] Configure."); + public InboundExtMessageHandlerFactory inboundExtMessageHandlerFactory(Map handlers) { + InboundExtMessageHandlerFactory factory = new InboundExtMessageHandlerFactory(handlers); + log.trace("[ThingsBrain] |- Bean [Inbound Ext Message Handler Factory] Configure."); return factory; } @Bean - public OtaMessageHandlerFactory otaMessageHandlerFactory(Map handlers) { - OtaMessageHandlerFactory factory = new OtaMessageHandlerFactory(handlers); - log.trace("[ThingsBrain] |- Bean [Ota Message Handler Factory] Configure."); + public InboundOtaMessageHandlerFactory inboundOtaMessageHandlerFactory(Map handlers) { + InboundOtaMessageHandlerFactory factory = new InboundOtaMessageHandlerFactory(handlers); + log.trace("[ThingsBrain] |- Bean [Inbound Ota Message Handler Factory] Configure."); return factory; } @@ -95,19 +94,19 @@ public class MqttInboundConfiguration { @Bean public MqttInboundMessageDispatcher mqttInboundMessageDispatcher( - SysMessageHandlerFactory sysMessageHandlerFactory, - ExtMessageHandlerFactory extMessageHandlerFactory, - OtaMessageHandlerFactory otaMessageHandlerFactory, + InboundSysMessageHandlerFactory inboundSysMessageHandlerFactory, + InboundExtMessageHandlerFactory inboundExtMessageHandlerFactory, + InboundOtaMessageHandlerFactory inboundOtaMessageHandlerFactory, DeviceShadowManager deviceShadowManager, InboundResponseMessageProcessor inboundResponseMessageProcessor, MqttOutboundMessagePublisher mqttOutboundMessagePublisher) { - SysInboundMessageDispatcher sysInboundMessageDispatcher = new SysInboundMessageDispatcher(sysMessageHandlerFactory, inboundResponseMessageProcessor, mqttOutboundMessagePublisher); - ExtInboundMessageDispatcher extInboundMessageDispatcher = new ExtInboundMessageDispatcher(extMessageHandlerFactory, inboundResponseMessageProcessor, mqttOutboundMessagePublisher); - OtaInboundMessageDispatcher otaInboundMessageDispatcher = new OtaInboundMessageDispatcher(otaMessageHandlerFactory); - ShadowInboundMessageDispatcher shadowInboundMessageDispatcher = new ShadowInboundMessageDispatcher(deviceShadowManager, mqttOutboundMessagePublisher); - MqttInboundMessageDispatcher dispatcher = new MqttInboundMessageDispatcher(extInboundMessageDispatcher, otaInboundMessageDispatcher, shadowInboundMessageDispatcher, sysInboundMessageDispatcher); - log.trace("[ThingsBrain] |- Bean [Shadow Inbound Message Listener] Configure."); + InboundSysMessageDispatcher inboundSysMessageDispatcher = new InboundSysMessageDispatcher(inboundSysMessageHandlerFactory, inboundResponseMessageProcessor, mqttOutboundMessagePublisher); + InboundExtMessageDispatcher inboundExtMessageDispatcher = new InboundExtMessageDispatcher(inboundExtMessageHandlerFactory, inboundResponseMessageProcessor, mqttOutboundMessagePublisher); + InboundOtaMessageDispatcher inboundOtaMessageDispatcher = new InboundOtaMessageDispatcher(inboundOtaMessageHandlerFactory); + InboundShadowMessageDispatcher inboundShadowMessageDispatcher = new InboundShadowMessageDispatcher(deviceShadowManager, mqttOutboundMessagePublisher); + MqttInboundMessageDispatcher dispatcher = new MqttInboundMessageDispatcher(inboundExtMessageDispatcher, inboundOtaMessageDispatcher, inboundShadowMessageDispatcher, inboundSysMessageDispatcher); + log.trace("[ThingsBrain] |- Bean [Mqtt Inbound Message Dispatcher] Configure."); return dispatcher; } } diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/dispatcher/AbstractReplyMessageDispatcher.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/dispatcher/AbstractResponseMessageDispatcher.java similarity index 94% rename from thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/dispatcher/AbstractReplyMessageDispatcher.java rename to thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/dispatcher/AbstractResponseMessageDispatcher.java index 56806df..228c98c 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/dispatcher/AbstractReplyMessageDispatcher.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/dispatcher/AbstractResponseMessageDispatcher.java @@ -39,12 +39,12 @@ import org.apache.commons.lang3.StringUtils; * @author : gengwei.zheng * @date : 2025/10/20 14:38 */ -public abstract class AbstractReplyMessageDispatcher implements InboundMessageDispatcher { +public abstract class AbstractResponseMessageDispatcher implements InboundMessageDispatcher { private final InboundResponseMessageProcessor inboundResponseMessageProcessor; private final MqttOutboundMessagePublisher mqttOutboundMessagePublisher; - protected AbstractReplyMessageDispatcher(InboundResponseMessageProcessor inboundResponseMessageProcessor, MqttOutboundMessagePublisher mqttOutboundMessagePublisher) { + protected AbstractResponseMessageDispatcher(InboundResponseMessageProcessor inboundResponseMessageProcessor, MqttOutboundMessagePublisher mqttOutboundMessagePublisher) { this.inboundResponseMessageProcessor = inboundResponseMessageProcessor; this.mqttOutboundMessagePublisher = mqttOutboundMessagePublisher; } diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/AbstractExtInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/AbstractInboundExtMessageHandler.java similarity index 91% rename from thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/AbstractExtInboundMessageHandler.java rename to thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/AbstractInboundExtMessageHandler.java index 0370c7b..8088299 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/AbstractExtInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/AbstractInboundExtMessageHandler.java @@ -44,13 +44,13 @@ import org.slf4j.LoggerFactory; * @author : gengwei.zheng * @date : 2025/6/15 21:52 */ -public abstract class AbstractExtInboundMessageHandler extends AbstractReplyInboundMessageHandler> implements ExtInboundMessageHandler { +public abstract class AbstractInboundExtMessageHandler extends AbstractInboundResponseMessageHandler> implements InboundExtMessageHandler { - private static final Logger log = LoggerFactory.getLogger(AbstractExtInboundMessageHandler.class); + private static final Logger log = LoggerFactory.getLogger(AbstractInboundExtMessageHandler.class); private final SubsetSessionManager subsetSessionManager; - protected AbstractExtInboundMessageHandler(MqttTopic mqttTopic, SubsetSessionManager subsetSessionManager) { + protected AbstractInboundExtMessageHandler(MqttTopic mqttTopic, SubsetSessionManager subsetSessionManager) { super(mqttTopic); this.subsetSessionManager = subsetSessionManager; } diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/AbstractOtaInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/AbstractInboundOtaMessageHandler.java similarity index 92% rename from thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/AbstractOtaInboundMessageHandler.java rename to thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/AbstractInboundOtaMessageHandler.java index c023d7c..ae2601b 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/AbstractOtaInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/AbstractInboundOtaMessageHandler.java @@ -41,11 +41,11 @@ import java.util.function.BiConsumer; * @author : gengwei.zheng * @date : 2025/6/15 21:52 */ -public abstract class AbstractOtaInboundMessageHandler extends AbstractInboundMessageHandler> implements OtaInboundMessageHandler { +public abstract class AbstractInboundOtaMessageHandler extends AbstractInboundMessageHandler> implements InboundOtaMessageHandler { private final OtaManager otaManager; - protected AbstractOtaInboundMessageHandler(MqttTopic mqttTopic, OtaManager otaManager) { + protected AbstractInboundOtaMessageHandler(MqttTopic mqttTopic, OtaManager otaManager) { super(mqttTopic); this.otaManager = otaManager; } diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/AbstractReplyInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/AbstractInboundResponseMessageHandler.java similarity index 95% rename from thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/AbstractReplyInboundMessageHandler.java rename to thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/AbstractInboundResponseMessageHandler.java index 59d663d..ae665b6 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/AbstractReplyInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/AbstractInboundResponseMessageHandler.java @@ -41,9 +41,9 @@ import cn.herodotus.thingsbrain.kernel.link.definition.LinkResponse; * @author : gengwei.zheng * @date : 2025/10/20 21:45 */ -public abstract class AbstractReplyInboundMessageHandler extends AbstractInboundMessageHandler { +public abstract class AbstractInboundResponseMessageHandler extends AbstractInboundMessageHandler { - protected AbstractReplyInboundMessageHandler(MqttTopic mqttTopic) { + protected AbstractInboundResponseMessageHandler(MqttTopic mqttTopic) { super(mqttTopic); } diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/AbstractSysInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/AbstractInboundSysMessageHandler.java similarity index 93% rename from thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/AbstractSysInboundMessageHandler.java rename to thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/AbstractInboundSysMessageHandler.java index 87da5bf..59f0972 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/AbstractSysInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/AbstractInboundSysMessageHandler.java @@ -46,13 +46,13 @@ import org.slf4j.LoggerFactory; * @author : gengwei.zheng * @date : 2025/6/15 21:52 */ -public abstract class AbstractSysInboundMessageHandler extends AbstractReplyInboundMessageHandler> implements SysInboundMessageHandler { +public abstract class AbstractInboundSysMessageHandler extends AbstractInboundResponseMessageHandler> implements InboundSysMessageHandler { - private static final Logger log = LoggerFactory.getLogger(AbstractSysInboundMessageHandler.class); + private static final Logger log = LoggerFactory.getLogger(AbstractInboundSysMessageHandler.class); private final M messageManager; - protected AbstractSysInboundMessageHandler(MqttTopic mqttTopic, M messageManager) { + protected AbstractInboundSysMessageHandler(MqttTopic mqttTopic, M messageManager) { super(mqttTopic); this.messageManager = messageManager; } diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/ExtInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/InboundExtMessageHandler.java similarity index 97% rename from thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/ExtInboundMessageHandler.java rename to thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/InboundExtMessageHandler.java index 597133e..a554699 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/ExtInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/InboundExtMessageHandler.java @@ -38,7 +38,7 @@ import cn.herodotus.thingsbrain.mqtt.commons.domain.MqttMessageDetails; * @author : gengwei.zheng * @date : 2025/5/14 12:28 */ -public interface ExtInboundMessageHandler { +public interface InboundExtMessageHandler { /** * 接收信息 diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/OtaInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/InboundOtaMessageHandler.java similarity index 97% rename from thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/OtaInboundMessageHandler.java rename to thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/InboundOtaMessageHandler.java index c083b25..ff9ee1c 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/OtaInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/InboundOtaMessageHandler.java @@ -38,7 +38,7 @@ import cn.herodotus.thingsbrain.mqtt.commons.domain.MqttMessageDetails; * @author : gengwei.zheng * @date : 2025/5/14 12:28 */ -public interface OtaInboundMessageHandler { +public interface InboundOtaMessageHandler { /** * 接收信息 diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/SysInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/InboundSysMessageHandler.java similarity index 97% rename from thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/SysInboundMessageHandler.java rename to thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/InboundSysMessageHandler.java index 668e31c..bd196b7 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/SysInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/definition/handler/InboundSysMessageHandler.java @@ -34,7 +34,7 @@ import cn.herodotus.thingsbrain.mqtt.commons.domain.MqttMessageDetails; * @author : gengwei.zheng * @date : 2025/5/14 12:28 */ -public interface SysInboundMessageHandler { +public interface InboundSysMessageHandler { /** * 接收信息 diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/dispatcher/ExtInboundMessageDispatcher.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/dispatcher/InboundExtMessageDispatcher.java similarity index 81% rename from thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/dispatcher/ExtInboundMessageDispatcher.java rename to thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/dispatcher/InboundExtMessageDispatcher.java index 11693c7..477b679 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/dispatcher/ExtInboundMessageDispatcher.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/dispatcher/InboundExtMessageDispatcher.java @@ -28,9 +28,9 @@ package cn.herodotus.thingsbrain.mqtt.inbound.dispatcher; import cn.herodotus.thingsbrain.kernel.link.definition.LinkResponse; import cn.herodotus.thingsbrain.mqtt.commons.definition.MqttOutboundMessagePublisher; import cn.herodotus.thingsbrain.mqtt.commons.domain.MqttMessageDetails; -import cn.herodotus.thingsbrain.mqtt.inbound.definition.dispatcher.AbstractReplyMessageDispatcher; -import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.ExtInboundMessageHandler; -import cn.herodotus.thingsbrain.mqtt.inbound.factory.ExtMessageHandlerFactory; +import cn.herodotus.thingsbrain.mqtt.inbound.definition.dispatcher.AbstractResponseMessageDispatcher; +import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.InboundExtMessageHandler; +import cn.herodotus.thingsbrain.mqtt.inbound.factory.InboundExtMessageHandlerFactory; import cn.herodotus.thingsbrain.mqtt.inbound.processor.InboundResponseMessageProcessor; import java.util.Optional; @@ -49,18 +49,18 @@ import java.util.Optional; * @author : gengwei.zheng * @date : 2025/5/14 12:54 */ -public class ExtInboundMessageDispatcher extends AbstractReplyMessageDispatcher { +public class InboundExtMessageDispatcher extends AbstractResponseMessageDispatcher { - private final ExtMessageHandlerFactory extMessageHandlerFactory; + private final InboundExtMessageHandlerFactory inboundExtMessageHandlerFactory; - public ExtInboundMessageDispatcher(ExtMessageHandlerFactory extMessageHandlerFactory, InboundResponseMessageProcessor inboundResponseMessageProcessor, MqttOutboundMessagePublisher mqttOutboundMessagePublisher) { + public InboundExtMessageDispatcher(InboundExtMessageHandlerFactory inboundExtMessageHandlerFactory, InboundResponseMessageProcessor inboundResponseMessageProcessor, MqttOutboundMessagePublisher mqttOutboundMessagePublisher) { super(inboundResponseMessageProcessor, mqttOutboundMessagePublisher); - this.extMessageHandlerFactory = extMessageHandlerFactory; + this.inboundExtMessageHandlerFactory = inboundExtMessageHandlerFactory; } @Override protected void requestProcess(MqttMessageDetails details) { - Optional optional = extMessageHandlerFactory.getHandler(details.getMethod()); + Optional optional = inboundExtMessageHandlerFactory.getHandler(details.getMethod()); optional.ifPresentOrElse(handler -> { LinkResponse response = handler.receive(details); response(details, response); diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/dispatcher/OtaInboundMessageDispatcher.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/dispatcher/InboundOtaMessageDispatcher.java similarity index 82% rename from thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/dispatcher/OtaInboundMessageDispatcher.java rename to thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/dispatcher/InboundOtaMessageDispatcher.java index 2a065f1..1027e71 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/dispatcher/OtaInboundMessageDispatcher.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/dispatcher/InboundOtaMessageDispatcher.java @@ -27,7 +27,7 @@ package cn.herodotus.thingsbrain.mqtt.inbound.dispatcher; import cn.herodotus.thingsbrain.mqtt.commons.domain.MqttMessageDetails; import cn.herodotus.thingsbrain.mqtt.inbound.definition.dispatcher.InboundMessageDispatcher; -import cn.herodotus.thingsbrain.mqtt.inbound.factory.OtaMessageHandlerFactory; +import cn.herodotus.thingsbrain.mqtt.inbound.factory.InboundOtaMessageHandlerFactory; import org.apache.commons.lang3.StringUtils; /** @@ -36,13 +36,13 @@ import org.apache.commons.lang3.StringUtils; * @author : gengwei.zheng * @date : 2025/5/14 12:54 */ -public class OtaInboundMessageDispatcher implements InboundMessageDispatcher { +public class InboundOtaMessageDispatcher implements InboundMessageDispatcher { - private final OtaMessageHandlerFactory otaMessageHandlerFactory; + private final InboundOtaMessageHandlerFactory inboundOtaMessageHandlerFactory; - public OtaInboundMessageDispatcher(OtaMessageHandlerFactory otaMessageHandlerFactory) { - this.otaMessageHandlerFactory = otaMessageHandlerFactory; + public InboundOtaMessageDispatcher(InboundOtaMessageHandlerFactory inboundOtaMessageHandlerFactory) { + this.inboundOtaMessageHandlerFactory = inboundOtaMessageHandlerFactory; } @Override @@ -53,7 +53,7 @@ public class OtaInboundMessageDispatcher implements InboundMessageDispatcher { // 使用 JsonNode,先行将 JSON 进行解析。这里就可以直接获取必要属性,后面进入到 handler 再转换成具体对象。相当于只转换了一次 if (StringUtils.isNotBlank(details.getMethod())) { - otaMessageHandlerFactory.getHandler(details.getMethod()) + inboundOtaMessageHandlerFactory.getHandler(details.getMethod()) .ifPresent(handler -> handler.receive(details)); } } diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/dispatcher/ShadowInboundMessageDispatcher.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/dispatcher/InboundShadowMessageDispatcher.java similarity index 98% rename from thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/dispatcher/ShadowInboundMessageDispatcher.java rename to thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/dispatcher/InboundShadowMessageDispatcher.java index f5a355c..cec881d 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/dispatcher/ShadowInboundMessageDispatcher.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/dispatcher/InboundShadowMessageDispatcher.java @@ -52,7 +52,7 @@ import java.util.function.Function; * @author : gengwei.zheng * @date : 2025/5/14 12:54 */ -public class ShadowInboundMessageDispatcher implements InboundMessageDispatcher { +public class InboundShadowMessageDispatcher implements InboundMessageDispatcher { private static final List SUPPORTED_METHOD = List.of(MethodConstants.METHOD__SHADOW__UPDATE, MethodConstants.METHOD__SHADOW__DELETE, MethodConstants.METHOD__SHADOW__GET); private static final String SHADOW_UPDATE_TOPIC_TEMPLATE = "shadow/update/${productKey}/${deviceName}"; @@ -63,7 +63,7 @@ public class ShadowInboundMessageDispatcher implements InboundMessageDispatcher private final DeviceShadowManager deviceShadowManager; private final MqttOutboundMessagePublisher mqttOutboundMessagePublisher; - public ShadowInboundMessageDispatcher(DeviceShadowManager deviceShadowManager, MqttOutboundMessagePublisher mqttOutboundMessagePublisher) { + public InboundShadowMessageDispatcher(DeviceShadowManager deviceShadowManager, MqttOutboundMessagePublisher mqttOutboundMessagePublisher) { this.deviceShadowManager = deviceShadowManager; this.mqttOutboundMessagePublisher = mqttOutboundMessagePublisher; } diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/dispatcher/SysInboundMessageDispatcher.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/dispatcher/InboundSysMessageDispatcher.java similarity index 76% rename from thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/dispatcher/SysInboundMessageDispatcher.java rename to thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/dispatcher/InboundSysMessageDispatcher.java index 0502a61..3251747 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/dispatcher/SysInboundMessageDispatcher.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/dispatcher/InboundSysMessageDispatcher.java @@ -28,9 +28,9 @@ package cn.herodotus.thingsbrain.mqtt.inbound.dispatcher; import cn.herodotus.thingsbrain.kernel.link.definition.LinkResponse; import cn.herodotus.thingsbrain.mqtt.commons.definition.MqttOutboundMessagePublisher; import cn.herodotus.thingsbrain.mqtt.commons.domain.MqttMessageDetails; -import cn.herodotus.thingsbrain.mqtt.inbound.definition.dispatcher.AbstractReplyMessageDispatcher; -import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.SysInboundMessageHandler; -import cn.herodotus.thingsbrain.mqtt.inbound.factory.SysMessageHandlerFactory; +import cn.herodotus.thingsbrain.mqtt.inbound.definition.dispatcher.AbstractResponseMessageDispatcher; +import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.InboundSysMessageHandler; +import cn.herodotus.thingsbrain.mqtt.inbound.factory.InboundSysMessageHandlerFactory; import cn.herodotus.thingsbrain.mqtt.inbound.processor.InboundResponseMessageProcessor; import java.util.Optional; @@ -41,18 +41,18 @@ import java.util.Optional; * @author : gengwei.zheng * @date : 2025/5/14 12:54 */ -public class SysInboundMessageDispatcher extends AbstractReplyMessageDispatcher { +public class InboundSysMessageDispatcher extends AbstractResponseMessageDispatcher { - private final SysMessageHandlerFactory sysMessageHandlerFactory; + private final InboundSysMessageHandlerFactory inboundSysMessageHandlerFactory; - public SysInboundMessageDispatcher(SysMessageHandlerFactory sysMessageHandlerFactory, InboundResponseMessageProcessor inboundResponseMessageProcessor, MqttOutboundMessagePublisher mqttOutboundMessagePublisher) { + public InboundSysMessageDispatcher(InboundSysMessageHandlerFactory inboundSysMessageHandlerFactory, InboundResponseMessageProcessor inboundResponseMessageProcessor, MqttOutboundMessagePublisher mqttOutboundMessagePublisher) { super(inboundResponseMessageProcessor, mqttOutboundMessagePublisher); - this.sysMessageHandlerFactory = sysMessageHandlerFactory; + this.inboundSysMessageHandlerFactory = inboundSysMessageHandlerFactory; } @Override public void requestProcess(MqttMessageDetails details) { - Optional optional = sysMessageHandlerFactory.getHandler(details.getMethod()); + Optional optional = inboundSysMessageHandlerFactory.getHandler(details.getMethod()); optional.ifPresentOrElse( handler -> { LinkResponse response = handler.receive(details); diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/dispatcher/MqttInboundMessageDispatcher.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/dispatcher/MqttInboundMessageDispatcher.java index 2da0a42..6634518 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/dispatcher/MqttInboundMessageDispatcher.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/dispatcher/MqttInboundMessageDispatcher.java @@ -35,25 +35,25 @@ import cn.herodotus.thingsbrain.mqtt.commons.domain.MqttMessageDetails; */ public class MqttInboundMessageDispatcher { - private final ExtInboundMessageDispatcher extInboundMessageDispatcher; - private final OtaInboundMessageDispatcher otaInboundMessageDispatcher; - private final ShadowInboundMessageDispatcher shadowInboundMessageDispatcher; - private final SysInboundMessageDispatcher sysInboundMessageDispatcher; + private final InboundExtMessageDispatcher inboundExtMessageDispatcher; + private final InboundOtaMessageDispatcher inboundOtaMessageDispatcher; + private final InboundShadowMessageDispatcher inboundShadowMessageDispatcher; + private final InboundSysMessageDispatcher inboundSysMessageDispatcher; - public MqttInboundMessageDispatcher(ExtInboundMessageDispatcher extInboundMessageDispatcher, OtaInboundMessageDispatcher otaInboundMessageDispatcher, ShadowInboundMessageDispatcher shadowInboundMessageDispatcher, SysInboundMessageDispatcher sysInboundMessageDispatcher) { - this.extInboundMessageDispatcher = extInboundMessageDispatcher; - this.otaInboundMessageDispatcher = otaInboundMessageDispatcher; - this.shadowInboundMessageDispatcher = shadowInboundMessageDispatcher; - this.sysInboundMessageDispatcher = sysInboundMessageDispatcher; + public MqttInboundMessageDispatcher(InboundExtMessageDispatcher inboundExtMessageDispatcher, InboundOtaMessageDispatcher inboundOtaMessageDispatcher, InboundShadowMessageDispatcher inboundShadowMessageDispatcher, InboundSysMessageDispatcher inboundSysMessageDispatcher) { + this.inboundExtMessageDispatcher = inboundExtMessageDispatcher; + this.inboundOtaMessageDispatcher = inboundOtaMessageDispatcher; + this.inboundShadowMessageDispatcher = inboundShadowMessageDispatcher; + this.inboundSysMessageDispatcher = inboundSysMessageDispatcher; } public void process(MqttMessageDetails details) { switch (details.getTopicCategory()) { - case OTA -> otaInboundMessageDispatcher.process(details); - case EXT -> extInboundMessageDispatcher.process(details); - case SHADOW -> shadowInboundMessageDispatcher.process(details); - default -> sysInboundMessageDispatcher.process(details); + case OTA -> inboundOtaMessageDispatcher.process(details); + case EXT -> inboundExtMessageDispatcher.process(details); + case SHADOW -> inboundShadowMessageDispatcher.process(details); + default -> inboundSysMessageDispatcher.process(details); } } } diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/factory/ExtMessageHandlerFactory.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/factory/InboundExtMessageHandlerFactory.java similarity index 88% rename from thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/factory/ExtMessageHandlerFactory.java rename to thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/factory/InboundExtMessageHandlerFactory.java index 5d4a4de..61a5a80 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/factory/ExtMessageHandlerFactory.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/factory/InboundExtMessageHandlerFactory.java @@ -26,7 +26,7 @@ package cn.herodotus.thingsbrain.mqtt.inbound.factory; import cn.herodotus.dante.core.support.factory.AbstractStrategyFactory; -import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.ExtInboundMessageHandler; +import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.InboundExtMessageHandler; import org.springframework.stereotype.Component; import java.util.Map; @@ -38,9 +38,9 @@ import java.util.Map; * @date : 2025/6/22 0:17 */ @Component -public class ExtMessageHandlerFactory extends AbstractStrategyFactory { +public class InboundExtMessageHandlerFactory extends AbstractStrategyFactory { - public ExtMessageHandlerFactory(Map handlers) { + public InboundExtMessageHandlerFactory(Map handlers) { super(handlers); } } diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/factory/OtaMessageHandlerFactory.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/factory/InboundOtaMessageHandlerFactory.java similarity index 88% rename from thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/factory/OtaMessageHandlerFactory.java rename to thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/factory/InboundOtaMessageHandlerFactory.java index 487149e..404835e 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/factory/OtaMessageHandlerFactory.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/factory/InboundOtaMessageHandlerFactory.java @@ -26,7 +26,7 @@ package cn.herodotus.thingsbrain.mqtt.inbound.factory; import cn.herodotus.dante.core.support.factory.AbstractStrategyFactory; -import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.OtaInboundMessageHandler; +import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.InboundOtaMessageHandler; import java.util.Map; @@ -36,9 +36,9 @@ import java.util.Map; * @author : gengwei.zheng * @date : 2025/6/22 0:17 */ -public class OtaMessageHandlerFactory extends AbstractStrategyFactory { +public class InboundOtaMessageHandlerFactory extends AbstractStrategyFactory { - public OtaMessageHandlerFactory(Map handlers) { + public InboundOtaMessageHandlerFactory(Map handlers) { super(handlers); } } diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/factory/SysMessageHandlerFactory.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/factory/InboundSysMessageHandlerFactory.java similarity index 90% rename from thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/factory/SysMessageHandlerFactory.java rename to thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/factory/InboundSysMessageHandlerFactory.java index 187644a..9ff522c 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/factory/SysMessageHandlerFactory.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/factory/InboundSysMessageHandlerFactory.java @@ -27,7 +27,7 @@ package cn.herodotus.thingsbrain.mqtt.inbound.factory; import cn.herodotus.dante.core.constant.SymbolConstants; import cn.herodotus.dante.core.support.factory.AbstractStrategyFactory; -import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.SysInboundMessageHandler; +import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.InboundSysMessageHandler; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.Strings; import org.springframework.stereotype.Component; @@ -41,9 +41,9 @@ import java.util.Map; * @date : 2025/5/14 16:41 */ @Component -public class SysMessageHandlerFactory extends AbstractStrategyFactory { +public class InboundSysMessageHandlerFactory extends AbstractStrategyFactory { - public SysMessageHandlerFactory(Map handlers) { + public InboundSysMessageHandlerFactory(Map handlers) { super(handlers); } diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/ExtSessionCombineBatchLoginInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/ExtSessionCombineBatchLoginInboundMessageHandler.java index 9d943d7..d14409a 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/ExtSessionCombineBatchLoginInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/ExtSessionCombineBatchLoginInboundMessageHandler.java @@ -35,7 +35,7 @@ import cn.herodotus.thingsbrain.kernel.commons.exception.InboundMessageProcessin import cn.herodotus.thingsbrain.kernel.link.definition.LinkRequest; import cn.herodotus.thingsbrain.kernel.link.domain.session.BatchLogin; import cn.herodotus.thingsbrain.link.commons.definition.SubsetSessionManager; -import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.AbstractExtInboundMessageHandler; +import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.AbstractInboundExtMessageHandler; import org.springframework.stereotype.Component; import tools.jackson.core.type.TypeReference; @@ -50,7 +50,7 @@ import java.util.List; * @date : 2025/6/16 12:34 */ @Component(MethodConstants.METHOD__COMBINE_BATCH_LOGIN) -public class ExtSessionCombineBatchLoginInboundMessageHandler extends AbstractExtInboundMessageHandler> { +public class ExtSessionCombineBatchLoginInboundMessageHandler extends AbstractInboundExtMessageHandler> { private final TypeReference> typeReference = new TypeReference<>() { }; diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/ExtSessionCombineBatchLogoutInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/ExtSessionCombineBatchLogoutInboundMessageHandler.java index afb2dac..560ff66 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/ExtSessionCombineBatchLogoutInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/ExtSessionCombineBatchLogoutInboundMessageHandler.java @@ -34,7 +34,7 @@ import cn.herodotus.thingsbrain.kernel.commons.enums.TopicCategory; import cn.herodotus.thingsbrain.kernel.commons.exception.InboundMessageProcessingException; import cn.herodotus.thingsbrain.kernel.link.definition.LinkRequest; import cn.herodotus.thingsbrain.link.commons.definition.SubsetSessionManager; -import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.AbstractExtInboundMessageHandler; +import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.AbstractInboundExtMessageHandler; import org.springframework.stereotype.Component; import tools.jackson.core.type.TypeReference; @@ -49,7 +49,7 @@ import java.util.List; * @date : 2025/6/16 12:34 */ @Component(MethodConstants.METHOD__COMBINE_BATCH_LOGOUT) -public class ExtSessionCombineBatchLogoutInboundMessageHandler extends AbstractExtInboundMessageHandler, List> { +public class ExtSessionCombineBatchLogoutInboundMessageHandler extends AbstractInboundExtMessageHandler, List> { private final TypeReference>> typeReference = new TypeReference<>() { }; diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/ExtSessionCombineLoginInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/ExtSessionCombineLoginInboundMessageHandler.java index 4e7498a..b414d96 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/ExtSessionCombineLoginInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/ExtSessionCombineLoginInboundMessageHandler.java @@ -35,7 +35,7 @@ import cn.herodotus.thingsbrain.kernel.commons.exception.InboundMessageProcessin import cn.herodotus.thingsbrain.kernel.link.definition.LinkRequest; import cn.herodotus.thingsbrain.kernel.link.domain.session.Login; import cn.herodotus.thingsbrain.link.commons.definition.SubsetSessionManager; -import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.AbstractExtInboundMessageHandler; +import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.AbstractInboundExtMessageHandler; import org.springframework.stereotype.Component; import tools.jackson.core.type.TypeReference; @@ -48,7 +48,7 @@ import tools.jackson.core.type.TypeReference; * @date : 2025/6/16 12:33 */ @Component(MethodConstants.METHOD__COMBINE_LOGIN) -public class ExtSessionCombineLoginInboundMessageHandler extends AbstractExtInboundMessageHandler { +public class ExtSessionCombineLoginInboundMessageHandler extends AbstractInboundExtMessageHandler { private final TypeReference> typeReference = new TypeReference<>() { }; diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/ExtSessionCombineLogoutInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/ExtSessionCombineLogoutInboundMessageHandler.java index 4ee329d..dc41b9b 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/ExtSessionCombineLogoutInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/ExtSessionCombineLogoutInboundMessageHandler.java @@ -34,7 +34,7 @@ import cn.herodotus.thingsbrain.kernel.commons.enums.TopicCategory; import cn.herodotus.thingsbrain.kernel.commons.exception.InboundMessageProcessingException; import cn.herodotus.thingsbrain.kernel.link.definition.LinkRequest; import cn.herodotus.thingsbrain.link.commons.definition.SubsetSessionManager; -import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.AbstractExtInboundMessageHandler; +import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.AbstractInboundExtMessageHandler; import org.springframework.stereotype.Component; import tools.jackson.core.type.TypeReference; @@ -47,7 +47,7 @@ import tools.jackson.core.type.TypeReference; * @date : 2025/6/16 12:33 */ @Component(MethodConstants.METHOD__COMBINE_LOGOUT) -public class ExtSessionCombineLogoutInboundMessageHandler extends AbstractExtInboundMessageHandler { +public class ExtSessionCombineLogoutInboundMessageHandler extends AbstractInboundExtMessageHandler { private final TypeReference> typeReference = new TypeReference<>() { }; diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/OtaDeviceInformInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/OtaDeviceInformInboundMessageHandler.java index c20aba0..5329162 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/OtaDeviceInformInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/OtaDeviceInformInboundMessageHandler.java @@ -31,7 +31,7 @@ import cn.herodotus.thingsbrain.kernel.commons.domain.MqttTopic; import cn.herodotus.thingsbrain.kernel.link.definition.LinkRequest; import cn.herodotus.thingsbrain.kernel.link.domain.ota.DeviceInformParam; import cn.herodotus.thingsbrain.link.commons.definition.OtaManager; -import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.AbstractOtaInboundMessageHandler; +import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.AbstractInboundOtaMessageHandler; import org.springframework.stereotype.Component; import tools.jackson.core.type.TypeReference; @@ -44,7 +44,7 @@ import java.util.function.BiConsumer; * @date : 2025/6/16 12:16 */ @Component(MethodConstants.METHOD__OTA_DEVICE_INFORM) -public class OtaDeviceInformInboundMessageHandler extends AbstractOtaInboundMessageHandler { +public class OtaDeviceInformInboundMessageHandler extends AbstractInboundOtaMessageHandler { private final TypeReference> typeReference = new TypeReference<>() { }; diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/OtaDeviceProgressInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/OtaDeviceProgressInboundMessageHandler.java index b136a81..8a4b0d7 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/OtaDeviceProgressInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/OtaDeviceProgressInboundMessageHandler.java @@ -31,7 +31,7 @@ import cn.herodotus.thingsbrain.kernel.commons.domain.MqttTopic; import cn.herodotus.thingsbrain.kernel.link.definition.LinkRequest; import cn.herodotus.thingsbrain.kernel.link.domain.ota.DeviceProgressParam; import cn.herodotus.thingsbrain.link.commons.definition.OtaManager; -import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.AbstractOtaInboundMessageHandler; +import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.AbstractInboundOtaMessageHandler; import org.springframework.stereotype.Component; import tools.jackson.core.type.TypeReference; @@ -44,7 +44,7 @@ import java.util.function.BiConsumer; * @date : 2025/6/16 12:18 */ @Component(MethodConstants.METHOD__OTA_DEVICE_UPGRADE) -public class OtaDeviceProgressInboundMessageHandler extends AbstractOtaInboundMessageHandler { +public class OtaDeviceProgressInboundMessageHandler extends AbstractInboundOtaMessageHandler { private final TypeReference> typeReference = new TypeReference<>() { }; diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingConfigGetInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingConfigGetInboundMessageHandler.java index f52b45a..fa161fa 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingConfigGetInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingConfigGetInboundMessageHandler.java @@ -34,7 +34,7 @@ import cn.herodotus.thingsbrain.kernel.link.definition.LinkSysRequest; import cn.herodotus.thingsbrain.kernel.link.definition.config.FileConfig; import cn.herodotus.thingsbrain.kernel.link.domain.config.ConfigDomain; import cn.herodotus.thingsbrain.link.commons.definition.DeviceConfigManager; -import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.AbstractSysInboundMessageHandler; +import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.AbstractInboundSysMessageHandler; import org.springframework.stereotype.Component; import tools.jackson.core.type.TypeReference; @@ -45,7 +45,7 @@ import tools.jackson.core.type.TypeReference; * @date : 2025/6/16 12:19 */ @Component(MethodConstants.METHOD__THING_CONFIG_GET) -public class SysThingConfigGetInboundMessageHandler extends AbstractSysInboundMessageHandler { +public class SysThingConfigGetInboundMessageHandler extends AbstractInboundSysMessageHandler { private final TypeReference> typeReference = new TypeReference<>() { }; diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingConfigLogGetInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingConfigLogGetInboundMessageHandler.java index d845b19..12ce94c 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingConfigLogGetInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingConfigLogGetInboundMessageHandler.java @@ -34,7 +34,7 @@ import cn.herodotus.thingsbrain.kernel.link.definition.LinkSysRequest; import cn.herodotus.thingsbrain.kernel.link.definition.config.ContentConfig; import cn.herodotus.thingsbrain.kernel.link.domain.config.LogConfigDomain; import cn.herodotus.thingsbrain.link.commons.definition.DeviceConfigLogManager; -import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.AbstractSysInboundMessageHandler; +import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.AbstractInboundSysMessageHandler; import org.springframework.stereotype.Component; import tools.jackson.core.type.TypeReference; @@ -45,7 +45,7 @@ import tools.jackson.core.type.TypeReference; * @date : 2025/6/16 12:30 */ @Component(MethodConstants.METHOD__THING_CONFIG_LOG_GET) -public class SysThingConfigLogGetInboundMessageHandler extends AbstractSysInboundMessageHandler { +public class SysThingConfigLogGetInboundMessageHandler extends AbstractInboundSysMessageHandler { private final TypeReference> typeReference = new TypeReference<>() { }; diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingDeviceInfoDeleteInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingDeviceInfoDeleteInboundMessageHandler.java index e8ea900..45f8c23 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingDeviceInfoDeleteInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingDeviceInfoDeleteInboundMessageHandler.java @@ -33,7 +33,7 @@ import cn.herodotus.thingsbrain.kernel.commons.exception.InboundMessageProcessin import cn.herodotus.thingsbrain.kernel.link.definition.LinkSysRequest; import cn.herodotus.thingsbrain.kernel.link.domain.tag.AttributeKey; import cn.herodotus.thingsbrain.link.commons.definition.DeviceTagManager; -import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.AbstractSysInboundMessageHandler; +import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.AbstractInboundSysMessageHandler; import org.springframework.stereotype.Component; import tools.jackson.core.type.TypeReference; @@ -47,7 +47,7 @@ import java.util.Map; * @date : 2025/6/15 16:06 */ @Component(MethodConstants.METHOD__THING_DEVICEINFO_DELETE) -public class SysThingDeviceInfoDeleteInboundMessageHandler extends AbstractSysInboundMessageHandler, Map, DeviceTagManager> { +public class SysThingDeviceInfoDeleteInboundMessageHandler extends AbstractInboundSysMessageHandler, Map, DeviceTagManager> { private final TypeReference>> typeReference = new TypeReference<>() { }; diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingDeviceInfoGetInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingDeviceInfoGetInboundMessageHandler.java index 38dfa97..65ff191 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingDeviceInfoGetInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingDeviceInfoGetInboundMessageHandler.java @@ -33,7 +33,7 @@ import cn.herodotus.thingsbrain.kernel.commons.exception.InboundMessageProcessin import cn.herodotus.thingsbrain.kernel.link.definition.LinkSysRequest; import cn.herodotus.thingsbrain.kernel.link.domain.tag.TagGet; import cn.herodotus.thingsbrain.link.commons.definition.DeviceTagManager; -import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.AbstractSysInboundMessageHandler; +import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.AbstractInboundSysMessageHandler; import org.springframework.stereotype.Component; import tools.jackson.core.type.TypeReference; @@ -47,7 +47,7 @@ import java.util.Map; * @date : 2025/6/15 16:06 */ @Component(MethodConstants.METHOD__THING_DEVICEINFO_GET) -public class SysThingDeviceInfoGetInboundMessageHandler extends AbstractSysInboundMessageHandler>, DeviceTagManager> { +public class SysThingDeviceInfoGetInboundMessageHandler extends AbstractInboundSysMessageHandler>, DeviceTagManager> { private final TypeReference> typeReference = new TypeReference<>() { }; diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingDeviceInfoUpdateInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingDeviceInfoUpdateInboundMessageHandler.java index 4a864f3..6365ea0 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingDeviceInfoUpdateInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingDeviceInfoUpdateInboundMessageHandler.java @@ -33,7 +33,7 @@ import cn.herodotus.thingsbrain.kernel.commons.exception.InboundMessageProcessin import cn.herodotus.thingsbrain.kernel.link.definition.LinkSysRequest; import cn.herodotus.thingsbrain.kernel.link.domain.tag.Attribute; import cn.herodotus.thingsbrain.link.commons.definition.DeviceTagManager; -import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.AbstractSysInboundMessageHandler; +import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.AbstractInboundSysMessageHandler; import org.springframework.stereotype.Component; import tools.jackson.core.type.TypeReference; @@ -47,7 +47,7 @@ import java.util.Map; * @date : 2025/6/15 16:05 */ @Component(MethodConstants.METHOD__THING_DEVICEINFO_UPDATE) -public class SysThingDeviceInfoUpdateInboundMessageHandler extends AbstractSysInboundMessageHandler, Map, DeviceTagManager> { +public class SysThingDeviceInfoUpdateInboundMessageHandler extends AbstractInboundSysMessageHandler, Map, DeviceTagManager> { private final TypeReference>> typeReference = new TypeReference<>() { }; diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingEventIdentityPostInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingEventIdentityPostInboundMessageHandler.java index a0cafec..c6b1c36 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingEventIdentityPostInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingEventIdentityPostInboundMessageHandler.java @@ -33,7 +33,7 @@ import cn.herodotus.thingsbrain.kernel.commons.exception.InboundMessageProcessin import cn.herodotus.thingsbrain.kernel.link.definition.LinkSysRequest; import cn.herodotus.thingsbrain.kernel.link.domain.specification.EventIdentifierPost; import cn.herodotus.thingsbrain.link.commons.definition.SpecificationPostManager; -import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.AbstractSysInboundMessageHandler; +import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.AbstractInboundSysMessageHandler; import org.springframework.stereotype.Component; import tools.jackson.core.type.TypeReference; @@ -46,7 +46,7 @@ import java.util.Map; * @date : 2025/5/14 12:30 */ @Component(MethodConstants.METHOD__THING_EVENT_IDENTIFIER) -public class SysThingEventIdentityPostInboundMessageHandler extends AbstractSysInboundMessageHandler, SpecificationPostManager> { +public class SysThingEventIdentityPostInboundMessageHandler extends AbstractInboundSysMessageHandler, SpecificationPostManager> { private final TypeReference> typeReference = new TypeReference<>() { }; diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingEventPropertyBatchPostInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingEventPropertyBatchPostInboundMessageHandler.java index 9dbeb60..d71daad 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingEventPropertyBatchPostInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingEventPropertyBatchPostInboundMessageHandler.java @@ -33,7 +33,7 @@ import cn.herodotus.thingsbrain.kernel.commons.exception.InboundMessageProcessin import cn.herodotus.thingsbrain.kernel.link.definition.LinkSysRequest; import cn.herodotus.thingsbrain.kernel.link.domain.specification.EventPropertyBatchPost; import cn.herodotus.thingsbrain.link.commons.definition.SpecificationPostManager; -import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.AbstractSysInboundMessageHandler; +import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.AbstractInboundSysMessageHandler; import org.springframework.stereotype.Component; import tools.jackson.core.type.TypeReference; @@ -46,7 +46,7 @@ import java.util.Map; * @date : 2025/5/14 12:30 */ @Component(MethodConstants.METHOD__THING_EVENT_PROPERTY_BATCH_POST) -public class SysThingEventPropertyBatchPostInboundMessageHandler extends AbstractSysInboundMessageHandler, SpecificationPostManager> { +public class SysThingEventPropertyBatchPostInboundMessageHandler extends AbstractInboundSysMessageHandler, SpecificationPostManager> { private final TypeReference> typeReference = new TypeReference<>() { }; diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingEventPropertyHistoryPostInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingEventPropertyHistoryPostInboundMessageHandler.java index 0a5e38f..95a5134 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingEventPropertyHistoryPostInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingEventPropertyHistoryPostInboundMessageHandler.java @@ -33,7 +33,7 @@ import cn.herodotus.thingsbrain.kernel.commons.exception.InboundMessageProcessin import cn.herodotus.thingsbrain.kernel.link.definition.LinkSysRequest; import cn.herodotus.thingsbrain.kernel.link.domain.specification.EventPropertyHistoryPost; import cn.herodotus.thingsbrain.link.commons.definition.SpecificationPostManager; -import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.AbstractSysInboundMessageHandler; +import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.AbstractInboundSysMessageHandler; import org.springframework.stereotype.Component; import tools.jackson.core.type.TypeReference; @@ -46,7 +46,7 @@ import java.util.Map; * @date : 2025/5/14 12:30 */ @Component(MethodConstants.METHOD__THING_EVENT_PROPERTY_HISTORY_POST) -public class SysThingEventPropertyHistoryPostInboundMessageHandler extends AbstractSysInboundMessageHandler, SpecificationPostManager> { +public class SysThingEventPropertyHistoryPostInboundMessageHandler extends AbstractInboundSysMessageHandler, SpecificationPostManager> { private final TypeReference> typeReference = new TypeReference<>() { }; diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingEventPropertyPackPostInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingEventPropertyPackPostInboundMessageHandler.java index 9a1c838..524e138 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingEventPropertyPackPostInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingEventPropertyPackPostInboundMessageHandler.java @@ -33,7 +33,7 @@ import cn.herodotus.thingsbrain.kernel.commons.exception.InboundMessageProcessin import cn.herodotus.thingsbrain.kernel.link.definition.LinkSysRequest; import cn.herodotus.thingsbrain.kernel.link.domain.specification.EventPropertyPackPost; import cn.herodotus.thingsbrain.link.commons.definition.SpecificationPostManager; -import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.AbstractSysInboundMessageHandler; +import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.AbstractInboundSysMessageHandler; import org.springframework.stereotype.Component; import tools.jackson.core.type.TypeReference; @@ -46,7 +46,7 @@ import java.util.Map; * @date : 2025/5/14 12:30 */ @Component(MethodConstants.METHOD__THING_EVENT_PROPERTY_PACK_POST) -public class SysThingEventPropertyPackPostInboundMessageHandler extends AbstractSysInboundMessageHandler, SpecificationPostManager> { +public class SysThingEventPropertyPackPostInboundMessageHandler extends AbstractInboundSysMessageHandler, SpecificationPostManager> { private final TypeReference> typeReference = new TypeReference<>() { }; diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingEventPropertyPostInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingEventPropertyPostInboundMessageHandler.java index 5372ee2..19c0a59 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingEventPropertyPostInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingEventPropertyPostInboundMessageHandler.java @@ -33,7 +33,7 @@ import cn.herodotus.thingsbrain.kernel.commons.exception.InboundMessageProcessin import cn.herodotus.thingsbrain.kernel.link.definition.LinkSysRequest; import cn.herodotus.thingsbrain.kernel.link.domain.specification.EventPropertyPost; import cn.herodotus.thingsbrain.link.commons.definition.SpecificationPostManager; -import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.AbstractSysInboundMessageHandler; +import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.AbstractInboundSysMessageHandler; import org.springframework.stereotype.Component; import tools.jackson.core.type.TypeReference; @@ -46,7 +46,7 @@ import java.util.Map; * @date : 2025/5/14 12:30 */ @Component(MethodConstants.METHOD__THING_EVENT_PROPERTY_POST) -public class SysThingEventPropertyPostInboundMessageHandler extends AbstractSysInboundMessageHandler, SpecificationPostManager> { +public class SysThingEventPropertyPostInboundMessageHandler extends AbstractInboundSysMessageHandler, SpecificationPostManager> { private final TypeReference> typeReference = new TypeReference<>() { }; diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingJobGetInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingJobGetInboundMessageHandler.java index ffb977e..dfdf5bc 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingJobGetInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingJobGetInboundMessageHandler.java @@ -34,7 +34,7 @@ import cn.herodotus.thingsbrain.kernel.link.definition.LinkSysRequest; import cn.herodotus.thingsbrain.kernel.link.domain.job.Job; import cn.herodotus.thingsbrain.kernel.link.domain.job.TaskDetail; import cn.herodotus.thingsbrain.link.commons.definition.DeviceJobManager; -import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.AbstractSysInboundMessageHandler; +import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.AbstractInboundSysMessageHandler; import org.springframework.stereotype.Component; import tools.jackson.core.type.TypeReference; @@ -45,7 +45,7 @@ import tools.jackson.core.type.TypeReference; * @date : 2025/6/16 12:22 */ @Component(MethodConstants.METHOD__THING_JOB_GET) -public class SysThingJobGetInboundMessageHandler extends AbstractSysInboundMessageHandler { +public class SysThingJobGetInboundMessageHandler extends AbstractInboundSysMessageHandler { private final TypeReference> typeReference = new TypeReference<>() { }; diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingJobUpdateInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingJobUpdateInboundMessageHandler.java index 9048d65..de2118a 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingJobUpdateInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingJobUpdateInboundMessageHandler.java @@ -34,7 +34,7 @@ import cn.herodotus.thingsbrain.kernel.link.definition.LinkSysRequest; import cn.herodotus.thingsbrain.kernel.link.domain.job.Job; import cn.herodotus.thingsbrain.kernel.link.domain.job.JobUpdate; import cn.herodotus.thingsbrain.link.commons.definition.DeviceJobManager; -import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.AbstractSysInboundMessageHandler; +import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.AbstractInboundSysMessageHandler; import org.springframework.stereotype.Component; import tools.jackson.core.type.TypeReference; @@ -45,7 +45,7 @@ import tools.jackson.core.type.TypeReference; * @date : 2025/6/16 12:22 */ @Component(MethodConstants.METHOD__THING_JOB_UPDATE) -public class SysThingJobUpdateInboundMessageHandler extends AbstractSysInboundMessageHandler { +public class SysThingJobUpdateInboundMessageHandler extends AbstractInboundSysMessageHandler { private final TypeReference> typeReference = new TypeReference<>() { }; diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingLogPostInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingLogPostInboundMessageHandler.java index d439a8c..1cf0582 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingLogPostInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingLogPostInboundMessageHandler.java @@ -33,7 +33,7 @@ import cn.herodotus.thingsbrain.kernel.commons.exception.InboundMessageProcessin import cn.herodotus.thingsbrain.kernel.link.definition.LinkSysRequest; import cn.herodotus.thingsbrain.kernel.link.domain.config.LogParam; import cn.herodotus.thingsbrain.link.commons.definition.DeviceConfigLogManager; -import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.AbstractSysInboundMessageHandler; +import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.AbstractInboundSysMessageHandler; import org.springframework.stereotype.Component; import tools.jackson.core.type.TypeReference; @@ -47,7 +47,7 @@ import java.util.Map; * @date : 2025/6/16 12:31 */ @Component(MethodConstants.METHOD__THING_LOG_POST) -public class SysThingLogPostInboundMessageHandler extends AbstractSysInboundMessageHandler, Map, DeviceConfigLogManager> { +public class SysThingLogPostInboundMessageHandler extends AbstractInboundSysMessageHandler, Map, DeviceConfigLogManager> { private final TypeReference>> typeReference = new TypeReference<>() { }; diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingOtaFirmwareGetInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingOtaFirmwareGetInboundMessageHandler.java index a337d78..adb6cce 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingOtaFirmwareGetInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingOtaFirmwareGetInboundMessageHandler.java @@ -34,7 +34,7 @@ import cn.herodotus.thingsbrain.kernel.link.definition.DeviceModule; import cn.herodotus.thingsbrain.kernel.link.definition.LinkSysRequest; import cn.herodotus.thingsbrain.kernel.link.domain.ota.HttpProtocolDomain; import cn.herodotus.thingsbrain.link.commons.definition.OtaManager; -import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.AbstractSysInboundMessageHandler; +import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.AbstractInboundSysMessageHandler; import org.springframework.stereotype.Component; import tools.jackson.core.type.TypeReference; @@ -45,7 +45,7 @@ import tools.jackson.core.type.TypeReference; * @date : 2025/6/16 12:14 */ @Component(MethodConstants.METHOD__OTA_FIRMWARE_GET) -public class SysThingOtaFirmwareGetInboundMessageHandler extends AbstractSysInboundMessageHandler { +public class SysThingOtaFirmwareGetInboundMessageHandler extends AbstractInboundSysMessageHandler { private final TypeReference> typeReference = new TypeReference<>() { }; diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingTopoAddInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingTopoAddInboundMessageHandler.java index 4a32571..e672fd6 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingTopoAddInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingTopoAddInboundMessageHandler.java @@ -34,7 +34,7 @@ import cn.herodotus.thingsbrain.kernel.commons.exception.InboundMessageProcessin import cn.herodotus.thingsbrain.kernel.link.definition.LinkSysRequest; import cn.herodotus.thingsbrain.kernel.link.definition.Signature; import cn.herodotus.thingsbrain.link.commons.definition.SubsetTopoManager; -import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.AbstractSysInboundMessageHandler; +import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.AbstractInboundSysMessageHandler; import org.springframework.stereotype.Component; import tools.jackson.core.type.TypeReference; @@ -49,7 +49,7 @@ import java.util.List; * @date : 2025/6/16 12:35 */ @Component(MethodConstants.METHOD__THING_TOPO_ADD) -public class SysThingTopoAddInboundMessageHandler extends AbstractSysInboundMessageHandler, List, SubsetTopoManager> { +public class SysThingTopoAddInboundMessageHandler extends AbstractInboundSysMessageHandler, List, SubsetTopoManager> { private final TypeReference>> typeReference = new TypeReference<>() { }; diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingTopoDeleteInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingTopoDeleteInboundMessageHandler.java index 190b481..19d4b4f 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingTopoDeleteInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingTopoDeleteInboundMessageHandler.java @@ -33,7 +33,7 @@ import cn.herodotus.thingsbrain.kernel.commons.domain.MqttTopic; import cn.herodotus.thingsbrain.kernel.commons.exception.InboundMessageProcessingException; import cn.herodotus.thingsbrain.kernel.link.definition.LinkSysRequest; import cn.herodotus.thingsbrain.link.commons.definition.SubsetTopoManager; -import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.AbstractSysInboundMessageHandler; +import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.AbstractInboundSysMessageHandler; import org.springframework.stereotype.Component; import tools.jackson.core.type.TypeReference; @@ -46,7 +46,7 @@ import java.util.List; * @date : 2025/6/16 12:35 */ @Component(MethodConstants.METHOD__THING_TOPO_DELETE) -public class SysThingTopoDeleteInboundMessageHandler extends AbstractSysInboundMessageHandler, List, SubsetTopoManager> { +public class SysThingTopoDeleteInboundMessageHandler extends AbstractInboundSysMessageHandler, List, SubsetTopoManager> { private final TypeReference>> typeReference = new TypeReference<>() { }; diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingTopoGetInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingTopoGetInboundMessageHandler.java index 4db52f6..e954463 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingTopoGetInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingTopoGetInboundMessageHandler.java @@ -33,7 +33,7 @@ import cn.herodotus.thingsbrain.kernel.commons.domain.MqttTopic; import cn.herodotus.thingsbrain.kernel.commons.exception.InboundMessageProcessingException; import cn.herodotus.thingsbrain.kernel.link.definition.LinkSysRequest; import cn.herodotus.thingsbrain.link.commons.definition.SubsetTopoManager; -import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.AbstractSysInboundMessageHandler; +import cn.herodotus.thingsbrain.mqtt.inbound.definition.handler.AbstractInboundSysMessageHandler; import org.springframework.stereotype.Component; import tools.jackson.core.type.TypeReference; @@ -49,7 +49,7 @@ import java.util.Map; * @date : 2025/6/16 12:35 */ @Component(MethodConstants.METHOD__THING_TOPO_GET) -public class SysThingTopoGetInboundMessageHandler extends AbstractSysInboundMessageHandler, List, SubsetTopoManager> { +public class SysThingTopoGetInboundMessageHandler extends AbstractInboundSysMessageHandler, List, SubsetTopoManager> { private final TypeReference>> typeReference = new TypeReference<>() { }; -- Gitee From 7b51621b860a2f154de867526b432aefccfb3d14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=81=E5=8C=A0=E5=90=9B?= Date: Wed, 1 Jul 2026 18:07:40 +0800 Subject: [PATCH 04/24] =?UTF-8?q?[=E4=BC=98=E5=8C=96]=20=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=91=BD=E5=90=8D=E5=8F=8A=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E5=86=85=E5=AE=B9=E6=A0=87=E8=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...er.java => ExtSessionCombineBatchLoginMessageHandler.java} | 4 ++-- ...r.java => ExtSessionCombineBatchLogoutMessageHandler.java} | 4 ++-- ...Handler.java => ExtSessionCombineLoginMessageHandler.java} | 4 ++-- ...andler.java => ExtSessionCombineLogoutMessageHandler.java} | 4 ++-- ...MessageHandler.java => OtaDeviceInformMessageHandler.java} | 4 ++-- ...ssageHandler.java => OtaDeviceProgressMessageHandler.java} | 4 ++-- ...ssageHandler.java => SysThingConfigGetMessageHandler.java} | 4 ++-- ...geHandler.java => SysThingConfigLogGetMessageHandler.java} | 4 ++-- ...ndler.java => SysThingDeviceInfoDeleteMessageHandler.java} | 4 ++-- ...eHandler.java => SysThingDeviceInfoGetMessageHandler.java} | 4 ++-- ...ndler.java => SysThingDeviceInfoUpdateMessageHandler.java} | 4 ++-- ...dler.java => SysThingEventIdentityPostMessageHandler.java} | 4 ++-- ...java => SysThingEventPropertyBatchPostMessageHandler.java} | 4 ++-- ...va => SysThingEventPropertyHistoryPostMessageHandler.java} | 4 ++-- ....java => SysThingEventPropertyPackPostMessageHandler.java} | 4 ++-- ...dler.java => SysThingEventPropertyPostMessageHandler.java} | 4 ++-- ...dMessageHandler.java => SysThingJobGetMessageHandler.java} | 4 ++-- ...ssageHandler.java => SysThingJobUpdateMessageHandler.java} | 4 ++-- ...MessageHandler.java => SysThingLogPostMessageHandler.java} | 4 ++-- ...Handler.java => SysThingOtaFirmwareGetMessageHandler.java} | 4 ++-- ...MessageHandler.java => SysThingTopoAddMessageHandler.java} | 4 ++-- ...sageHandler.java => SysThingTopoDeleteMessageHandler.java} | 4 ++-- ...MessageHandler.java => SysThingTopoGetMessageHandler.java} | 4 ++-- 23 files changed, 46 insertions(+), 46 deletions(-) rename thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/{ExtSessionCombineBatchLoginInboundMessageHandler.java => ExtSessionCombineBatchLoginMessageHandler.java} (93%) rename thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/{ExtSessionCombineBatchLogoutInboundMessageHandler.java => ExtSessionCombineBatchLogoutMessageHandler.java} (92%) rename thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/{ExtSessionCombineLoginInboundMessageHandler.java => ExtSessionCombineLoginMessageHandler.java} (93%) rename thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/{ExtSessionCombineLogoutInboundMessageHandler.java => ExtSessionCombineLogoutMessageHandler.java} (93%) rename thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/{OtaDeviceInformInboundMessageHandler.java => OtaDeviceInformMessageHandler.java} (93%) rename thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/{OtaDeviceProgressInboundMessageHandler.java => OtaDeviceProgressMessageHandler.java} (93%) rename thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/{SysThingConfigGetInboundMessageHandler.java => SysThingConfigGetMessageHandler.java} (92%) rename thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/{SysThingConfigLogGetInboundMessageHandler.java => SysThingConfigLogGetMessageHandler.java} (92%) rename thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/{SysThingDeviceInfoDeleteInboundMessageHandler.java => SysThingDeviceInfoDeleteMessageHandler.java} (92%) rename thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/{SysThingDeviceInfoGetInboundMessageHandler.java => SysThingDeviceInfoGetMessageHandler.java} (92%) rename thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/{SysThingDeviceInfoUpdateInboundMessageHandler.java => SysThingDeviceInfoUpdateMessageHandler.java} (92%) rename thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/{SysThingEventIdentityPostInboundMessageHandler.java => SysThingEventIdentityPostMessageHandler.java} (91%) rename thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/{SysThingEventPropertyBatchPostInboundMessageHandler.java => SysThingEventPropertyBatchPostMessageHandler.java} (91%) rename thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/{SysThingEventPropertyHistoryPostInboundMessageHandler.java => SysThingEventPropertyHistoryPostMessageHandler.java} (91%) rename thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/{SysThingEventPropertyPackPostInboundMessageHandler.java => SysThingEventPropertyPackPostMessageHandler.java} (91%) rename thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/{SysThingEventPropertyPostInboundMessageHandler.java => SysThingEventPropertyPostMessageHandler.java} (91%) rename thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/{SysThingJobGetInboundMessageHandler.java => SysThingJobGetMessageHandler.java} (93%) rename thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/{SysThingJobUpdateInboundMessageHandler.java => SysThingJobUpdateMessageHandler.java} (93%) rename thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/{SysThingLogPostInboundMessageHandler.java => SysThingLogPostMessageHandler.java} (92%) rename thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/{SysThingOtaFirmwareGetInboundMessageHandler.java => SysThingOtaFirmwareGetMessageHandler.java} (92%) rename thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/{SysThingTopoAddInboundMessageHandler.java => SysThingTopoAddMessageHandler.java} (93%) rename thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/{SysThingTopoDeleteInboundMessageHandler.java => SysThingTopoDeleteMessageHandler.java} (92%) rename thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/{SysThingTopoGetInboundMessageHandler.java => SysThingTopoGetMessageHandler.java} (92%) diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/ExtSessionCombineBatchLoginInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/ExtSessionCombineBatchLoginMessageHandler.java similarity index 93% rename from thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/ExtSessionCombineBatchLoginInboundMessageHandler.java rename to thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/ExtSessionCombineBatchLoginMessageHandler.java index d14409a..304664c 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/ExtSessionCombineBatchLoginInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/ExtSessionCombineBatchLoginMessageHandler.java @@ -50,12 +50,12 @@ import java.util.List; * @date : 2025/6/16 12:34 */ @Component(MethodConstants.METHOD__COMBINE_BATCH_LOGIN) -public class ExtSessionCombineBatchLoginInboundMessageHandler extends AbstractInboundExtMessageHandler> { +public class ExtSessionCombineBatchLoginMessageHandler extends AbstractInboundExtMessageHandler> { private final TypeReference> typeReference = new TypeReference<>() { }; - public ExtSessionCombineBatchLoginInboundMessageHandler(SubsetSessionManager subsetSessionManager) { + public ExtSessionCombineBatchLoginMessageHandler(SubsetSessionManager subsetSessionManager) { super(new MqttTopic(TopicCategory.EXT, MethodConstants.METHOD__COMBINE_BATCH_LOGIN), subsetSessionManager); } diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/ExtSessionCombineBatchLogoutInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/ExtSessionCombineBatchLogoutMessageHandler.java similarity index 92% rename from thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/ExtSessionCombineBatchLogoutInboundMessageHandler.java rename to thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/ExtSessionCombineBatchLogoutMessageHandler.java index 560ff66..1745e64 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/ExtSessionCombineBatchLogoutInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/ExtSessionCombineBatchLogoutMessageHandler.java @@ -49,12 +49,12 @@ import java.util.List; * @date : 2025/6/16 12:34 */ @Component(MethodConstants.METHOD__COMBINE_BATCH_LOGOUT) -public class ExtSessionCombineBatchLogoutInboundMessageHandler extends AbstractInboundExtMessageHandler, List> { +public class ExtSessionCombineBatchLogoutMessageHandler extends AbstractInboundExtMessageHandler, List> { private final TypeReference>> typeReference = new TypeReference<>() { }; - public ExtSessionCombineBatchLogoutInboundMessageHandler(SubsetSessionManager subsetSessionManager) { + public ExtSessionCombineBatchLogoutMessageHandler(SubsetSessionManager subsetSessionManager) { super(new MqttTopic(TopicCategory.EXT, MethodConstants.METHOD__COMBINE_BATCH_LOGOUT), subsetSessionManager); } diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/ExtSessionCombineLoginInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/ExtSessionCombineLoginMessageHandler.java similarity index 93% rename from thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/ExtSessionCombineLoginInboundMessageHandler.java rename to thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/ExtSessionCombineLoginMessageHandler.java index b414d96..1aa06ea 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/ExtSessionCombineLoginInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/ExtSessionCombineLoginMessageHandler.java @@ -48,12 +48,12 @@ import tools.jackson.core.type.TypeReference; * @date : 2025/6/16 12:33 */ @Component(MethodConstants.METHOD__COMBINE_LOGIN) -public class ExtSessionCombineLoginInboundMessageHandler extends AbstractInboundExtMessageHandler { +public class ExtSessionCombineLoginMessageHandler extends AbstractInboundExtMessageHandler { private final TypeReference> typeReference = new TypeReference<>() { }; - public ExtSessionCombineLoginInboundMessageHandler(SubsetSessionManager subsetSessionManager) { + public ExtSessionCombineLoginMessageHandler(SubsetSessionManager subsetSessionManager) { super(new MqttTopic(TopicCategory.EXT, MethodConstants.METHOD__COMBINE_LOGIN), subsetSessionManager); } diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/ExtSessionCombineLogoutInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/ExtSessionCombineLogoutMessageHandler.java similarity index 93% rename from thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/ExtSessionCombineLogoutInboundMessageHandler.java rename to thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/ExtSessionCombineLogoutMessageHandler.java index dc41b9b..214b4e7 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/ExtSessionCombineLogoutInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/ExtSessionCombineLogoutMessageHandler.java @@ -47,12 +47,12 @@ import tools.jackson.core.type.TypeReference; * @date : 2025/6/16 12:33 */ @Component(MethodConstants.METHOD__COMBINE_LOGOUT) -public class ExtSessionCombineLogoutInboundMessageHandler extends AbstractInboundExtMessageHandler { +public class ExtSessionCombineLogoutMessageHandler extends AbstractInboundExtMessageHandler { private final TypeReference> typeReference = new TypeReference<>() { }; - public ExtSessionCombineLogoutInboundMessageHandler(SubsetSessionManager subsetSessionManager) { + public ExtSessionCombineLogoutMessageHandler(SubsetSessionManager subsetSessionManager) { super(new MqttTopic(TopicCategory.EXT, MethodConstants.METHOD__COMBINE_LOGOUT), subsetSessionManager); } diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/OtaDeviceInformInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/OtaDeviceInformMessageHandler.java similarity index 93% rename from thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/OtaDeviceInformInboundMessageHandler.java rename to thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/OtaDeviceInformMessageHandler.java index 5329162..4a6ef29 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/OtaDeviceInformInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/OtaDeviceInformMessageHandler.java @@ -44,13 +44,13 @@ import java.util.function.BiConsumer; * @date : 2025/6/16 12:16 */ @Component(MethodConstants.METHOD__OTA_DEVICE_INFORM) -public class OtaDeviceInformInboundMessageHandler extends AbstractInboundOtaMessageHandler { +public class OtaDeviceInformMessageHandler extends AbstractInboundOtaMessageHandler { private final TypeReference> typeReference = new TypeReference<>() { }; - public OtaDeviceInformInboundMessageHandler(OtaManager otaManager) { + public OtaDeviceInformMessageHandler(OtaManager otaManager) { super(new MqttTopic(MethodConstants.METHOD__OTA_DEVICE_INFORM, false), otaManager); } diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/OtaDeviceProgressInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/OtaDeviceProgressMessageHandler.java similarity index 93% rename from thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/OtaDeviceProgressInboundMessageHandler.java rename to thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/OtaDeviceProgressMessageHandler.java index 8a4b0d7..766aa73 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/OtaDeviceProgressInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/OtaDeviceProgressMessageHandler.java @@ -44,12 +44,12 @@ import java.util.function.BiConsumer; * @date : 2025/6/16 12:18 */ @Component(MethodConstants.METHOD__OTA_DEVICE_UPGRADE) -public class OtaDeviceProgressInboundMessageHandler extends AbstractInboundOtaMessageHandler { +public class OtaDeviceProgressMessageHandler extends AbstractInboundOtaMessageHandler { private final TypeReference> typeReference = new TypeReference<>() { }; - public OtaDeviceProgressInboundMessageHandler(OtaManager otaManager) { + public OtaDeviceProgressMessageHandler(OtaManager otaManager) { super(new MqttTopic(MethodConstants.METHOD__OTA_DEVICE_UPGRADE, false), otaManager); } diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingConfigGetInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingConfigGetMessageHandler.java similarity index 92% rename from thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingConfigGetInboundMessageHandler.java rename to thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingConfigGetMessageHandler.java index fa161fa..1b518e1 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingConfigGetInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingConfigGetMessageHandler.java @@ -45,12 +45,12 @@ import tools.jackson.core.type.TypeReference; * @date : 2025/6/16 12:19 */ @Component(MethodConstants.METHOD__THING_CONFIG_GET) -public class SysThingConfigGetInboundMessageHandler extends AbstractInboundSysMessageHandler { +public class SysThingConfigGetMessageHandler extends AbstractInboundSysMessageHandler { private final TypeReference> typeReference = new TypeReference<>() { }; - public SysThingConfigGetInboundMessageHandler(DeviceConfigManager deviceConfigManager) { + public SysThingConfigGetMessageHandler(DeviceConfigManager deviceConfigManager) { super(new MqttTopic(MethodConstants.METHOD__THING_CONFIG_GET), deviceConfigManager); } diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingConfigLogGetInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingConfigLogGetMessageHandler.java similarity index 92% rename from thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingConfigLogGetInboundMessageHandler.java rename to thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingConfigLogGetMessageHandler.java index 12ce94c..49ca79c 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingConfigLogGetInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingConfigLogGetMessageHandler.java @@ -45,12 +45,12 @@ import tools.jackson.core.type.TypeReference; * @date : 2025/6/16 12:30 */ @Component(MethodConstants.METHOD__THING_CONFIG_LOG_GET) -public class SysThingConfigLogGetInboundMessageHandler extends AbstractInboundSysMessageHandler { +public class SysThingConfigLogGetMessageHandler extends AbstractInboundSysMessageHandler { private final TypeReference> typeReference = new TypeReference<>() { }; - public SysThingConfigLogGetInboundMessageHandler(DeviceConfigLogManager deviceConfigLogManager) { + public SysThingConfigLogGetMessageHandler(DeviceConfigLogManager deviceConfigLogManager) { super(new MqttTopic(MethodConstants.METHOD__THING_CONFIG_LOG_GET), deviceConfigLogManager); } diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingDeviceInfoDeleteInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingDeviceInfoDeleteMessageHandler.java similarity index 92% rename from thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingDeviceInfoDeleteInboundMessageHandler.java rename to thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingDeviceInfoDeleteMessageHandler.java index 45f8c23..453153d 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingDeviceInfoDeleteInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingDeviceInfoDeleteMessageHandler.java @@ -47,12 +47,12 @@ import java.util.Map; * @date : 2025/6/15 16:06 */ @Component(MethodConstants.METHOD__THING_DEVICEINFO_DELETE) -public class SysThingDeviceInfoDeleteInboundMessageHandler extends AbstractInboundSysMessageHandler, Map, DeviceTagManager> { +public class SysThingDeviceInfoDeleteMessageHandler extends AbstractInboundSysMessageHandler, Map, DeviceTagManager> { private final TypeReference>> typeReference = new TypeReference<>() { }; - public SysThingDeviceInfoDeleteInboundMessageHandler(DeviceTagManager deviceTagManager) { + public SysThingDeviceInfoDeleteMessageHandler(DeviceTagManager deviceTagManager) { super(new MqttTopic(MethodConstants.METHOD__THING_DEVICEINFO_DELETE), deviceTagManager); } diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingDeviceInfoGetInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingDeviceInfoGetMessageHandler.java similarity index 92% rename from thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingDeviceInfoGetInboundMessageHandler.java rename to thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingDeviceInfoGetMessageHandler.java index 65ff191..ceceae1 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingDeviceInfoGetInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingDeviceInfoGetMessageHandler.java @@ -47,12 +47,12 @@ import java.util.Map; * @date : 2025/6/15 16:06 */ @Component(MethodConstants.METHOD__THING_DEVICEINFO_GET) -public class SysThingDeviceInfoGetInboundMessageHandler extends AbstractInboundSysMessageHandler>, DeviceTagManager> { +public class SysThingDeviceInfoGetMessageHandler extends AbstractInboundSysMessageHandler>, DeviceTagManager> { private final TypeReference> typeReference = new TypeReference<>() { }; - public SysThingDeviceInfoGetInboundMessageHandler(DeviceTagManager deviceTagManager) { + public SysThingDeviceInfoGetMessageHandler(DeviceTagManager deviceTagManager) { super(new MqttTopic(MethodConstants.METHOD__THING_DEVICEINFO_GET), deviceTagManager); } diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingDeviceInfoUpdateInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingDeviceInfoUpdateMessageHandler.java similarity index 92% rename from thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingDeviceInfoUpdateInboundMessageHandler.java rename to thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingDeviceInfoUpdateMessageHandler.java index 6365ea0..0a372b4 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingDeviceInfoUpdateInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingDeviceInfoUpdateMessageHandler.java @@ -47,12 +47,12 @@ import java.util.Map; * @date : 2025/6/15 16:05 */ @Component(MethodConstants.METHOD__THING_DEVICEINFO_UPDATE) -public class SysThingDeviceInfoUpdateInboundMessageHandler extends AbstractInboundSysMessageHandler, Map, DeviceTagManager> { +public class SysThingDeviceInfoUpdateMessageHandler extends AbstractInboundSysMessageHandler, Map, DeviceTagManager> { private final TypeReference>> typeReference = new TypeReference<>() { }; - public SysThingDeviceInfoUpdateInboundMessageHandler(DeviceTagManager deviceTagManager) { + public SysThingDeviceInfoUpdateMessageHandler(DeviceTagManager deviceTagManager) { super(new MqttTopic(MethodConstants.METHOD__THING_DEVICEINFO_UPDATE), deviceTagManager); } diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingEventIdentityPostInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingEventIdentityPostMessageHandler.java similarity index 91% rename from thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingEventIdentityPostInboundMessageHandler.java rename to thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingEventIdentityPostMessageHandler.java index c6b1c36..1ce5775 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingEventIdentityPostInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingEventIdentityPostMessageHandler.java @@ -46,12 +46,12 @@ import java.util.Map; * @date : 2025/5/14 12:30 */ @Component(MethodConstants.METHOD__THING_EVENT_IDENTIFIER) -public class SysThingEventIdentityPostInboundMessageHandler extends AbstractInboundSysMessageHandler, SpecificationPostManager> { +public class SysThingEventIdentityPostMessageHandler extends AbstractInboundSysMessageHandler, SpecificationPostManager> { private final TypeReference> typeReference = new TypeReference<>() { }; - public SysThingEventIdentityPostInboundMessageHandler(SpecificationPostManager specificationPostManager) { + public SysThingEventIdentityPostMessageHandler(SpecificationPostManager specificationPostManager) { super(new MqttTopic(MethodConstants.METHOD__THING_EVENT_IDENTIFIER, true, MqttTopic.Parameter.EVENT), specificationPostManager); } diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingEventPropertyBatchPostInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingEventPropertyBatchPostMessageHandler.java similarity index 91% rename from thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingEventPropertyBatchPostInboundMessageHandler.java rename to thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingEventPropertyBatchPostMessageHandler.java index d71daad..9e7345f 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingEventPropertyBatchPostInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingEventPropertyBatchPostMessageHandler.java @@ -46,12 +46,12 @@ import java.util.Map; * @date : 2025/5/14 12:30 */ @Component(MethodConstants.METHOD__THING_EVENT_PROPERTY_BATCH_POST) -public class SysThingEventPropertyBatchPostInboundMessageHandler extends AbstractInboundSysMessageHandler, SpecificationPostManager> { +public class SysThingEventPropertyBatchPostMessageHandler extends AbstractInboundSysMessageHandler, SpecificationPostManager> { private final TypeReference> typeReference = new TypeReference<>() { }; - public SysThingEventPropertyBatchPostInboundMessageHandler(SpecificationPostManager specificationPostManager) { + public SysThingEventPropertyBatchPostMessageHandler(SpecificationPostManager specificationPostManager) { super(new MqttTopic(MethodConstants.METHOD__THING_EVENT_PROPERTY_BATCH_POST), specificationPostManager); } diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingEventPropertyHistoryPostInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingEventPropertyHistoryPostMessageHandler.java similarity index 91% rename from thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingEventPropertyHistoryPostInboundMessageHandler.java rename to thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingEventPropertyHistoryPostMessageHandler.java index 95a5134..2098a4b 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingEventPropertyHistoryPostInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingEventPropertyHistoryPostMessageHandler.java @@ -46,12 +46,12 @@ import java.util.Map; * @date : 2025/5/14 12:30 */ @Component(MethodConstants.METHOD__THING_EVENT_PROPERTY_HISTORY_POST) -public class SysThingEventPropertyHistoryPostInboundMessageHandler extends AbstractInboundSysMessageHandler, SpecificationPostManager> { +public class SysThingEventPropertyHistoryPostMessageHandler extends AbstractInboundSysMessageHandler, SpecificationPostManager> { private final TypeReference> typeReference = new TypeReference<>() { }; - public SysThingEventPropertyHistoryPostInboundMessageHandler(SpecificationPostManager specificationPostManager) { + public SysThingEventPropertyHistoryPostMessageHandler(SpecificationPostManager specificationPostManager) { super(new MqttTopic(MethodConstants.METHOD__THING_EVENT_PROPERTY_HISTORY_POST), specificationPostManager); } diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingEventPropertyPackPostInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingEventPropertyPackPostMessageHandler.java similarity index 91% rename from thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingEventPropertyPackPostInboundMessageHandler.java rename to thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingEventPropertyPackPostMessageHandler.java index 524e138..56ca90c 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingEventPropertyPackPostInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingEventPropertyPackPostMessageHandler.java @@ -46,12 +46,12 @@ import java.util.Map; * @date : 2025/5/14 12:30 */ @Component(MethodConstants.METHOD__THING_EVENT_PROPERTY_PACK_POST) -public class SysThingEventPropertyPackPostInboundMessageHandler extends AbstractInboundSysMessageHandler, SpecificationPostManager> { +public class SysThingEventPropertyPackPostMessageHandler extends AbstractInboundSysMessageHandler, SpecificationPostManager> { private final TypeReference> typeReference = new TypeReference<>() { }; - public SysThingEventPropertyPackPostInboundMessageHandler(SpecificationPostManager specificationPostManager) { + public SysThingEventPropertyPackPostMessageHandler(SpecificationPostManager specificationPostManager) { super(new MqttTopic(MethodConstants.METHOD__THING_EVENT_PROPERTY_PACK_POST), specificationPostManager); } diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingEventPropertyPostInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingEventPropertyPostMessageHandler.java similarity index 91% rename from thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingEventPropertyPostInboundMessageHandler.java rename to thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingEventPropertyPostMessageHandler.java index 19c0a59..720f3d9 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingEventPropertyPostInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingEventPropertyPostMessageHandler.java @@ -46,12 +46,12 @@ import java.util.Map; * @date : 2025/5/14 12:30 */ @Component(MethodConstants.METHOD__THING_EVENT_PROPERTY_POST) -public class SysThingEventPropertyPostInboundMessageHandler extends AbstractInboundSysMessageHandler, SpecificationPostManager> { +public class SysThingEventPropertyPostMessageHandler extends AbstractInboundSysMessageHandler, SpecificationPostManager> { private final TypeReference> typeReference = new TypeReference<>() { }; - public SysThingEventPropertyPostInboundMessageHandler(SpecificationPostManager specificationPostManager) { + public SysThingEventPropertyPostMessageHandler(SpecificationPostManager specificationPostManager) { super(new MqttTopic(MethodConstants.METHOD__THING_EVENT_PROPERTY_POST), specificationPostManager); } diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingJobGetInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingJobGetMessageHandler.java similarity index 93% rename from thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingJobGetInboundMessageHandler.java rename to thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingJobGetMessageHandler.java index dfdf5bc..10f575b 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingJobGetInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingJobGetMessageHandler.java @@ -45,12 +45,12 @@ import tools.jackson.core.type.TypeReference; * @date : 2025/6/16 12:22 */ @Component(MethodConstants.METHOD__THING_JOB_GET) -public class SysThingJobGetInboundMessageHandler extends AbstractInboundSysMessageHandler { +public class SysThingJobGetMessageHandler extends AbstractInboundSysMessageHandler { private final TypeReference> typeReference = new TypeReference<>() { }; - public SysThingJobGetInboundMessageHandler(DeviceJobManager messageManager) { + public SysThingJobGetMessageHandler(DeviceJobManager messageManager) { super(new MqttTopic(MethodConstants.METHOD__THING_JOB_GET), messageManager); } diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingJobUpdateInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingJobUpdateMessageHandler.java similarity index 93% rename from thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingJobUpdateInboundMessageHandler.java rename to thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingJobUpdateMessageHandler.java index de2118a..3884cb1 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingJobUpdateInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingJobUpdateMessageHandler.java @@ -45,12 +45,12 @@ import tools.jackson.core.type.TypeReference; * @date : 2025/6/16 12:22 */ @Component(MethodConstants.METHOD__THING_JOB_UPDATE) -public class SysThingJobUpdateInboundMessageHandler extends AbstractInboundSysMessageHandler { +public class SysThingJobUpdateMessageHandler extends AbstractInboundSysMessageHandler { private final TypeReference> typeReference = new TypeReference<>() { }; - public SysThingJobUpdateInboundMessageHandler(DeviceJobManager messageManager) { + public SysThingJobUpdateMessageHandler(DeviceJobManager messageManager) { super(new MqttTopic(MethodConstants.METHOD__THING_JOB_UPDATE), messageManager); } diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingLogPostInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingLogPostMessageHandler.java similarity index 92% rename from thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingLogPostInboundMessageHandler.java rename to thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingLogPostMessageHandler.java index 1cf0582..19944a5 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingLogPostInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingLogPostMessageHandler.java @@ -47,12 +47,12 @@ import java.util.Map; * @date : 2025/6/16 12:31 */ @Component(MethodConstants.METHOD__THING_LOG_POST) -public class SysThingLogPostInboundMessageHandler extends AbstractInboundSysMessageHandler, Map, DeviceConfigLogManager> { +public class SysThingLogPostMessageHandler extends AbstractInboundSysMessageHandler, Map, DeviceConfigLogManager> { private final TypeReference>> typeReference = new TypeReference<>() { }; - public SysThingLogPostInboundMessageHandler(DeviceConfigLogManager deviceConfigLogManager) { + public SysThingLogPostMessageHandler(DeviceConfigLogManager deviceConfigLogManager) { super(new MqttTopic(MethodConstants.METHOD__THING_LOG_POST), deviceConfigLogManager); } diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingOtaFirmwareGetInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingOtaFirmwareGetMessageHandler.java similarity index 92% rename from thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingOtaFirmwareGetInboundMessageHandler.java rename to thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingOtaFirmwareGetMessageHandler.java index adb6cce..8f1ab6c 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingOtaFirmwareGetInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingOtaFirmwareGetMessageHandler.java @@ -45,12 +45,12 @@ import tools.jackson.core.type.TypeReference; * @date : 2025/6/16 12:14 */ @Component(MethodConstants.METHOD__OTA_FIRMWARE_GET) -public class SysThingOtaFirmwareGetInboundMessageHandler extends AbstractInboundSysMessageHandler { +public class SysThingOtaFirmwareGetMessageHandler extends AbstractInboundSysMessageHandler { private final TypeReference> typeReference = new TypeReference<>() { }; - public SysThingOtaFirmwareGetInboundMessageHandler(OtaManager messageManager) { + public SysThingOtaFirmwareGetMessageHandler(OtaManager messageManager) { super(new MqttTopic(MethodConstants.METHOD__OTA_FIRMWARE_GET), messageManager); } diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingTopoAddInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingTopoAddMessageHandler.java similarity index 93% rename from thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingTopoAddInboundMessageHandler.java rename to thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingTopoAddMessageHandler.java index e672fd6..c66e57e 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingTopoAddInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingTopoAddMessageHandler.java @@ -49,13 +49,13 @@ import java.util.List; * @date : 2025/6/16 12:35 */ @Component(MethodConstants.METHOD__THING_TOPO_ADD) -public class SysThingTopoAddInboundMessageHandler extends AbstractInboundSysMessageHandler, List, SubsetTopoManager> { +public class SysThingTopoAddMessageHandler extends AbstractInboundSysMessageHandler, List, SubsetTopoManager> { private final TypeReference>> typeReference = new TypeReference<>() { }; - public SysThingTopoAddInboundMessageHandler(SubsetTopoManager subsetTopoManager) { + public SysThingTopoAddMessageHandler(SubsetTopoManager subsetTopoManager) { super(new MqttTopic(MethodConstants.METHOD__THING_TOPO_ADD), subsetTopoManager); } diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingTopoDeleteInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingTopoDeleteMessageHandler.java similarity index 92% rename from thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingTopoDeleteInboundMessageHandler.java rename to thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingTopoDeleteMessageHandler.java index 19d4b4f..d80e8ff 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingTopoDeleteInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingTopoDeleteMessageHandler.java @@ -46,12 +46,12 @@ import java.util.List; * @date : 2025/6/16 12:35 */ @Component(MethodConstants.METHOD__THING_TOPO_DELETE) -public class SysThingTopoDeleteInboundMessageHandler extends AbstractInboundSysMessageHandler, List, SubsetTopoManager> { +public class SysThingTopoDeleteMessageHandler extends AbstractInboundSysMessageHandler, List, SubsetTopoManager> { private final TypeReference>> typeReference = new TypeReference<>() { }; - public SysThingTopoDeleteInboundMessageHandler(SubsetTopoManager subsetTopoManager) { + public SysThingTopoDeleteMessageHandler(SubsetTopoManager subsetTopoManager) { super(new MqttTopic(MethodConstants.METHOD__THING_TOPO_DELETE), subsetTopoManager); } diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingTopoGetInboundMessageHandler.java b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingTopoGetMessageHandler.java similarity index 92% rename from thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingTopoGetInboundMessageHandler.java rename to thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingTopoGetMessageHandler.java index e954463..0eef45d 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingTopoGetInboundMessageHandler.java +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/src/main/java/cn/herodotus/thingsbrain/mqtt/inbound/handler/SysThingTopoGetMessageHandler.java @@ -49,13 +49,13 @@ import java.util.Map; * @date : 2025/6/16 12:35 */ @Component(MethodConstants.METHOD__THING_TOPO_GET) -public class SysThingTopoGetInboundMessageHandler extends AbstractInboundSysMessageHandler, List, SubsetTopoManager> { +public class SysThingTopoGetMessageHandler extends AbstractInboundSysMessageHandler, List, SubsetTopoManager> { private final TypeReference>> typeReference = new TypeReference<>() { }; - public SysThingTopoGetInboundMessageHandler(SubsetTopoManager subsetTopoManager) { + public SysThingTopoGetMessageHandler(SubsetTopoManager subsetTopoManager) { super(new MqttTopic(MethodConstants.METHOD__THING_TOPO_GET), subsetTopoManager); } -- Gitee From a3b7e7adf0d2541e9e4e379c16e6e0ce731b66ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=81=E5=8C=A0=E5=90=9B?= Date: Thu, 2 Jul 2026 23:44:12 +0800 Subject: [PATCH 05/24] =?UTF-8?q?[=E6=96=B0=E5=A2=9E]=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=20Mqtt=20=E8=B4=A6=E6=88=B7=E3=80=81=E7=B1=BB=E5=88=AB?= =?UTF-8?q?=E5=8F=8A=E6=8E=88=E6=9D=83=E7=AE=A1=E7=90=86=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=E5=88=9D=E5=A7=8B=E5=8C=96=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sqls/iot-standalone-data-mysql.sql | 16 ++++++++++++++++ .../sqls/iot-standalone-data-postgresql.sql | 17 +++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-mysql.sql b/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-mysql.sql index c078d44..6a0c406 100644 --- a/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-mysql.sql +++ b/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-mysql.sql @@ -38,6 +38,14 @@ INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_b INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('e90fede1-ab1d-4bcd-b508-8f03a99a8086', '2026-04-21 15:58:57.588', '2026-04-21 15:59:56.091', 'system', 0, 'system', NULL, 1, b'1', 0, 'WEB', 'views/testing/iot-testing/oauth2-registration/Index.vue', b'0', 'MENU', b'1', b'1', 'mdi-monitor-lock', b'0', 'TESTING', 'OAuth2Registration', b'1', '4559b892-75b0-4a3d-9f2e-28927fc77d63', '/iot-testing/oauth2-registration', NULL, 'OAuth2动态注册测试'); INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('6408e0e7-726f-48cf-ad0f-336a4ca6f955', '2026-04-21 16:04:22.551', '2026-04-21 16:14:01.467', 'system', 0, 'system', NULL, 3, b'1', 0, 'WEB', 'views/testing/iot-testing/mqtt-registration/Index.vue', b'0', 'MENU', b'1', b'1', 'mdi-monitor-cellphone-star', b'0', 'TESTING', 'MqttRegistration', b'1', '4559b892-75b0-4a3d-9f2e-28927fc77d63', '/iot-testing/mqtt-registration', NULL, 'Mqtt动态注册测试'); INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('bf8c4daf-4e0c-4e09-9e14-18fbc6643904', '2026-04-21 16:05:47.076', '2026-04-21 16:06:01.686', 'system', 0, 'system', NULL, 4, b'1', 0, 'WEB', 'views/testing/iot-testing/mqtt-signature/Index.vue', b'0', 'MENU', b'1', b'1', 'mdi-monitor-edit', b'0', 'TESTING', 'MqttSignature', b'1', '4559b892-75b0-4a3d-9f2e-28927fc77d63', '/iot-testing/mqtt-signature', NULL, 'Mqtt签名认证测试'); +INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('0dcdeae6-61b8-4481-8374-38fd4e0c162a', '2026-07-02 15:09:35.971', '2026-07-02 15:09:35.971', 'system', 0, 'system', NULL, 10, b'1', 0, 'WEB', 'views/layouts/Index.vue', b'0', 'MENU', b'1', b'0', 'mdi-office-building-cog', b'0', 'APP', NULL, b'1', NULL, '/things', '/things/mqtt-account', '物联平台管理'); +INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('300aa2e3-c440-48f7-9010-096257794cca', '2026-07-02 15:12:00.361', '2026-07-02 15:12:00.361', 'system', 0, 'system', NULL, 1, b'1', 0, 'WEB', 'views/pages/iot/mqtt-account/Index.vue', b'0', 'MENU', b'1', b'1', 'mdi-link-variant', b'0', 'APP', 'MqttAccount', b'1', '0dcdeae6-61b8-4481-8374-38fd4e0c162a', '/things/mqtt-account', NULL, 'Mqtt账号管理'); +INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('a2296f0c-be5a-4d6d-abf8-276b6eb9d087', '2026-07-02 15:15:14.636', '2026-07-02 15:15:14.636', 'system', 0, 'system', NULL, 2, b'1', 0, 'WEB', 'views/pages/iot/mqtt-account/Authorize.vue', b'1', 'MENU', b'0', b'0', 'mdi-shield-link-variant', b'0', 'APP', 'MqttAccountAuthorize', b'1', '300aa2e3-c440-48f7-9010-096257794cca', '/things/mqtt-account/authorize', NULL, 'Mqtt账号类别'); +INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('1a82f5dd-e516-4e35-baf1-694ab27edb02', '2026-07-02 15:17:34.436', '2026-07-02 15:17:34.436', 'system', 0, 'system', NULL, 2, b'1', 0, 'WEB', 'views/pages/iot/mqtt-category/Index.vue', b'0', 'MENU', b'1', b'1', 'mdi-link', b'0', 'APP', 'MqttCategory', b'1', '0dcdeae6-61b8-4481-8374-38fd4e0c162a', '/things/mqtt-category', NULL, 'Mqtt类别管理'); +INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('b19d9bf0-6235-4ceb-81e0-4c14ce305804', '2026-07-02 15:19:12.188', '2026-07-02 15:19:12.188', 'system', 0, 'system', NULL, 1, b'1', 0, 'WEB', 'views/pages/iot/mqtt-category/Content.vue', b'1', 'MENU', b'0', b'0', 'mdi-link-edit', b'0', 'APP', 'MqttCategoryContent', b'1', '1a82f5dd-e516-4e35-baf1-694ab27edb02', '/things/mqtt-category/content', NULL, 'Mqtt类别详情'); +INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('60bfcbb0-520b-4bd1-b13e-97e3904af616', '2026-07-02 15:23:33.162', '2026-07-02 15:23:33.162', 'system', 0, 'system', NULL, 2, b'1', 0, 'WEB', 'views/pages/iot/mqtt-category/Authorize.vue', b'1', 'MENU', b'0', b'0', 'mdi-link-lock', b'0', 'APP', 'MqttCategoryAuthorize', b'1', '1a82f5dd-e516-4e35-baf1-694ab27edb02', '/things/mqtt-category/authorize', NULL, 'Mqtt类别授权'); +INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('02955b35-6ec5-4741-a8fc-200b434ba864', '2026-07-02 15:25:31.404', '2026-07-02 15:25:31.404', 'system', 0, 'system', NULL, 3, b'1', 0, 'WEB', 'views/pages/iot/mqtt-authority/Index.vue', b'0', 'MENU', b'1', b'1', 'mdi-message-bulleted', b'0', 'APP', 'MqttAuthority', b'1', '0dcdeae6-61b8-4481-8374-38fd4e0c162a', '/things/mqtt-authority', NULL, 'Mqtt权限管理'); +INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('91304ea2-f053-4532-93f4-a7fd03ddbe9e', '2026-07-02 15:27:43.339', '2026-07-02 15:27:43.339', 'system', 0, 'system', NULL, 1, b'1', 0, 'WEB', 'views/pages/iot/mqtt-authority/Content.vue', b'1', 'MENU', b'0', b'0', 'mdi-message-draw', b'0', 'APP', 'MqttAuthorityContent', b'1', '02955b35-6ec5-4741-a8fc-200b434ba864', '/things/mqtt-authority/content', NULL, 'Mqtt权限详情'); -- ---------------------------- -- Table data for sys_element_role @@ -58,6 +66,14 @@ INSERT INTO `sys_element_role` (`element_id`, `role_id`) VALUES ('e90fede1-ab1d- INSERT INTO `sys_element_role` (`element_id`, `role_id`) VALUES ('b5849c6c-8f5c-4664-b82d-80910ccf5748', '1'); INSERT INTO `sys_element_role` (`element_id`, `role_id`) VALUES ('6408e0e7-726f-48cf-ad0f-336a4ca6f955', '1'); INSERT INTO `sys_element_role` (`element_id`, `role_id`) VALUES ('bf8c4daf-4e0c-4e09-9e14-18fbc6643904', '1'); +INSERT INTO `sys_element_role` (`element_id`, `role_id`) VALUES ('0dcdeae6-61b8-4481-8374-38fd4e0c162a', '1'); +INSERT INTO `sys_element_role` (`element_id`, `role_id`) VALUES ('300aa2e3-c440-48f7-9010-096257794cca', '1'); +INSERT INTO `sys_element_role` (`element_id`, `role_id`) VALUES ('a2296f0c-be5a-4d6d-abf8-276b6eb9d087', '1'); +INSERT INTO `sys_element_role` (`element_id`, `role_id`) VALUES ('1a82f5dd-e516-4e35-baf1-694ab27edb02', '1'); +INSERT INTO `sys_element_role` (`element_id`, `role_id`) VALUES ('b19d9bf0-6235-4ceb-81e0-4c14ce305804', '1'); +INSERT INTO `sys_element_role` (`element_id`, `role_id`) VALUES ('60bfcbb0-520b-4bd1-b13e-97e3904af616', '1'); +INSERT INTO `sys_element_role` (`element_id`, `role_id`) VALUES ('02955b35-6ec5-4741-a8fc-200b434ba864', '1'); +INSERT INTO `sys_element_role` (`element_id`, `role_id`) VALUES ('91304ea2-f053-4532-93f4-a7fd03ddbe9e', '1'); -- ---------------------------- -- Table data for iot_tsl_unit diff --git a/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-postgresql.sql b/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-postgresql.sql index be51a65..36fe11a 100644 --- a/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-postgresql.sql +++ b/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-postgresql.sql @@ -38,6 +38,14 @@ INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_b INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('e90fede1-ab1d-4bcd-b508-8f03a99a8086', '2026-04-21 15:58:57.588', '2026-04-21 15:59:56.091', 'system', 0, 'system', NULL, 1, 't', 0, 'WEB', 'views/testing/iot-testing/oauth2-registration/Index.vue', 'f', 'MENU', 't', 't', 'mdi-monitor-lock', 'f', 'TESTING', 'OAuth2Registration', 't', '4559b892-75b0-4a3d-9f2e-28927fc77d63', '/iot-testing/oauth2-registration', NULL, 'OAuth2动态注册测试'); INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('6408e0e7-726f-48cf-ad0f-336a4ca6f955', '2026-04-21 16:04:22.551', '2026-04-21 16:14:01.467', 'system', 0, 'system', NULL, 3, 't', 0, 'WEB', 'views/testing/iot-testing/mqtt-registration/Index.vue', 'f', 'MENU', 't', 't', 'mdi-monitor-cellphone-star', 'f', 'TESTING', 'MqttRegistration', 't', '4559b892-75b0-4a3d-9f2e-28927fc77d63', '/iot-testing/mqtt-registration', NULL, 'Mqtt动态注册测试'); INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('bf8c4daf-4e0c-4e09-9e14-18fbc6643904', '2026-04-21 16:05:47.076', '2026-04-21 16:06:01.686', 'system', 0, 'system', NULL, 4, 't', 0, 'WEB', 'views/testing/iot-testing/mqtt-signature/Index.vue', 'f', 'MENU', 't', 't', 'mdi-monitor-edit', 'f', 'TESTING', 'MqttSignature', 't', '4559b892-75b0-4a3d-9f2e-28927fc77d63', '/iot-testing/mqtt-signature', NULL, 'Mqtt签名认证测试'); +INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('0dcdeae6-61b8-4481-8374-38fd4e0c162a', '2026-07-02 15:09:35.971', '2026-07-02 15:09:35.971', 'system', 0, 'system', NULL, 10, 't', 0, 'WEB', 'views/layouts/Index.vue', 'f', 'MENU', 't', 'f', 'mdi-office-building-cog', 'f', 'APP', NULL, 't', NULL, '/things', '/things/mqtt-account', '物联平台管理'); +INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('300aa2e3-c440-48f7-9010-096257794cca', '2026-07-02 15:12:00.361', '2026-07-02 15:12:00.361', 'system', 0, 'system', NULL, 1, 't', 0, 'WEB', 'views/pages/iot/mqtt-account/Index.vue', 'f', 'MENU', 't', 't', 'mdi-link-variant', 'f', 'APP', 'MqttAccount', 't', '0dcdeae6-61b8-4481-8374-38fd4e0c162a', '/things/mqtt-account', NULL, 'Mqtt账号管理'); +INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('a2296f0c-be5a-4d6d-abf8-276b6eb9d087', '2026-07-02 15:15:14.636', '2026-07-02 15:15:14.636', 'system', 0, 'system', NULL, 2, 't', 0, 'WEB', 'views/pages/iot/mqtt-account/Authorize.vue', 't', 'MENU', 'f', 'f', 'mdi-shield-link-variant', 'f', 'APP', 'MqttAccountAuthorize', 't', '300aa2e3-c440-48f7-9010-096257794cca', '/things/mqtt-account/authorize', NULL, 'Mqtt账号类别'); +INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('1a82f5dd-e516-4e35-baf1-694ab27edb02', '2026-07-02 15:17:34.436', '2026-07-02 15:17:34.436', 'system', 0, 'system', NULL, 2, 't', 0, 'WEB', 'views/pages/iot/mqtt-category/Index.vue', 'f', 'MENU', 't', 't', 'mdi-link', 'f', 'APP', 'MqttCategory', 't', '0dcdeae6-61b8-4481-8374-38fd4e0c162a', '/things/mqtt-category', NULL, 'Mqtt类别管理'); +INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('b19d9bf0-6235-4ceb-81e0-4c14ce305804', '2026-07-02 15:19:12.188', '2026-07-02 15:19:12.188', 'system', 0, 'system', NULL, 1, 't', 0, 'WEB', 'views/pages/iot/mqtt-category/Content.vue', 't', 'MENU', 'f', 'f', 'mdi-link-edit', 'f', 'APP', 'MqttCategoryContent', 't', '1a82f5dd-e516-4e35-baf1-694ab27edb02', '/things/mqtt-category/content', NULL, 'Mqtt类别详情'); +INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('60bfcbb0-520b-4bd1-b13e-97e3904af616', '2026-07-02 15:23:33.162', '2026-07-02 15:23:33.162', 'system', 0, 'system', NULL, 2, 't', 0, 'WEB', 'views/pages/iot/mqtt-category/Authorize.vue', 't', 'MENU', 'f', 'f', 'mdi-link-lock', 'f', 'APP', 'MqttCategoryAuthorize', 't', '1a82f5dd-e516-4e35-baf1-694ab27edb02', '/things/mqtt-category/authorize', NULL, 'Mqtt类别授权'); +INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('02955b35-6ec5-4741-a8fc-200b434ba864', '2026-07-02 15:25:31.404', '2026-07-02 15:25:31.404', 'system', 0, 'system', NULL, 3, 't', 0, 'WEB', 'views/pages/iot/mqtt-authority/Index.vue', 'f', 'MENU', 't', 't', 'mdi-message-bulleted', 'f', 'APP', 'MqttAuthority', 't', '0dcdeae6-61b8-4481-8374-38fd4e0c162a', '/things/mqtt-authority', NULL, 'Mqtt权限管理'); +INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('91304ea2-f053-4532-93f4-a7fd03ddbe9e', '2026-07-02 15:27:43.339', '2026-07-02 15:27:43.339', 'system', 0, 'system', NULL, 1, 't', 0, 'WEB', 'views/pages/iot/mqtt-authority/Content.vue', 't', 'MENU', 'f', 'f', 'mdi-message-draw', 'f', 'APP', 'MqttAuthorityContent', 't', '02955b35-6ec5-4741-a8fc-200b434ba864', '/things/mqtt-authority/content', NULL, 'Mqtt权限详情'); -- ---------------------------- -- Table data for sys_element_role @@ -58,6 +66,15 @@ INSERT INTO "sys_element_role" ("element_id", "role_id") VALUES ('e90fede1-ab1d- INSERT INTO "sys_element_role" ("element_id", "role_id") VALUES ('b5849c6c-8f5c-4664-b82d-80910ccf5748', '1'); INSERT INTO "sys_element_role" ("element_id", "role_id") VALUES ('6408e0e7-726f-48cf-ad0f-336a4ca6f955', '1'); INSERT INTO "sys_element_role" ("element_id", "role_id") VALUES ('bf8c4daf-4e0c-4e09-9e14-18fbc6643904', '1'); +INSERT INTO "sys_element_role" ("element_id", "role_id") VALUES ('0dcdeae6-61b8-4481-8374-38fd4e0c162a', '1'); +INSERT INTO "sys_element_role" ("element_id", "role_id") VALUES ('300aa2e3-c440-48f7-9010-096257794cca', '1'); +INSERT INTO "sys_element_role" ("element_id", "role_id") VALUES ('a2296f0c-be5a-4d6d-abf8-276b6eb9d087', '1'); +INSERT INTO "sys_element_role" ("element_id", "role_id") VALUES ('1a82f5dd-e516-4e35-baf1-694ab27edb02', '1'); +INSERT INTO "sys_element_role" ("element_id", "role_id") VALUES ('b19d9bf0-6235-4ceb-81e0-4c14ce305804', '1'); +INSERT INTO "sys_element_role" ("element_id", "role_id") VALUES ('60bfcbb0-520b-4bd1-b13e-97e3904af616', '1'); +INSERT INTO "sys_element_role" ("element_id", "role_id") VALUES ('02955b35-6ec5-4741-a8fc-200b434ba864', '1'); +INSERT INTO "sys_element_role" ("element_id", "role_id") VALUES ('91304ea2-f053-4532-93f4-a7fd03ddbe9e', '1'); + -- ---------------------------- -- Table data for iot_tsl_unit -- Gitee From 4f68fdd3f4f83a3022e0fa52d2d3658d1bc54c30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=81=E5=8C=A0=E5=90=9B?= Date: Fri, 3 Jul 2026 22:16:43 +0800 Subject: [PATCH 06/24] =?UTF-8?q?[=E9=87=8D=E6=9E=84]=20=E8=B0=83=E6=95=B4?= =?UTF-8?q?=20Mqtt=20=E4=B8=BB=E9=A2=98=E7=B1=BB=E5=88=AB=E4=B8=8E?= =?UTF-8?q?=E4=B8=BB=E9=A2=98=E6=9D=83=E9=99=90=E5=A4=9A=E5=AF=B9=E5=A4=9A?= =?UTF-8?q?=E4=B8=BB=E4=BB=8E=E5=85=B3=E7=B3=BB=EF=BC=8C=E4=BB=A5=E4=BE=BF?= =?UTF-8?q?=E4=BA=8E=E5=85=B3=E7=B3=BB=E9=85=8D=E7=BD=AE=EF=BC=8C=E5=87=8F?= =?UTF-8?q?=E5=B0=91=E5=89=8D=E7=AB=AF=E6=95=B0=E6=8D=AE=E4=BC=A0=E8=BE=93?= =?UTF-8?q?=E5=8F=8A=E5=85=B3=E8=81=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kernel/commons/domain/MqttTopic.java | 10 +- .../thingsbrain/kernel/commons/enums/Qos.java | 8 ++ .../kernel/commons/enums/TopicCategory.java | 4 +- .../initializer/MqttSubscribeTopicSender.java | 18 +-- .../definition/MqttAuthorizationManager.java | 10 +- .../config/LinkMqttManagerConfiguration.java | 6 +- .../mqtt/DefaultMqttAuthorizationManager.java | 16 +-- .../commons/domain/MqttAccount.java | 2 +- .../commons/domain/MqttAuthority.java | 16 ++- .../commons/domain/MqttCategory.java | 22 +--- .../persistence/commons/enums/Action.java | 8 ++ .../persistence/commons/enums/Area.java | 9 ++ .../persistence/commons/enums/Permission.java | 8 ++ .../persistence/commons/enums/Purpose.java | 8 ++ .../persistence/commons/enums/Qos.java | 89 -------------- .../persistence/commons/enums/Retain.java | 8 ++ .../commons/service/MqttAccountService.java | 21 ++++ .../commons/service/MqttAuthorityService.java | 37 ++++++ .../commons/service/MqttCategoryService.java | 20 +++- .../converter/FromMqttAuthorityConverter.java | 21 ++++ .../converter/FromMqttCategoryConverter.java | 21 ---- .../converter/ToMqttAuthorityConverter.java | 21 ++++ .../converter/ToMqttCategoryConverter.java | 21 ---- .../logic/entity/HerodotusMqttAuthority.java | 37 +++++- .../logic/entity/HerodotusMqttCategory.java | 37 +----- .../HerodotusMqttCategoryRepository.java | 6 +- .../service/HerodotusMqttAccountService.java | 69 ++++++++--- .../HerodotusMqttAuthorityService.java | 85 +++++++++++++ .../service/HerodotusMqttCategoryService.java | 40 ++++++- .../specification/JpaMqttAccountService.java | 12 ++ .../JpaMqttAuthorityService.java | 26 ++++ .../specification/JpaMqttCategoryService.java | 13 +- .../sqls/iot-standalone-data-mysql.sql | 10 +- .../sqls/iot-standalone-data-postgresql.sql | 10 +- .../servlet/MqttAccountController.java | 110 ++++++++++++----- .../servlet/MqttAuthorityController.java | 113 ++++++++++++++++++ .../servlet/MqttCategoryController.java | 100 ++++++++++++++++ 37 files changed, 770 insertions(+), 302 deletions(-) delete mode 100644 thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/enums/Qos.java create mode 100644 thingsbrain-platform/thingsbrain-platform-rest/src/main/java/cn/herodotus/thingsbrain/platform/rest/controller/servlet/MqttAuthorityController.java create mode 100644 thingsbrain-platform/thingsbrain-platform-rest/src/main/java/cn/herodotus/thingsbrain/platform/rest/controller/servlet/MqttCategoryController.java diff --git a/thingsbrain-kernel/thingsbrain-kernel-commons/src/main/java/cn/herodotus/thingsbrain/kernel/commons/domain/MqttTopic.java b/thingsbrain-kernel/thingsbrain-kernel-commons/src/main/java/cn/herodotus/thingsbrain/kernel/commons/domain/MqttTopic.java index 5626ac3..8dead3b 100644 --- a/thingsbrain-kernel/thingsbrain-kernel-commons/src/main/java/cn/herodotus/thingsbrain/kernel/commons/domain/MqttTopic.java +++ b/thingsbrain-kernel/thingsbrain-kernel-commons/src/main/java/cn/herodotus/thingsbrain/kernel/commons/domain/MqttTopic.java @@ -122,7 +122,7 @@ public class MqttTopic { /** * 构造方法。 * - * @param classify 主题分类 {@link TopicCategory} + * @param classify 主题类别 {@link TopicCategory} * @param method 对应方法。Shadow 相关主题没有该参数。 */ public MqttTopic(TopicCategory classify, String method) { @@ -132,7 +132,7 @@ public class MqttTopic { /** * 构造方法。 * - * @param classify 主题分类 {@link TopicCategory} + * @param classify 主题类别 {@link TopicCategory} * @param method 对应方法。Shadow 相关主题没有该参数。 * @param supportReply 值为 true 在响应主题结尾添加 _reply。响应主题不是以 _reply 结尾,那么设置为 false。 */ @@ -143,7 +143,7 @@ public class MqttTopic { /** * 构造方法。 * - * @param category 主题分类 {@link TopicCategory} + * @param category 主题类别 {@link TopicCategory} * @param method 对应方法。Shadow 相关主题没有该参数。 * @param supportReply 值为 true 在响应主题结尾添加 _reply。响应主题不是以 _reply 结尾,那么设置为 false。 * @param parameter 用于物模型相关主题的区分。 @@ -205,7 +205,7 @@ public class MqttTopic { /** * 生成主题模板 * - * @param category 主题分类 {@link TopicCategory} + * @param category 主题类别 {@link TopicCategory} * @return 主题模板 */ private String createTopicTemplate(TopicCategory category) { @@ -221,7 +221,7 @@ public class MqttTopic { * 生成主题模板 * * @param template 指定模板 - * @param category 主题分类 {@link TopicCategory} + * @param category 主题类别 {@link TopicCategory} * @return 主题模板 */ private String createTemplate(String template, TopicCategory category) { diff --git a/thingsbrain-kernel/thingsbrain-kernel-commons/src/main/java/cn/herodotus/thingsbrain/kernel/commons/enums/Qos.java b/thingsbrain-kernel/thingsbrain-kernel-commons/src/main/java/cn/herodotus/thingsbrain/kernel/commons/enums/Qos.java index f0c7df6..2696830 100644 --- a/thingsbrain-kernel/thingsbrain-kernel-commons/src/main/java/cn/herodotus/thingsbrain/kernel/commons/enums/Qos.java +++ b/thingsbrain-kernel/thingsbrain-kernel-commons/src/main/java/cn/herodotus/thingsbrain/kernel/commons/enums/Qos.java @@ -29,6 +29,7 @@ import cn.herodotus.dante.core.domain.Dictionary; import cn.herodotus.dante.core.domain.DictionaryEnum; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.v3.oas.annotations.media.Schema; +import org.apache.commons.lang3.ObjectUtils; import java.util.ArrayList; import java.util.HashMap; @@ -77,6 +78,13 @@ public enum Qos implements DictionaryEnum { return DICTIONARIES; } + public static Qos parse(Integer index) { + if (ObjectUtils.isNotEmpty(index)) { + return Qos.get(index); + } + return null; + } + @Override public String getValue() { return value; diff --git a/thingsbrain-kernel/thingsbrain-kernel-commons/src/main/java/cn/herodotus/thingsbrain/kernel/commons/enums/TopicCategory.java b/thingsbrain-kernel/thingsbrain-kernel-commons/src/main/java/cn/herodotus/thingsbrain/kernel/commons/enums/TopicCategory.java index 6f0f75d..9778b91 100644 --- a/thingsbrain-kernel/thingsbrain-kernel-commons/src/main/java/cn/herodotus/thingsbrain/kernel/commons/enums/TopicCategory.java +++ b/thingsbrain-kernel/thingsbrain-kernel-commons/src/main/java/cn/herodotus/thingsbrain/kernel/commons/enums/TopicCategory.java @@ -29,9 +29,9 @@ import java.util.HashMap; import java.util.Map; /** - *

Description: 主题分类

+ *

Description: 主题类别

*

- * 主题第一段内容,作为主题分类。不同的类别结构、用法都会不同。 + * 主题第一段内容,作为主题类别。不同的类别结构、用法都会不同。 * * @author : gengwei.zheng * @date : 2025/6/4 23:08 diff --git a/thingsbrain-link/thingsbrain-link-autoconfigure/src/main/java/cn/herodotus/thingsbrain/link/autoconfigure/initializer/MqttSubscribeTopicSender.java b/thingsbrain-link/thingsbrain-link-autoconfigure/src/main/java/cn/herodotus/thingsbrain/link/autoconfigure/initializer/MqttSubscribeTopicSender.java index 51cbc8d..0c079d5 100644 --- a/thingsbrain-link/thingsbrain-link-autoconfigure/src/main/java/cn/herodotus/thingsbrain/link/autoconfigure/initializer/MqttSubscribeTopicSender.java +++ b/thingsbrain-link/thingsbrain-link-autoconfigure/src/main/java/cn/herodotus/thingsbrain/link/autoconfigure/initializer/MqttSubscribeTopicSender.java @@ -25,15 +25,17 @@ package cn.herodotus.thingsbrain.link.autoconfigure.initializer; +import cn.herodotus.dante.spring.context.ServiceContextHolder; +import cn.herodotus.thingsbrain.kernel.commons.event.MqttSubscribeTopicAppenderEvent; import cn.herodotus.thingsbrain.link.commons.definition.MqttAuthorizationManager; -import cn.herodotus.thingsbrain.persistence.commons.domain.MqttCategory; +import cn.herodotus.thingsbrain.persistence.commons.domain.MqttAuthority; import org.apache.commons.collections4.CollectionUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.boot.context.event.ApplicationReadyEvent; import org.springframework.context.ApplicationListener; -import java.util.Optional; +import java.util.Set; /** *

Description: 系统 Mqtt 订阅主题发送器

@@ -64,13 +66,11 @@ public class MqttSubscribeTopicSender implements ApplicationListener optional = mqttAuthorizationManager.findSubscribeCategoryForPlatform(); + Set authorities = mqttAuthorizationManager.findSubscribeTopicsForPlatform(); - optional.ifPresent(mqttCategory -> { - if (CollectionUtils.isNotEmpty(mqttCategory.getAuthorities())) { - log.info("[ThingsBrain] |- Found [{}] subscribe topics.", mqttCategory.getAuthorities().size()); -// ServiceContextHolder.publishEvent(new MqttSubscribeTopicAppenderEvent(mqttCategory.getAuthorities())); - } - }); + if (CollectionUtils.isNotEmpty(authorities)) { + log.info("[ThingsMesh] |- Found [{}] subscribe topics.", authorities.size()); + ServiceContextHolder.publishEvent(new MqttSubscribeTopicAppenderEvent(authorities)); + } } } diff --git a/thingsbrain-link/thingsbrain-link-commons/src/main/java/cn/herodotus/thingsbrain/link/commons/definition/MqttAuthorizationManager.java b/thingsbrain-link/thingsbrain-link-commons/src/main/java/cn/herodotus/thingsbrain/link/commons/definition/MqttAuthorizationManager.java index b547428..77476bb 100644 --- a/thingsbrain-link/thingsbrain-link-commons/src/main/java/cn/herodotus/thingsbrain/link/commons/definition/MqttAuthorizationManager.java +++ b/thingsbrain-link/thingsbrain-link-commons/src/main/java/cn/herodotus/thingsbrain/link/commons/definition/MqttAuthorizationManager.java @@ -25,9 +25,9 @@ package cn.herodotus.thingsbrain.link.commons.definition; -import cn.herodotus.thingsbrain.persistence.commons.domain.MqttCategory; +import cn.herodotus.thingsbrain.persistence.commons.domain.MqttAuthority; -import java.util.Optional; +import java.util.Set; /** *

Description: Mqtt 授权相关操作管理器

@@ -38,9 +38,9 @@ import java.util.Optional; public interface MqttAuthorizationManager { /** - * 查询包含所有平台可以订阅主题的主题分类 + * 查询包含所有平台可以订阅主题权限 * - * @return 主题分类 {@link MqttCategory} + * @return 主题权限 {@link MqttAuthority} */ - Optional findSubscribeCategoryForPlatform(); + Set findSubscribeTopicsForPlatform(); } diff --git a/thingsbrain-link/thingsbrain-link-manager/src/main/java/cn/herodotus/thingsbrain/link/manager/config/LinkMqttManagerConfiguration.java b/thingsbrain-link/thingsbrain-link-manager/src/main/java/cn/herodotus/thingsbrain/link/manager/config/LinkMqttManagerConfiguration.java index c0b8764..ac72bba 100644 --- a/thingsbrain-link/thingsbrain-link-manager/src/main/java/cn/herodotus/thingsbrain/link/manager/config/LinkMqttManagerConfiguration.java +++ b/thingsbrain-link/thingsbrain-link-manager/src/main/java/cn/herodotus/thingsbrain/link/manager/config/LinkMqttManagerConfiguration.java @@ -27,7 +27,7 @@ package cn.herodotus.thingsbrain.link.manager.config; import cn.herodotus.thingsbrain.link.commons.definition.MqttAuthorizationManager; import cn.herodotus.thingsbrain.link.manager.mqtt.DefaultMqttAuthorizationManager; -import cn.herodotus.thingsbrain.persistence.commons.service.MqttCategoryService; +import cn.herodotus.thingsbrain.persistence.commons.service.MqttAuthorityService; import jakarta.annotation.PostConstruct; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -51,8 +51,8 @@ class LinkMqttManagerConfiguration { } @Bean - public MqttAuthorizationManager mqttAuthorizationManager(MqttCategoryService mqttCategoryService) { - DefaultMqttAuthorizationManager mqttAuthorizationManager = new DefaultMqttAuthorizationManager(mqttCategoryService); + public MqttAuthorizationManager mqttAuthorizationManager(MqttAuthorityService mqttAuthorityService) { + DefaultMqttAuthorizationManager mqttAuthorizationManager = new DefaultMqttAuthorizationManager(mqttAuthorityService); log.trace("[ThingsBrain] |- Bean [Default Mqtt Authorization Manager] Configure."); return mqttAuthorizationManager; } diff --git a/thingsbrain-link/thingsbrain-link-manager/src/main/java/cn/herodotus/thingsbrain/link/manager/mqtt/DefaultMqttAuthorizationManager.java b/thingsbrain-link/thingsbrain-link-manager/src/main/java/cn/herodotus/thingsbrain/link/manager/mqtt/DefaultMqttAuthorizationManager.java index a562724..1d383d9 100644 --- a/thingsbrain-link/thingsbrain-link-manager/src/main/java/cn/herodotus/thingsbrain/link/manager/mqtt/DefaultMqttAuthorizationManager.java +++ b/thingsbrain-link/thingsbrain-link-manager/src/main/java/cn/herodotus/thingsbrain/link/manager/mqtt/DefaultMqttAuthorizationManager.java @@ -26,10 +26,10 @@ package cn.herodotus.thingsbrain.link.manager.mqtt; import cn.herodotus.thingsbrain.link.commons.definition.MqttAuthorizationManager; -import cn.herodotus.thingsbrain.persistence.commons.domain.MqttCategory; -import cn.herodotus.thingsbrain.persistence.commons.service.MqttCategoryService; +import cn.herodotus.thingsbrain.persistence.commons.domain.MqttAuthority; +import cn.herodotus.thingsbrain.persistence.commons.service.MqttAuthorityService; -import java.util.Optional; +import java.util.Set; /** *

Description: 系统默认 Mqtt 授权相关操作管理器

@@ -39,14 +39,14 @@ import java.util.Optional; */ public class DefaultMqttAuthorizationManager implements MqttAuthorizationManager { - private final MqttCategoryService mqttCategoryService; + private final MqttAuthorityService mqttAuthorityService; - public DefaultMqttAuthorizationManager(MqttCategoryService mqttCategoryService) { - this.mqttCategoryService = mqttCategoryService; + public DefaultMqttAuthorizationManager(MqttAuthorityService mqttAuthorityService) { + this.mqttAuthorityService = mqttAuthorityService; } @Override - public Optional findSubscribeCategoryForPlatform() { - return mqttCategoryService.findSubscribeLinkCategoryForPlatform(); + public Set findSubscribeTopicsForPlatform() { + return mqttAuthorityService.findSubscribeTopicsForPlatform(); } } diff --git a/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/domain/MqttAccount.java b/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/domain/MqttAccount.java index aead706..322b32e 100644 --- a/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/domain/MqttAccount.java +++ b/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/domain/MqttAccount.java @@ -56,7 +56,7 @@ public class MqttAccount extends AbstractSysEntity { @Schema(name = "是否为超级用户", title = "目前主要为 Emqx 使用该字段") private Boolean superUser = Boolean.FALSE; - @Schema(name = "主题分类") + @Schema(name = "主题类别") private Set categories = new HashSet<>(); public String getId() { diff --git a/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/domain/MqttAuthority.java b/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/domain/MqttAuthority.java index 7173963..4269895 100644 --- a/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/domain/MqttAuthority.java +++ b/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/domain/MqttAuthority.java @@ -27,14 +27,17 @@ package cn.herodotus.thingsbrain.persistence.commons.domain; import cn.herodotus.dante.data.commons.entity.AbstractSysEntity; import cn.herodotus.thingsbrain.kernel.commons.definition.domain.SubscribeTopic; +import cn.herodotus.thingsbrain.kernel.commons.enums.Qos; import cn.herodotus.thingsbrain.persistence.commons.enums.Action; import cn.herodotus.thingsbrain.persistence.commons.enums.Permission; -import cn.herodotus.thingsbrain.persistence.commons.enums.Qos; import cn.herodotus.thingsbrain.persistence.commons.enums.Retain; import com.google.common.base.MoreObjects; import io.swagger.v3.oas.annotations.media.Schema; import org.apache.commons.lang3.ObjectUtils; +import java.util.HashSet; +import java.util.Set; + /** *

Description: 物联网 Mqtt 权限信息统一实体定义

* @@ -62,6 +65,9 @@ public class MqttAuthority extends AbstractSysEntity implements SubscribeTopic { @Schema(name = "是否为保留数据") private Retain retain = Retain.FALSE; + @Schema(name = "主题类别") + private Set categories = new HashSet<>(); + public String getId() { return id; } @@ -118,6 +124,14 @@ public class MqttAuthority extends AbstractSysEntity implements SubscribeTopic { this.retain = retain; } + public Set getCategories() { + return categories; + } + + public void setCategories(Set categories) { + this.categories = categories; + } + @Override public String toString() { return MoreObjects.toStringHelper(this) diff --git a/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/domain/MqttCategory.java b/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/domain/MqttCategory.java index a04fcc2..e44c71a 100644 --- a/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/domain/MqttCategory.java +++ b/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/domain/MqttCategory.java @@ -32,22 +32,19 @@ import cn.herodotus.thingsbrain.persistence.commons.enums.Purpose; import com.google.common.base.MoreObjects; import io.swagger.v3.oas.annotations.media.Schema; -import java.util.HashSet; -import java.util.Set; - /** - *

Description: 物联网 Mqtt 主题分类信息统一实体定义

+ *

Description: 物联网 Mqtt 主题类别信息统一实体定义

* * @author : gengwei.zheng * @date : 2025/10/14 15:52 */ -@Schema(name = "物联网 Mqtt 主题分类信息统一实体定义") +@Schema(name = "物联网 Mqtt 主题类别信息统一实体定义") public class MqttCategory extends AbstractSysEntity { - @Schema(name = "Mqtt主题分类ID") + @Schema(name = "Mqtt主题类别ID") private String id; - @Schema(name = "Mqtt主题分类名称") + @Schema(name = "Mqtt主题类别名称") private String name; @Schema(name = "是否为默认分类") @@ -67,9 +64,6 @@ public class MqttCategory extends AbstractSysEntity { @Schema(name = "主题用途") private Purpose purpose; - @Schema(name = "分类权限") - private Set authorities = new HashSet<>(); - public String getId() { return id; } @@ -118,14 +112,6 @@ public class MqttCategory extends AbstractSysEntity { this.purpose = purpose; } - public Set getAuthorities() { - return authorities; - } - - public void setAuthorities(Set authorities) { - this.authorities = authorities; - } - @Override public String toString() { return MoreObjects.toStringHelper(this) diff --git a/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/enums/Action.java b/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/enums/Action.java index 1d2e655..ea380de 100644 --- a/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/enums/Action.java +++ b/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/enums/Action.java @@ -29,6 +29,7 @@ import cn.herodotus.dante.core.domain.Dictionary; import cn.herodotus.dante.core.domain.DictionaryEnum; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.v3.oas.annotations.media.Schema; +import org.apache.commons.lang3.ObjectUtils; import java.util.ArrayList; import java.util.HashMap; @@ -77,6 +78,13 @@ public enum Action implements DictionaryEnum { return DICTIONARIES; } + public static Action parse(Integer index) { + if (ObjectUtils.isNotEmpty(index)) { + return Action.get(index); + } + return null; + } + @Override public String getValue() { return value; diff --git a/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/enums/Area.java b/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/enums/Area.java index 26d5e09..377cd32 100644 --- a/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/enums/Area.java +++ b/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/enums/Area.java @@ -29,6 +29,7 @@ import cn.herodotus.dante.core.domain.Dictionary; import cn.herodotus.dante.core.domain.DictionaryEnum; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.v3.oas.annotations.media.Schema; +import org.apache.commons.lang3.ObjectUtils; import java.util.ArrayList; import java.util.HashMap; @@ -76,6 +77,14 @@ public enum Area implements DictionaryEnum { return DICTIONARIES; } + public static Area parse(Integer index) { + if (ObjectUtils.isNotEmpty(index)) { + return Area.get(index); + } + return null; + } + + @Override public String getValue() { return value; diff --git a/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/enums/Permission.java b/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/enums/Permission.java index 1f404c4..8b171e5 100644 --- a/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/enums/Permission.java +++ b/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/enums/Permission.java @@ -29,6 +29,7 @@ import cn.herodotus.dante.core.domain.Dictionary; import cn.herodotus.dante.core.domain.DictionaryEnum; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.v3.oas.annotations.media.Schema; +import org.apache.commons.lang3.ObjectUtils; import java.util.ArrayList; import java.util.HashMap; @@ -76,6 +77,13 @@ public enum Permission implements DictionaryEnum { return DICTIONARIES; } + public static Permission parse(Integer index) { + if (ObjectUtils.isNotEmpty(index)) { + return Permission.get(index); + } + return null; + } + @Override public String getValue() { return value; diff --git a/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/enums/Purpose.java b/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/enums/Purpose.java index a0e2ed7..af21dd4 100644 --- a/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/enums/Purpose.java +++ b/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/enums/Purpose.java @@ -29,6 +29,7 @@ import cn.herodotus.dante.core.domain.Dictionary; import cn.herodotus.dante.core.domain.DictionaryEnum; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.v3.oas.annotations.media.Schema; +import org.apache.commons.lang3.ObjectUtils; import java.util.ArrayList; import java.util.HashMap; @@ -77,6 +78,13 @@ public enum Purpose implements DictionaryEnum { return DICTIONARIES; } + public static Purpose parse(Integer index) { + if (ObjectUtils.isNotEmpty(index)) { + return Purpose.get(index); + } + return null; + } + @Override public String getValue() { return value; diff --git a/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/enums/Qos.java b/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/enums/Qos.java deleted file mode 100644 index cf8e463..0000000 --- a/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/enums/Qos.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright 2020-2030 码匠君 - * - * ThingsBrain licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * ThingsBrain 是 Dante Cloud 系统生态产品,采用 APACHE LICENSE 2.0 开源协议,您在使用过程中,需要注意以下几点: - * - * 1. 请不要删除和修改根目录下的LICENSE文件。 - * 2. 请不要删除和修改 ThingsBrain 源码头部的版权声明。 - * 3. 请保留源码和相关描述文件的项目出处,作者声明等。 - * 4. 分发源码时候,请注明软件出处 - * 5. 在修改包名,模块名称,项目代码等时,请注明软件出处 - * 6. 若您的项目无法满足以上几点,可申请商业授权 - */ - -package cn.herodotus.thingsbrain.persistence.commons.enums; - -import cn.herodotus.dante.core.domain.Dictionary; -import cn.herodotus.dante.core.domain.DictionaryEnum; -import com.fasterxml.jackson.annotation.JsonFormat; -import io.swagger.v3.oas.annotations.media.Schema; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - *

Description: Mqtt Qos 等级

- * - * @author : gengwei.zheng - * @date : 2025/5/8 15:30 - */ -@Schema(name = "Mqtt Qos 等级") -@JsonFormat(shape = JsonFormat.Shape.OBJECT) -public enum Qos implements DictionaryEnum { - - QOS_0("0", "Qos 0"), - QOS_1("1", "Qos 1"), - Qos_2("2", "Qos 2"); - - private static final Map INDEX_MAP = new HashMap<>(); - private static final List DICTIONARIES = new ArrayList<>(); - - static { - for (Qos qos : Qos.values()) { - INDEX_MAP.put(qos.ordinal(), qos); - DICTIONARIES.add(qos.getDictionary(qos.name(), qos.ordinal())); - } - } - - @Schema(name = "枚举值") - private final String value; - @Schema(name = "说明") - private final String label; - - Qos(String value, String label) { - this.value = value; - this.label = label; - } - - public static Qos get(Integer index) { - return INDEX_MAP.get(index); - } - - public static List getDictionaries() { - return DICTIONARIES; - } - - @Override - public String getValue() { - return value; - } - - @Override - public String getLabel() { - return label; - } -} diff --git a/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/enums/Retain.java b/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/enums/Retain.java index 4651ec1..fbd23f2 100644 --- a/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/enums/Retain.java +++ b/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/enums/Retain.java @@ -29,6 +29,7 @@ import cn.herodotus.dante.core.domain.Dictionary; import cn.herodotus.dante.core.domain.DictionaryEnum; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.v3.oas.annotations.media.Schema; +import org.apache.commons.lang3.ObjectUtils; import java.util.ArrayList; import java.util.HashMap; @@ -76,6 +77,13 @@ public enum Retain implements DictionaryEnum { return DICTIONARIES; } + public static Retain parse(Integer index) { + if (ObjectUtils.isNotEmpty(index)) { + return Retain.get(index); + } + return null; + } + @Override public String getValue() { return value; diff --git a/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/service/MqttAccountService.java b/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/service/MqttAccountService.java index 746f3ba..9df652d 100644 --- a/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/service/MqttAccountService.java +++ b/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/service/MqttAccountService.java @@ -27,6 +27,7 @@ package cn.herodotus.thingsbrain.persistence.commons.service; import cn.herodotus.dante.data.commons.service.BaseWriteAndPageService; import cn.herodotus.thingsbrain.persistence.commons.domain.MqttAccount; +import org.springframework.data.domain.Page; /** *

Description: 物联网 Mqtt 账号管理统一定义 Service

@@ -35,4 +36,24 @@ import cn.herodotus.thingsbrain.persistence.commons.domain.MqttAccount; * @date : 2025/7/7 15:18 */ public interface MqttAccountService extends BaseWriteAndPageService { + + /** + * 分页条件查询 {@link MqttAccount} + * + * @param pageNumber 当前页码 + * @param pageSize 每页显示数量 + * @param clientId Mqtt 客户端ID + * @param username Mqtt 用户名 + * @return 分页数据 {@link Page} + */ + Page findByCondition(int pageNumber, int pageSize, String clientId, String username); + + /** + * 为 Mqtt 账户分配 Mqtt 主题类别 + * + * @param id Mqtt 账户ID + * @param categories Mqtt 主题类别ID数组 + * @return 新的 {@link MqttAccount} 实体 + */ + MqttAccount assign(String id, String[] categories); } diff --git a/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/service/MqttAuthorityService.java b/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/service/MqttAuthorityService.java index 8249e38..ab3bd97 100644 --- a/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/service/MqttAuthorityService.java +++ b/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/service/MqttAuthorityService.java @@ -26,7 +26,14 @@ package cn.herodotus.thingsbrain.persistence.commons.service; import cn.herodotus.dante.data.commons.service.BaseWriteAndPageService; +import cn.herodotus.thingsbrain.kernel.commons.enums.Qos; import cn.herodotus.thingsbrain.persistence.commons.domain.MqttAuthority; +import cn.herodotus.thingsbrain.persistence.commons.enums.Action; +import cn.herodotus.thingsbrain.persistence.commons.enums.Permission; +import cn.herodotus.thingsbrain.persistence.commons.enums.Retain; +import org.springframework.data.domain.Page; + +import java.util.Set; /** *

Description: 物联网 Mqtt 权限管理统一定义 Service

@@ -35,4 +42,34 @@ import cn.herodotus.thingsbrain.persistence.commons.domain.MqttAuthority; * @date : 2025/10/14 15:58 */ public interface MqttAuthorityService extends BaseWriteAndPageService { + + /** + * 分页条件查询 {@link MqttAuthority} + * + * @param pageNumber 当前页码 + * @param pageSize 每页显示数量 + * @param topic Mqtt 主题 + * @param action Mqtt 主题操作 {@link Action} + * @param permission Mqtt 主题权限 {@link Permission} + * @param qos Mqtt 主题 Qos {@link Qos} + * @param retain 是否支持发布保留消息 {@link Retain} + * @return 分页数据 {@link Page} + */ + Page findByCondition(int pageNumber, int pageSize, String topic, Action action, Permission permission, Qos qos, Retain retain); + + /** + * 为 Mqtt 主题权限分配 Mqtt 主题类别 + * + * @param id Mqtt 账户ID + * @param categories Mqtt 主题类别ID数组 + * @return 新的 {@link MqttAuthority} 实体 + */ + MqttAuthority assign(String id, String[] categories); + + /** + * 查询包含所有平台可以订阅主题权限 + * + * @return 主题权限 {@link MqttAuthority} + */ + Set findSubscribeTopicsForPlatform(); } diff --git a/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/service/MqttCategoryService.java b/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/service/MqttCategoryService.java index 959824b..776f4ae 100644 --- a/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/service/MqttCategoryService.java +++ b/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/service/MqttCategoryService.java @@ -27,11 +27,13 @@ package cn.herodotus.thingsbrain.persistence.commons.service; import cn.herodotus.dante.data.commons.service.BaseWriteAndPageService; import cn.herodotus.thingsbrain.persistence.commons.domain.MqttCategory; - -import java.util.Optional; +import cn.herodotus.thingsbrain.persistence.commons.enums.Action; +import cn.herodotus.thingsbrain.persistence.commons.enums.Area; +import cn.herodotus.thingsbrain.persistence.commons.enums.Purpose; +import org.springframework.data.domain.Page; /** - *

Description: 物联网 Mqtt 主题分类管理统一定义 Service

+ *

Description: 物联网 Mqtt 主题类别管理统一定义 Service

* * @author : gengwei.zheng * @date : 2025/10/14 15:51 @@ -39,9 +41,15 @@ import java.util.Optional; public interface MqttCategoryService extends BaseWriteAndPageService { /** - * 查询包含所有平台可以订阅主题的主题分类 + * 分页条件查询 {@link MqttCategory} * - * @return 主题分类 {@link MqttCategory} + * @param pageNumber 当前页码 + * @param pageSize 每页显示数量 + * @param area Mqtt 主题使用区域 {@link Area} + * @param action Mqtt 主题操作 {@link Action} + * @param purpose Mqtt 主题用途 {@link Purpose} + * @return 分页数据 {@link Page} */ - Optional findSubscribeLinkCategoryForPlatform(); + Page findByCondition(int pageNumber, int pageSize, Area area, Action action, Purpose purpose); + } diff --git a/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/converter/FromMqttAuthorityConverter.java b/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/converter/FromMqttAuthorityConverter.java index 7c1bc0f..278196f 100644 --- a/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/converter/FromMqttAuthorityConverter.java +++ b/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/converter/FromMqttAuthorityConverter.java @@ -27,7 +27,15 @@ package cn.herodotus.thingsbrain.persistence.jpa.converter; import cn.herodotus.dante.data.jpa.converter.AbstractFromSysEntityConverter; import cn.herodotus.thingsbrain.persistence.commons.domain.MqttAuthority; +import cn.herodotus.thingsbrain.persistence.commons.domain.MqttCategory; import cn.herodotus.thingsbrain.persistence.jpa.logic.entity.HerodotusMqttAuthority; +import cn.herodotus.thingsbrain.persistence.jpa.logic.entity.HerodotusMqttCategory; +import org.apache.commons.collections4.CollectionUtils; +import org.springframework.core.convert.converter.Converter; + +import java.util.Optional; +import java.util.Set; +import java.util.stream.Collectors; /** *

Description: {@link MqttAuthority} 转 {@link HerodotusMqttAuthority} 转换器

@@ -37,6 +45,12 @@ import cn.herodotus.thingsbrain.persistence.jpa.logic.entity.HerodotusMqttAuthor */ public class FromMqttAuthorityConverter extends AbstractFromSysEntityConverter { + private final Converter fromMqttCategory; + + public FromMqttAuthorityConverter() { + this.fromMqttCategory = new FromMqttCategoryConverter(); + } + @Override public HerodotusMqttAuthority getInstance() { return new HerodotusMqttAuthority(); @@ -51,5 +65,12 @@ public class FromMqttAuthorityConverter extends AbstractFromSysEntityConverter { + Set items = categories.stream().map(fromMqttCategory::convert).collect(Collectors.toSet()); + target.setCategories(items); + }); } } diff --git a/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/converter/FromMqttCategoryConverter.java b/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/converter/FromMqttCategoryConverter.java index 981fefa..ee6a5ab 100644 --- a/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/converter/FromMqttCategoryConverter.java +++ b/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/converter/FromMqttCategoryConverter.java @@ -26,16 +26,8 @@ package cn.herodotus.thingsbrain.persistence.jpa.converter; import cn.herodotus.dante.data.jpa.converter.AbstractFromSysEntityConverter; -import cn.herodotus.thingsbrain.persistence.commons.domain.MqttAuthority; import cn.herodotus.thingsbrain.persistence.commons.domain.MqttCategory; -import cn.herodotus.thingsbrain.persistence.jpa.logic.entity.HerodotusMqttAuthority; import cn.herodotus.thingsbrain.persistence.jpa.logic.entity.HerodotusMqttCategory; -import org.apache.commons.collections4.CollectionUtils; -import org.springframework.core.convert.converter.Converter; - -import java.util.Optional; -import java.util.Set; -import java.util.stream.Collectors; /** *

Description: {@link MqttCategory} 转 {@link HerodotusMqttCategory} 转换器

@@ -45,12 +37,6 @@ import java.util.stream.Collectors; */ public class FromMqttCategoryConverter extends AbstractFromSysEntityConverter { - private final Converter fromMqttMqttAuthority; - - public FromMqttCategoryConverter() { - this.fromMqttMqttAuthority = new FromMqttAuthorityConverter(); - } - @Override public HerodotusMqttCategory getInstance() { return new HerodotusMqttCategory(); @@ -64,12 +50,5 @@ public class FromMqttCategoryConverter extends AbstractFromSysEntityConverter { - Set items = authorities.stream().map(fromMqttMqttAuthority::convert).collect(Collectors.toSet()); - target.setAuthorities(items); - }); } } diff --git a/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/converter/ToMqttAuthorityConverter.java b/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/converter/ToMqttAuthorityConverter.java index 5300996..4cd6a54 100644 --- a/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/converter/ToMqttAuthorityConverter.java +++ b/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/converter/ToMqttAuthorityConverter.java @@ -27,7 +27,15 @@ package cn.herodotus.thingsbrain.persistence.jpa.converter; import cn.herodotus.dante.data.jpa.converter.AbstractToSysEntityConverter; import cn.herodotus.thingsbrain.persistence.commons.domain.MqttAuthority; +import cn.herodotus.thingsbrain.persistence.commons.domain.MqttCategory; import cn.herodotus.thingsbrain.persistence.jpa.logic.entity.HerodotusMqttAuthority; +import cn.herodotus.thingsbrain.persistence.jpa.logic.entity.HerodotusMqttCategory; +import org.apache.commons.collections4.CollectionUtils; +import org.springframework.core.convert.converter.Converter; + +import java.util.Optional; +import java.util.Set; +import java.util.stream.Collectors; /** *

Description: {@link HerodotusMqttAuthority} 转 {@link MqttAuthority} 转换器

@@ -37,6 +45,12 @@ import cn.herodotus.thingsbrain.persistence.jpa.logic.entity.HerodotusMqttAuthor */ public class ToMqttAuthorityConverter extends AbstractToSysEntityConverter { + private final Converter toMqttCategory; + + public ToMqttAuthorityConverter() { + this.toMqttCategory = new ToMqttCategoryConverter(); + } + @Override public MqttAuthority getInstance() { return new MqttAuthority(); @@ -51,5 +65,12 @@ public class ToMqttAuthorityConverter extends AbstractToSysEntityConverter { + Set items = categories.stream().map(toMqttCategory::convert).collect(Collectors.toSet()); + target.setCategories(items); + }); } } diff --git a/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/converter/ToMqttCategoryConverter.java b/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/converter/ToMqttCategoryConverter.java index 58cdbf7..6fa4b13 100644 --- a/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/converter/ToMqttCategoryConverter.java +++ b/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/converter/ToMqttCategoryConverter.java @@ -26,16 +26,8 @@ package cn.herodotus.thingsbrain.persistence.jpa.converter; import cn.herodotus.dante.data.jpa.converter.AbstractToSysEntityConverter; -import cn.herodotus.thingsbrain.persistence.commons.domain.MqttAuthority; import cn.herodotus.thingsbrain.persistence.commons.domain.MqttCategory; -import cn.herodotus.thingsbrain.persistence.jpa.logic.entity.HerodotusMqttAuthority; import cn.herodotus.thingsbrain.persistence.jpa.logic.entity.HerodotusMqttCategory; -import org.apache.commons.collections4.CollectionUtils; -import org.springframework.core.convert.converter.Converter; - -import java.util.Optional; -import java.util.Set; -import java.util.stream.Collectors; /** *

Description: {@link HerodotusMqttCategory} 转 {@link MqttCategory} 转换器

@@ -45,12 +37,6 @@ import java.util.stream.Collectors; */ public class ToMqttCategoryConverter extends AbstractToSysEntityConverter { - private final Converter toMqttAuthority; - - public ToMqttCategoryConverter() { - this.toMqttAuthority = new ToMqttAuthorityConverter(); - } - @Override public MqttCategory getInstance() { return new MqttCategory(); @@ -64,12 +50,5 @@ public class ToMqttCategoryConverter extends AbstractToSysEntityConverter { - Set items = authorities.stream().map(toMqttAuthority::convert).collect(Collectors.toSet()); - target.setAuthorities(items); - }); } } diff --git a/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/logic/entity/HerodotusMqttAuthority.java b/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/logic/entity/HerodotusMqttAuthority.java index b0eed1d..ef5920e 100644 --- a/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/logic/entity/HerodotusMqttAuthority.java +++ b/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/logic/entity/HerodotusMqttAuthority.java @@ -26,15 +26,20 @@ package cn.herodotus.thingsbrain.persistence.jpa.logic.entity; import cn.herodotus.dante.data.jpa.entity.AbstractSysEntity; +import cn.herodotus.thingsbrain.kernel.commons.enums.Qos; import cn.herodotus.thingsbrain.persistence.commons.constant.PersistenceConstants; import cn.herodotus.thingsbrain.persistence.commons.enums.Action; import cn.herodotus.thingsbrain.persistence.commons.enums.Permission; -import cn.herodotus.thingsbrain.persistence.commons.enums.Qos; import cn.herodotus.thingsbrain.persistence.commons.enums.Retain; import cn.herodotus.thingsbrain.persistence.jpa.logic.generator.HerodotusMqttAuthorityUuidGenerator; import com.google.common.base.MoreObjects; import jakarta.persistence.*; import org.hibernate.annotations.CacheConcurrencyStrategy; +import org.hibernate.annotations.Fetch; +import org.hibernate.annotations.FetchMode; + +import java.util.HashSet; +import java.util.Set; /** *

Description: Mqtt 主题权限

@@ -76,6 +81,28 @@ public class HerodotusMqttAuthority extends AbstractSysEntity { @Enumerated(EnumType.ORDINAL) private Retain retain = Retain.TRUE; + /** + * 用户 - 角色关系定义: + * (1) 加上fetch=FetchType.LAZY 或 @Fetch(FetchMode.SELECT), 输出结果与上面相同,说明默认设置是fetch=FetchType.LAZY 和 @Fetch(FetchMode.SELECT) 下面四种配置等效,都是N+1条sql的懒加载 + * (2) 加上fetch=FetchType.Eager 和 @Fetch(FetchMode.SELECT), 同样是N+1条sql,不过和上面情况不同的是,N条sql会在criteria.list()时执行 + * (3) 加上@Fetch(FetchMode.JOIN), 那么Hibernate将强行设置为fetch=FetchType.EAGER, 用户设置fetch=FetchType.LAZY将不会生效 + * 从输出可看出,在执行criteria.list()时通过一条sql 获取了所有的City和Hotel。 + * 使用@Fetch(FetchMode.JOIN)需要注意的是:它在Join查询时是Full Join, 所以会有重复City出现 + * (4) 加上@Fetch(FetchMode.SUBSELECT), 那么Hibernate将强行设置为fetch=FetchType.EAGER, 用户设置fetch=FetchType.LAZY将不会生效 从输出可看出,在执行criteria.list()时通过两条sql分别获取City和Hotel + *

+ * + * @see 参考文档 + */ + @org.hibernate.annotations.Cache(usage = CacheConcurrencyStrategy.READ_WRITE, region = PersistenceConstants.REGION_IOT_MQTT_CATEGORY) + @ManyToMany(fetch = FetchType.EAGER) + @Fetch(FetchMode.SUBSELECT) + @JoinTable(name = "iot_mqtt_authority_category", + joinColumns = {@JoinColumn(name = "authority_id")}, + inverseJoinColumns = {@JoinColumn(name = "category_id")}, + uniqueConstraints = {@UniqueConstraint(columnNames = {"authority_id", "category_id"})}, + indexes = {@Index(name = "iot_mqtt_authority_category_aid_idx", columnList = "authority_id"), @Index(name = "iot_mqtt_authority_category_cid_idx", columnList = "category_id")}) + private Set categories = new HashSet<>(); + public String getAuthorityId() { return authorityId; } @@ -124,6 +151,14 @@ public class HerodotusMqttAuthority extends AbstractSysEntity { this.retain = retain; } + public Set getCategories() { + return categories; + } + + public void setCategories(Set categories) { + this.categories = categories; + } + @Override public String toString() { return MoreObjects.toStringHelper(this) diff --git a/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/logic/entity/HerodotusMqttCategory.java b/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/logic/entity/HerodotusMqttCategory.java index 90763f5..313396c 100644 --- a/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/logic/entity/HerodotusMqttCategory.java +++ b/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/logic/entity/HerodotusMqttCategory.java @@ -33,15 +33,10 @@ import cn.herodotus.thingsbrain.persistence.commons.enums.Purpose; import com.google.common.base.MoreObjects; import jakarta.persistence.*; import org.hibernate.annotations.CacheConcurrencyStrategy; -import org.hibernate.annotations.Fetch; -import org.hibernate.annotations.FetchMode; import org.hibernate.annotations.UuidGenerator; -import java.util.HashSet; -import java.util.Set; - /** - *

Description: Mqtt 主题分类

+ *

Description: Mqtt 主题类别

*

* 类似于 RBAC 权限模型的 Role。方便主题的管理。 * @@ -76,28 +71,6 @@ public class HerodotusMqttCategory extends AbstractSysEntity { @Enumerated(EnumType.STRING) private Purpose purpose = Purpose.LINK; - /** - * 用户 - 角色关系定义: - * (1) 加上fetch=FetchType.LAZY 或 @Fetch(FetchMode.SELECT), 输出结果与上面相同,说明默认设置是fetch=FetchType.LAZY 和 @Fetch(FetchMode.SELECT) 下面四种配置等效,都是N+1条sql的懒加载 - * (2) 加上fetch=FetchType.Eager 和 @Fetch(FetchMode.SELECT), 同样是N+1条sql,不过和上面情况不同的是,N条sql会在criteria.list()时执行 - * (3) 加上@Fetch(FetchMode.JOIN), 那么Hibernate将强行设置为fetch=FetchType.EAGER, 用户设置fetch=FetchType.LAZY将不会生效 - * 从输出可看出,在执行criteria.list()时通过一条sql 获取了所有的City和Hotel。 - * 使用@Fetch(FetchMode.JOIN)需要注意的是:它在Join查询时是Full Join, 所以会有重复City出现 - * (4) 加上@Fetch(FetchMode.SUBSELECT), 那么Hibernate将强行设置为fetch=FetchType.EAGER, 用户设置fetch=FetchType.LAZY将不会生效 从输出可看出,在执行criteria.list()时通过两条sql分别获取City和Hotel - *

- * - * @see 参考文档 - */ - @org.hibernate.annotations.Cache(usage = CacheConcurrencyStrategy.READ_WRITE, region = PersistenceConstants.REGION_IOT_MQTT_AUTHORITY) - @ManyToMany(fetch = FetchType.EAGER) - @Fetch(FetchMode.SUBSELECT) - @JoinTable(name = "iot_mqtt_category_authority", - joinColumns = {@JoinColumn(name = "category_id")}, - inverseJoinColumns = {@JoinColumn(name = "authority_id")}, - uniqueConstraints = {@UniqueConstraint(columnNames = {"category_id", "authority_id"})}, - indexes = {@Index(name = "iot_mqtt_category_authority_cid_idx", columnList = "category_id"), @Index(name = "iot_mqtt_category_authority_aid_idx", columnList = "authority_id")}) - private Set authorities = new HashSet<>(); - public String getCategoryId() { return categoryId; } @@ -138,14 +111,6 @@ public class HerodotusMqttCategory extends AbstractSysEntity { this.purpose = purpose; } - public Set getAuthorities() { - return authorities; - } - - public void setAuthorities(Set authorities) { - this.authorities = authorities; - } - @Override public String toString() { return MoreObjects.toStringHelper(this) diff --git a/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/logic/repository/HerodotusMqttCategoryRepository.java b/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/logic/repository/HerodotusMqttCategoryRepository.java index e2b0b98..bd45427 100644 --- a/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/logic/repository/HerodotusMqttCategoryRepository.java +++ b/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/logic/repository/HerodotusMqttCategoryRepository.java @@ -46,17 +46,17 @@ public interface HerodotusMqttCategoryRepository extends BaseJpaRepository findByArea(Area area); /** - * 查询一个指定条件的主题分类 + * 查询一个指定条件的主题类别 * * @param action 主题操作 {@link Action} * @param area 主题使用区域 {@link Area} * @param purpose 主题用途 {@link Purpose} - * @return 主题分类 + * @return 主题类别 */ Optional findOneByActionAndAreaAndPurpose(Action action, Area area, Purpose purpose); } diff --git a/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/logic/service/HerodotusMqttAccountService.java b/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/logic/service/HerodotusMqttAccountService.java index a2274ae..c71c394 100644 --- a/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/logic/service/HerodotusMqttAccountService.java +++ b/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/logic/service/HerodotusMqttAccountService.java @@ -27,11 +27,20 @@ package cn.herodotus.thingsbrain.persistence.jpa.logic.service; import cn.herodotus.dante.data.jpa.repository.BaseJpaRepository; import cn.herodotus.dante.data.jpa.service.AbstractJpaService; -import cn.herodotus.thingsbrain.persistence.jpa.logic.entity.HerodotusDevice; import cn.herodotus.thingsbrain.persistence.jpa.logic.entity.HerodotusMqttAccount; +import cn.herodotus.thingsbrain.persistence.jpa.logic.entity.HerodotusMqttCategory; import cn.herodotus.thingsbrain.persistence.jpa.logic.repository.HerodotusMqttAccountRepository; +import jakarta.persistence.criteria.Predicate; +import org.apache.commons.lang3.StringUtils; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.domain.Specification; import org.springframework.stereotype.Service; +import java.util.*; +import java.util.stream.Collectors; + /** *

Description: 物联网 Mqtt 客户端注册 Jpa 存储 Service

* @@ -52,22 +61,44 @@ public class HerodotusMqttAccountService extends AbstractJpaService findByCondition(int pageNumber, int pageSize, String clientId, String username) { + Pageable pageable = PageRequest.of(pageNumber, pageSize); + + Specification specification = (root, criteriaQuery, criteriaBuilder) -> { + + List predicates = new ArrayList<>(); + + if (StringUtils.isNotBlank(clientId)) { + predicates.add(criteriaBuilder.like(root.get("clientId"), like(clientId))); + } + + if (StringUtils.isNotBlank(username)) { + predicates.add(criteriaBuilder.like(root.get("mobilePhoneNumber"), like(username))); + } + + Predicate[] predicateArray = new Predicate[predicates.size()]; + criteriaQuery.where(criteriaBuilder.and(predicates.toArray(predicateArray))); + return criteriaQuery.getRestriction(); + }; + + return this.findByPage(specification, pageable); + } + + public HerodotusMqttAccount assign(String accountId, String[] categories) { + + Set mqttCategories = Arrays.stream(categories).map(categoryId -> { + HerodotusMqttCategory category = new HerodotusMqttCategory(); + category.setCategoryId(categoryId); + return category; + }).collect(Collectors.toSet()); + + Optional mqttAccount = findById(accountId); + + return mqttAccount.map(data -> { + data.setCategories(mqttCategories); + return data; + }) + .map(this::save) + .orElse(null); + } } diff --git a/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/logic/service/HerodotusMqttAuthorityService.java b/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/logic/service/HerodotusMqttAuthorityService.java index d2aa1c5..729133a 100644 --- a/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/logic/service/HerodotusMqttAuthorityService.java +++ b/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/logic/service/HerodotusMqttAuthorityService.java @@ -27,10 +27,25 @@ package cn.herodotus.thingsbrain.persistence.jpa.logic.service; import cn.herodotus.dante.data.jpa.repository.BaseJpaRepository; import cn.herodotus.dante.data.jpa.service.AbstractJpaService; +import cn.herodotus.thingsbrain.kernel.commons.enums.Qos; +import cn.herodotus.thingsbrain.persistence.commons.enums.*; import cn.herodotus.thingsbrain.persistence.jpa.logic.entity.HerodotusMqttAuthority; +import cn.herodotus.thingsbrain.persistence.jpa.logic.entity.HerodotusMqttCategory; import cn.herodotus.thingsbrain.persistence.jpa.logic.repository.HerodotusMqttAuthorityRepository; +import jakarta.persistence.criteria.Join; +import jakarta.persistence.criteria.JoinType; +import jakarta.persistence.criteria.Predicate; +import org.apache.commons.lang3.ObjectUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.domain.Specification; import org.springframework.stereotype.Service; +import java.util.*; +import java.util.stream.Collectors; + /** *

Description: 物联网 Mqtt 权限 Jpa 存储 Service

* @@ -51,4 +66,74 @@ public class HerodotusMqttAuthorityService extends AbstractJpaService findByCondition(int pageNumber, int pageSize, String topic, Action action, Permission permission, Qos qos, Retain retain) { + Pageable pageable = PageRequest.of(pageNumber, pageSize); + + Specification specification = (root, criteriaQuery, criteriaBuilder) -> { + + List predicates = new ArrayList<>(); + + if (StringUtils.isNotBlank(topic)) { + predicates.add(criteriaBuilder.like(root.get("topic"), like(topic))); + } + + if (ObjectUtils.isNotEmpty(action)) { + predicates.add(criteriaBuilder.equal(root.get("action"), action)); + } + + if (ObjectUtils.isNotEmpty(permission)) { + predicates.add(criteriaBuilder.equal(root.get("permission"), permission)); + } + + if (ObjectUtils.isNotEmpty(qos)) { + predicates.add(criteriaBuilder.equal(root.get("qos"), qos)); + } + + if (ObjectUtils.isNotEmpty(retain)) { + predicates.add(criteriaBuilder.equal(root.get("retain"), retain)); + } + + Predicate[] predicateArray = new Predicate[predicates.size()]; + criteriaQuery.where(criteriaBuilder.and(predicates.toArray(predicateArray))); + return criteriaQuery.getRestriction(); + }; + + return this.findByPage(specification, pageable); + } + + public HerodotusMqttAuthority assign(String authorityId, String[] categories) { + + Set mqttCategories = Arrays.stream(categories).map(categoryId -> { + HerodotusMqttCategory category = new HerodotusMqttCategory(); + category.setCategoryId(categoryId); + return category; + }).collect(Collectors.toSet()); + + Optional mqttAccount = findById(authorityId); + + return mqttAccount.map(data -> { + data.setCategories(mqttCategories); + return data; + }) + .map(this::save) + .orElse(null); + } + + public List findSubscribeTopicsForPlatform() { + Specification specification = (root, criteriaQuery, criteriaBuilder) -> { + + List predicates = new ArrayList<>(); + + Join join = root.join("categories", JoinType.INNER); + predicates.add(criteriaBuilder.equal(join.get("action"), Action.subscribe)); + predicates.add(criteriaBuilder.equal(join.get("area"), Area.PLATFORM)); + predicates.add(criteriaBuilder.equal(join.get("purpose"), Purpose.LINK)); + + Predicate[] predicateArray = new Predicate[predicates.size()]; + criteriaQuery.distinct(true); + return criteriaBuilder.and(predicates.toArray(predicateArray)); + }; + + return this.findAll(specification); + } } diff --git a/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/logic/service/HerodotusMqttCategoryService.java b/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/logic/service/HerodotusMqttCategoryService.java index a0201ed..0c1d265 100644 --- a/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/logic/service/HerodotusMqttCategoryService.java +++ b/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/logic/service/HerodotusMqttCategoryService.java @@ -32,9 +32,16 @@ import cn.herodotus.thingsbrain.persistence.commons.enums.Area; import cn.herodotus.thingsbrain.persistence.commons.enums.Purpose; import cn.herodotus.thingsbrain.persistence.jpa.logic.entity.HerodotusMqttCategory; import cn.herodotus.thingsbrain.persistence.jpa.logic.repository.HerodotusMqttCategoryRepository; +import jakarta.persistence.criteria.Predicate; +import org.apache.commons.lang3.ObjectUtils; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.domain.Specification; import org.springframework.stereotype.Service; -import java.util.Optional; +import java.util.ArrayList; +import java.util.List; import java.util.Set; /** @@ -57,6 +64,33 @@ public class HerodotusMqttCategoryService extends AbstractJpaService findByCondition(int pageNumber, int pageSize, Area area, Action action, Purpose purpose) { + Pageable pageable = PageRequest.of(pageNumber, pageSize); + + Specification specification = (root, criteriaQuery, criteriaBuilder) -> { + + List predicates = new ArrayList<>(); + + if (ObjectUtils.isNotEmpty(area)) { + predicates.add(criteriaBuilder.equal(root.get("area"), area)); + } + + if (ObjectUtils.isNotEmpty(action)) { + predicates.add(criteriaBuilder.equal(root.get("action"), action)); + } + + if (ObjectUtils.isNotEmpty(purpose)) { + predicates.add(criteriaBuilder.equal(root.get("purpose"), purpose)); + } + + Predicate[] predicateArray = new Predicate[predicates.size()]; + criteriaQuery.where(criteriaBuilder.and(predicates.toArray(predicateArray))); + return criteriaQuery.getRestriction(); + }; + + return this.findByPage(specification, pageable); + } + public Set findByArea(Area area) { return herodotusMqttCategoryRepository.findByArea(area); } @@ -64,8 +98,4 @@ public class HerodotusMqttCategoryService extends AbstractJpaService findCategoryForDevice() { return findByArea(Area.DEVICE); } - - public Optional findSubscribeLinkCategoryForPlatform() { - return herodotusMqttCategoryRepository.findOneByActionAndAreaAndPurpose(Action.subscribe, Area.PLATFORM, Purpose.LINK); - } } diff --git a/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/specification/JpaMqttAccountService.java b/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/specification/JpaMqttAccountService.java index 273dce4..a43bd62 100644 --- a/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/specification/JpaMqttAccountService.java +++ b/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/specification/JpaMqttAccountService.java @@ -75,4 +75,16 @@ public class JpaMqttAccountService implements MqttAccountService { public void deleteById(String id) { delegate.deleteById(id); } + + @Override + public Page findByCondition(int pageNumber, int pageSize, String clientId, String username) { + Page pages = delegate.findByCondition(pageNumber, pageSize, clientId, username); + return pages.map(toMqttAccount::convert); + } + + @Override + public MqttAccount assign(String id, String[] categories) { + HerodotusMqttAccount entity = delegate.assign(id, categories); + return toMqttAccount.convert(entity); + } } diff --git a/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/specification/JpaMqttAuthorityService.java b/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/specification/JpaMqttAuthorityService.java index 62c715d..7a21836 100644 --- a/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/specification/JpaMqttAuthorityService.java +++ b/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/specification/JpaMqttAuthorityService.java @@ -25,7 +25,11 @@ package cn.herodotus.thingsbrain.persistence.jpa.specification; +import cn.herodotus.thingsbrain.kernel.commons.enums.Qos; import cn.herodotus.thingsbrain.persistence.commons.domain.MqttAuthority; +import cn.herodotus.thingsbrain.persistence.commons.enums.Action; +import cn.herodotus.thingsbrain.persistence.commons.enums.Permission; +import cn.herodotus.thingsbrain.persistence.commons.enums.Retain; import cn.herodotus.thingsbrain.persistence.commons.service.MqttAuthorityService; import cn.herodotus.thingsbrain.persistence.jpa.converter.FromMqttAuthorityConverter; import cn.herodotus.thingsbrain.persistence.jpa.converter.ToMqttAuthorityConverter; @@ -35,6 +39,10 @@ import org.springframework.core.convert.converter.Converter; import org.springframework.data.domain.Page; import org.springframework.data.domain.Sort; +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; + /** *

Description: 物联网 Mqtt 权限 Service Jpa 实现

* @@ -75,4 +83,22 @@ public class JpaMqttAuthorityService implements MqttAuthorityService { public void deleteById(String id) { delegate.deleteById(id); } + + @Override + public Page findByCondition(int pageNumber, int pageSize, String topic, Action action, Permission permission, Qos qos, Retain retain) { + Page pages = delegate.findByCondition(pageNumber, pageSize, topic, action, permission, qos, retain); + return pages.map(toMqttAuthority::convert); + } + + @Override + public MqttAuthority assign(String id, String[] categories) { + HerodotusMqttAuthority entity = delegate.assign(id, categories); + return toMqttAuthority.convert(entity); + } + + @Override + public Set findSubscribeTopicsForPlatform() { + List entities = delegate.findSubscribeTopicsForPlatform(); + return entities.stream().map(toMqttAuthority::convert).collect(Collectors.toSet()); + } } diff --git a/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/specification/JpaMqttCategoryService.java b/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/specification/JpaMqttCategoryService.java index 6c0f6ce..9d3cbcd 100644 --- a/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/specification/JpaMqttCategoryService.java +++ b/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/specification/JpaMqttCategoryService.java @@ -26,6 +26,9 @@ package cn.herodotus.thingsbrain.persistence.jpa.specification; import cn.herodotus.thingsbrain.persistence.commons.domain.MqttCategory; +import cn.herodotus.thingsbrain.persistence.commons.enums.Action; +import cn.herodotus.thingsbrain.persistence.commons.enums.Area; +import cn.herodotus.thingsbrain.persistence.commons.enums.Purpose; import cn.herodotus.thingsbrain.persistence.commons.service.MqttCategoryService; import cn.herodotus.thingsbrain.persistence.jpa.converter.FromMqttCategoryConverter; import cn.herodotus.thingsbrain.persistence.jpa.converter.ToMqttCategoryConverter; @@ -35,10 +38,8 @@ import org.springframework.core.convert.converter.Converter; import org.springframework.data.domain.Page; import org.springframework.data.domain.Sort; -import java.util.Optional; - /** - *

Description: 物联网 Mqtt 主题分类 Service Jpa 实现

+ *

Description: 物联网 Mqtt 主题类别 Service Jpa 实现

* * @author : gengwei.zheng * @date : 2025/10/14 16:07 @@ -79,8 +80,8 @@ public class JpaMqttCategoryService implements MqttCategoryService { } @Override - public Optional findSubscribeLinkCategoryForPlatform() { - Optional optional = delegate.findSubscribeLinkCategoryForPlatform(); - return optional.map(toMqttCategory::convert); + public Page findByCondition(int pageNumber, int pageSize, Area area, Action action, Purpose purpose) { + Page pages = delegate.findByCondition(pageNumber, pageSize, area, action, purpose); + return pages.map(toMqttCategory::convert); } } diff --git a/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-mysql.sql b/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-mysql.sql index 6a0c406..d88aba8 100644 --- a/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-mysql.sql +++ b/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-mysql.sql @@ -215,11 +215,11 @@ INSERT INTO `iot_mqtt_account` (`account_id`, `create_time`, `update_time`, `cre -- ---------------------------- -- Table data for iot_mqtt_account_category -- ---------------------------- -INSERT INTO `iot_mqtt_category` (`category_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `action`, `area`, `category_name`, `purpose`) VALUES ('1', '2025-10-07 22:44:22', '2025-10-07 22:44:24', 'system', 0, 'system', '自定义Link协议平台端订阅主题分类', 0, b'1', 0, 'subscribe', 'PLATFORM', '自定义Link协议平台端订阅主题分类', 'LINK'); -INSERT INTO `iot_mqtt_category` (`category_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `action`, `area`, `category_name`, `purpose`) VALUES ('2', '2025-10-07 22:45:42', '2025-10-07 22:45:44', 'system', 0, 'system', '自定义Link协议平台端发布主题分类', 0, b'1', 0, 'publish', 'PLATFORM', '自定义Link协议平台端发布主题分类', 'LINK'); -INSERT INTO `iot_mqtt_category` (`category_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `action`, `area`, `category_name`, `purpose`) VALUES ('4', '2025-10-07 22:45:42', '2025-10-07 22:45:44', 'system', 0, 'system', '自定义Link协议设备端订阅主题分类', 0, b'1', 0, 'subscribe', 'DEVICE', '自定义Link协议设备端订阅主题分类', 'LINK'); -INSERT INTO `iot_mqtt_category` (`category_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `action`, `area`, `category_name`, `purpose`) VALUES ('3', '2025-10-07 22:45:42', '2025-10-07 22:45:44', 'system', 0, 'system', '自定义Link协议设备端发布主题分类', 0, b'1', 0, 'publish', 'DEVICE', '自定义Link协议设备端发布主题分类', 'LINK'); -INSERT INTO `iot_mqtt_category` (`category_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `action`, `area`, `category_name`, `purpose`) VALUES ('5', '2025-10-07 22:45:42', '2025-10-07 22:45:44', 'system', 0, 'system', '物联网平台核心订阅主题分类', 0, b'1', 0, 'subscribe', 'PLATFORM', '物联网平台核心订阅主题分类', 'KERNEL'); +INSERT INTO `iot_mqtt_category` (`category_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `action`, `area`, `category_name`, `purpose`) VALUES ('1', '2025-10-07 22:44:22', '2025-10-07 22:44:24', 'system', 0, 'system', '自定义Link协议平台端订阅主题类别', 0, b'1', 0, 'subscribe', 'PLATFORM', '自定义Link协议平台端订阅主题类别', 'LINK'); +INSERT INTO `iot_mqtt_category` (`category_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `action`, `area`, `category_name`, `purpose`) VALUES ('2', '2025-10-07 22:45:42', '2025-10-07 22:45:44', 'system', 0, 'system', '自定义Link协议平台端发布主题类别', 0, b'1', 0, 'publish', 'PLATFORM', '自定义Link协议平台端发布主题类别', 'LINK'); +INSERT INTO `iot_mqtt_category` (`category_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `action`, `area`, `category_name`, `purpose`) VALUES ('4', '2025-10-07 22:45:42', '2025-10-07 22:45:44', 'system', 0, 'system', '自定义Link协议设备端订阅主题类别', 0, b'1', 0, 'subscribe', 'DEVICE', '自定义Link协议设备端订阅主题类别', 'LINK'); +INSERT INTO `iot_mqtt_category` (`category_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `action`, `area`, `category_name`, `purpose`) VALUES ('3', '2025-10-07 22:45:42', '2025-10-07 22:45:44', 'system', 0, 'system', '自定义Link协议设备端发布主题类别', 0, b'1', 0, 'publish', 'DEVICE', '自定义Link协议设备端发布主题类别', 'LINK'); +INSERT INTO `iot_mqtt_category` (`category_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `action`, `area`, `category_name`, `purpose`) VALUES ('5', '2025-10-07 22:45:42', '2025-10-07 22:45:44', 'system', 0, 'system', '物联网平台核心订阅主题类别', 0, b'1', 0, 'subscribe', 'PLATFORM', '物联网平台核心订阅主题类别', 'KERNEL'); -- ---------------------------- -- Table data for iot_mqtt_category diff --git a/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-postgresql.sql b/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-postgresql.sql index 36fe11a..d6c0ae2 100644 --- a/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-postgresql.sql +++ b/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-postgresql.sql @@ -216,11 +216,11 @@ INSERT INTO "iot_mqtt_account" ("account_id", "create_time", "update_time", "cre -- ---------------------------- -- Table data for iot_mqtt_account_category -- ---------------------------- -INSERT INTO "iot_mqtt_category" ("category_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "action", "area", "category_name", "purpose") VALUES ('1', '2025-10-07 22:44:22', '2025-10-07 22:44:24', 'system', 0, 'system', '自定义Link协议平台端订阅主题分类', 0, 't', 0, 'subscribe', 'PLATFORM', '自定义Link协议平台端订阅主题分类', 'LINK'); -INSERT INTO "iot_mqtt_category" ("category_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "action", "area", "category_name", "purpose") VALUES ('2', '2025-10-07 22:45:42', '2025-10-07 22:45:44', 'system', 0, 'system', '自定义Link协议平台端发布主题分类', 0, 't', 0, 'publish', 'PLATFORM', '自定义Link协议平台端发布主题分类', 'LINK'); -INSERT INTO "iot_mqtt_category" ("category_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "action", "area", "category_name", "purpose") VALUES ('4', '2025-10-07 22:45:42', '2025-10-07 22:45:44', 'system', 0, 'system', '自定义Link协议设备端订阅主题分类', 0, 't', 0, 'subscribe', 'DEVICE', '自定义Link协议设备端订阅主题分类', 'LINK'); -INSERT INTO "iot_mqtt_category" ("category_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "action", "area", "category_name", "purpose") VALUES ('3', '2025-10-07 22:45:42', '2025-10-07 22:45:44', 'system', 0, 'system', '自定义Link协议设备端发布主题分类', 0, 't', 0, 'publish', 'DEVICE', '自定义Link协议设备端发布主题分类', 'LINK'); -INSERT INTO "iot_mqtt_category" ("category_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "action", "area", "category_name", "purpose") VALUES ('5', '2025-10-07 22:45:42', '2025-10-07 22:45:44', 'system', 0, 'system', '物联网平台核心订阅主题分类', 0, 't', 0, 'subscribe', 'PLATFORM', '物联网平台核心订阅主题分类', 'KERNEL'); +INSERT INTO "iot_mqtt_category" ("category_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "action", "area", "category_name", "purpose") VALUES ('1', '2025-10-07 22:44:22', '2025-10-07 22:44:24', 'system', 0, 'system', '自定义Link协议平台端订阅主题类别', 0, 't', 0, 'subscribe', 'PLATFORM', '自定义Link协议平台端订阅主题类别', 'LINK'); +INSERT INTO "iot_mqtt_category" ("category_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "action", "area", "category_name", "purpose") VALUES ('2', '2025-10-07 22:45:42', '2025-10-07 22:45:44', 'system', 0, 'system', '自定义Link协议平台端发布主题类别', 0, 't', 0, 'publish', 'PLATFORM', '自定义Link协议平台端发布主题类别', 'LINK'); +INSERT INTO "iot_mqtt_category" ("category_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "action", "area", "category_name", "purpose") VALUES ('4', '2025-10-07 22:45:42', '2025-10-07 22:45:44', 'system', 0, 'system', '自定义Link协议设备端订阅主题类别', 0, 't', 0, 'subscribe', 'DEVICE', '自定义Link协议设备端订阅主题类别', 'LINK'); +INSERT INTO "iot_mqtt_category" ("category_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "action", "area", "category_name", "purpose") VALUES ('3', '2025-10-07 22:45:42', '2025-10-07 22:45:44', 'system', 0, 'system', '自定义Link协议设备端发布主题类别', 0, 't', 0, 'publish', 'DEVICE', '自定义Link协议设备端发布主题类别', 'LINK'); +INSERT INTO "iot_mqtt_category" ("category_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "action", "area", "category_name", "purpose") VALUES ('5', '2025-10-07 22:45:42', '2025-10-07 22:45:44', 'system', 0, 'system', '物联网平台核心订阅主题类别', 0, 't', 0, 'subscribe', 'PLATFORM', '物联网平台核心订阅主题类别', 'KERNEL'); -- ---------------------------- -- Table data for iot_mqtt_category diff --git a/thingsbrain-platform/thingsbrain-platform-rest/src/main/java/cn/herodotus/thingsbrain/platform/rest/controller/servlet/MqttAccountController.java b/thingsbrain-platform/thingsbrain-platform-rest/src/main/java/cn/herodotus/thingsbrain/platform/rest/controller/servlet/MqttAccountController.java index 89e99df..ed84e5f 100644 --- a/thingsbrain-platform/thingsbrain-platform-rest/src/main/java/cn/herodotus/thingsbrain/platform/rest/controller/servlet/MqttAccountController.java +++ b/thingsbrain-platform/thingsbrain-platform-rest/src/main/java/cn/herodotus/thingsbrain/platform/rest/controller/servlet/MqttAccountController.java @@ -1,34 +1,46 @@ /* - * Copyright 2020-2030 码匠君 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * - * ThingsBrain licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Copyright (c) 2020-2030 郑庚伟 ZHENGGENGWEI (码匠君), Licensed under the AGPL License * - * http://www.apache.org/licenses/LICENSE-2.0 + * This file is part of Herodotus ThingsMesh. * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Herodotus ThingsMesh is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. * - * ThingsBrain 是 Dante Cloud 系统生态产品,采用 APACHE LICENSE 2.0 开源协议,您在使用过程中,需要注意以下几点: + * Herodotus ThingsMesh is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. * - * 1. 请不要删除和修改根目录下的LICENSE文件。 - * 2. 请不要删除和修改 ThingsBrain 源码头部的版权声明。 - * 3. 请保留源码和相关描述文件的项目出处,作者声明等。 - * 4. 分发源码时候,请注明软件出处 - * 5. 在修改包名,模块名称,项目代码等时,请注明软件出处 - * 6. 若您的项目无法满足以上几点,可申请商业授权 + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . */ package cn.herodotus.thingsbrain.platform.rest.controller.servlet; +import cn.herodotus.dante.core.domain.Result; +import cn.herodotus.dante.data.commons.service.BaseWriteAndPageService; +import cn.herodotus.dante.data.rest.servlet.AbstractEntityWriteAndPageController; +import cn.herodotus.dante.web.annotation.AccessLimited; +import cn.herodotus.thingsbrain.persistence.commons.domain.MqttAccount; +import cn.herodotus.thingsbrain.persistence.commons.service.MqttAccountService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tags; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import jakarta.validation.constraints.NotNull; +import org.springframework.data.domain.Page; +import org.springframework.http.MediaType; +import org.springframework.web.bind.annotation.*; + +import java.util.Map; /** *

Description: 物联网Mqtt账号接口

@@ -39,20 +51,52 @@ import org.springframework.web.bind.annotation.RestController; @RestController @RequestMapping("/iot/mqtt/account") @Tags({ - @Tag(name = "ThingsBrain物联网平台 REST 接口"), + @Tag(name = "ThingsMesh物联网平台 REST 接口"), @Tag(name = "物联网平台业务功能接口"), - @Tag(name = "物联网Mqtt账号接口"), + @Tag(name = "物联网Mqtt账户接口"), }) -public class MqttAccountController { - -// private final HerodotusMqttRegistrationService herodotusMqttRegistrationService; -// -// public IotMqttAccountController(HerodotusMqttRegistrationService herodotusMqttRegistrationService) { -// this.herodotusMqttRegistrationService = herodotusMqttRegistrationService; -// } -// -// @Override -// public BaseJpaWriteableService getService() { -// return herodotusMqttRegistrationService; -// } +public class MqttAccountController extends AbstractEntityWriteAndPageController> { + + private final MqttAccountService mqttAccountService; + + public MqttAccountController(MqttAccountService mqttAccountService) { + this.mqttAccountService = mqttAccountService; + } + + @Override + public BaseWriteAndPageService getService() { + return mqttAccountService; + } + + @AccessLimited + @Operation(summary = "模糊条件查询Mqtt账号", description = "根据动态输入的字段模糊查询Mqtt账号信息", + responses = {@ApiResponse(description = "Mqtt账号分页列表", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, schema = @Schema(implementation = Map.class)))}) + @Parameters({ + @Parameter(name = "pageNumber", required = true, description = "当前页码"), + @Parameter(name = "pageSize", required = true, description = "每页显示数量"), + @Parameter(name = "clientId", description = "Mqtt 客户端ID"), + @Parameter(name = "username", description = "Mqtt 用户名"), + }) + @GetMapping("/condition") + public Result> findByCondition( + @NotNull @RequestParam("pageNumber") Integer pageNumber, + @NotNull @RequestParam("pageSize") Integer pageSize, + @RequestParam(value = "clientId", required = false) String clientId, + @RequestParam(value = "username", required = false) String username) { + Page pages = mqttAccountService.findByCondition(pageNumber, pageSize, clientId, username); + return resultFromPage(pages); + } + + @Operation(summary = "给Mqtt账户分配类别", description = "给Mqtt账户分配类别", + requestBody = @io.swagger.v3.oas.annotations.parameters.RequestBody(content = @Content(mediaType = MediaType.APPLICATION_FORM_URLENCODED_VALUE)), + responses = {@ApiResponse(description = "已分配类别的Mqtt账户数据", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE))}) + @Parameters({ + @Parameter(name = "id", required = true, description = "Mqtt账户ID"), + @Parameter(name = "categories[]", required = true, description = "Mqtt主题类别对象组成的数组") + }) + @PutMapping + public Result assign(@RequestParam(name = "id") String id, @RequestParam(name = "categories[]") String[] categories) { + MqttAccount mqttAccount = mqttAccountService.assign(id, categories); + return result(mqttAccount); + } } diff --git a/thingsbrain-platform/thingsbrain-platform-rest/src/main/java/cn/herodotus/thingsbrain/platform/rest/controller/servlet/MqttAuthorityController.java b/thingsbrain-platform/thingsbrain-platform-rest/src/main/java/cn/herodotus/thingsbrain/platform/rest/controller/servlet/MqttAuthorityController.java new file mode 100644 index 0000000..d6a6aa7 --- /dev/null +++ b/thingsbrain-platform/thingsbrain-platform-rest/src/main/java/cn/herodotus/thingsbrain/platform/rest/controller/servlet/MqttAuthorityController.java @@ -0,0 +1,113 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 2020-2030 郑庚伟 ZHENGGENGWEI (码匠君), Licensed under the AGPL License + * + * This file is part of Herodotus ThingsMesh. + * + * Herodotus ThingsMesh is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Herodotus ThingsMesh is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package cn.herodotus.thingsbrain.platform.rest.controller.servlet; + +import cn.herodotus.dante.core.domain.Result; +import cn.herodotus.dante.data.commons.service.BaseWriteAndPageService; +import cn.herodotus.dante.data.rest.servlet.AbstractEntityWriteAndPageController; +import cn.herodotus.dante.web.annotation.AccessLimited; +import cn.herodotus.thingsbrain.kernel.commons.enums.Qos; +import cn.herodotus.thingsbrain.persistence.commons.domain.MqttAuthority; +import cn.herodotus.thingsbrain.persistence.commons.enums.Action; +import cn.herodotus.thingsbrain.persistence.commons.enums.Permission; +import cn.herodotus.thingsbrain.persistence.commons.enums.Retain; +import cn.herodotus.thingsbrain.persistence.commons.service.MqttAuthorityService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.tags.Tags; +import jakarta.validation.constraints.NotNull; +import org.springframework.data.domain.Page; +import org.springframework.http.MediaType; +import org.springframework.web.bind.annotation.*; + +import java.util.Map; + +/** + *

Description: 物联网Mqtt主题权限接口

+ * + * @author : gengwei_zheng + * @date : 2026/7/3 12:29 + */ +@RestController +@RequestMapping("/iot/mqtt/authority") +@Tags({ + @Tag(name = "ThingsMesh物联网平台 REST 接口"), + @Tag(name = "物联网平台业务功能接口"), + @Tag(name = "物联网Mqtt主题权限接口"), +}) +public class MqttAuthorityController extends AbstractEntityWriteAndPageController> { + + private final MqttAuthorityService mqttAuthorityService; + + public MqttAuthorityController(MqttAuthorityService mqttAuthorityService) { + this.mqttAuthorityService = mqttAuthorityService; + } + + @Override + public BaseWriteAndPageService getService() { + return mqttAuthorityService; + } + + @AccessLimited + @Operation(summary = "模糊条件查询Mqtt主题权限", description = "根据动态输入的字段模糊查询主题权限信息", + responses = {@ApiResponse(description = "主题权限分页列表", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, schema = @Schema(implementation = Map.class)))}) + @Parameters({ + @Parameter(name = "pageNumber", required = true, description = "当前页码"), + @Parameter(name = "pageSize", required = true, description = "每页显示数量"), + @Parameter(name = "topic", description = "Mqtt主题"), + @Parameter(name = "action", description = "Mqtt主题操作(索引数字值)"), + @Parameter(name = "permission", description = "Mqtt主题权限(索引数字值)"), + @Parameter(name = "qos", description = "Mqtt 主题 Qos(索引数字值)"), + @Parameter(name = "retain", description = "是否为保留主题"), + }) + @GetMapping("/condition") + public Result> findByCondition( + @NotNull @RequestParam("pageNumber") Integer pageNumber, + @NotNull @RequestParam("pageSize") Integer pageSize, + @RequestParam(value = "topic", required = false) String topic, + @RequestParam(value = "action", required = false) Integer action, + @RequestParam(value = "permission", required = false) Integer permission, + @RequestParam(value = "qos", required = false) Integer qos, + @RequestParam(value = "retain", required = false) Integer retain) { + + Page pages = mqttAuthorityService.findByCondition(pageNumber, pageSize, topic, Action.parse(action), Permission.parse(permission), Qos.parse(qos), Retain.parse(retain)); + return resultFromPage(pages); + } + + @Operation(summary = "给Mqtt主题权限分配类别", description = "给Mqtt主题权限分配类别", + requestBody = @io.swagger.v3.oas.annotations.parameters.RequestBody(content = @Content(mediaType = MediaType.APPLICATION_FORM_URLENCODED_VALUE)), + responses = {@ApiResponse(description = "已分配权限的Mqtt主题权限数据", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE))}) + @Parameters({ + @Parameter(name = "id", required = true, description = "Mqtt主题类别ID"), + @Parameter(name = "authorities[]", required = true, description = "Mqtt主题权限对象组成的数组") + }) + @PutMapping + public Result assign(@RequestParam(name = "id") String id, @RequestParam(name = "authorities[]") String[] authorities) { + MqttAuthority mqttAuthority = mqttAuthorityService.assign(id, authorities); + return result(mqttAuthority); + } +} diff --git a/thingsbrain-platform/thingsbrain-platform-rest/src/main/java/cn/herodotus/thingsbrain/platform/rest/controller/servlet/MqttCategoryController.java b/thingsbrain-platform/thingsbrain-platform-rest/src/main/java/cn/herodotus/thingsbrain/platform/rest/controller/servlet/MqttCategoryController.java new file mode 100644 index 0000000..6aece18 --- /dev/null +++ b/thingsbrain-platform/thingsbrain-platform-rest/src/main/java/cn/herodotus/thingsbrain/platform/rest/controller/servlet/MqttCategoryController.java @@ -0,0 +1,100 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 2020-2030 郑庚伟 ZHENGGENGWEI (码匠君), Licensed under the AGPL License + * + * This file is part of Herodotus ThingsMesh. + * + * Herodotus ThingsMesh is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as published + * by the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Herodotus ThingsMesh is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . + */ + +package cn.herodotus.thingsbrain.platform.rest.controller.servlet; + +import cn.herodotus.dante.core.domain.Result; +import cn.herodotus.dante.data.commons.service.BaseWriteAndPageService; +import cn.herodotus.dante.data.rest.servlet.AbstractEntityWriteAndPageController; +import cn.herodotus.dante.web.annotation.AccessLimited; +import cn.herodotus.thingsbrain.persistence.commons.domain.MqttCategory; +import cn.herodotus.thingsbrain.persistence.commons.enums.Action; +import cn.herodotus.thingsbrain.persistence.commons.enums.Area; +import cn.herodotus.thingsbrain.persistence.commons.enums.Purpose; +import cn.herodotus.thingsbrain.persistence.commons.service.MqttCategoryService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.tags.Tags; +import jakarta.validation.constraints.NotNull; +import org.springframework.data.domain.Page; +import org.springframework.http.MediaType; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import java.util.Map; + +/** + *

Description: 物联网Mqtt主题类别接口

+ * + * @author : gengwei_zheng + * @date : 2026/7/3 12:29 + */ +@RestController +@RequestMapping("/iot/mqtt/category") +@Tags({ + @Tag(name = "ThingsMesh物联网平台 REST 接口"), + @Tag(name = "物联网平台业务功能接口"), + @Tag(name = "物联网Mqtt主题类别接口"), +}) +public class MqttCategoryController extends AbstractEntityWriteAndPageController> { + + private final MqttCategoryService mqttCategoryService; + + public MqttCategoryController(MqttCategoryService mqttCategoryService) { + this.mqttCategoryService = mqttCategoryService; + } + + @Override + public BaseWriteAndPageService getService() { + return mqttCategoryService; + } + + @AccessLimited + @Operation(summary = "模糊条件查询Mqtt主题类别", description = "根据动态输入的字段模糊查询主题类别信息", + responses = {@ApiResponse(description = "主题类别分页列表", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, schema = @Schema(implementation = Map.class)))}) + @Parameters({ + @Parameter(name = "pageNumber", required = true, description = "当前页码"), + @Parameter(name = "pageSize", required = true, description = "每页显示数量"), + @Parameter(name = "topic", description = "Mqtt主题"), + @Parameter(name = "action", description = "Mqtt主题操作(索引数字值)"), + @Parameter(name = "permission", description = "Mqtt主题权限(索引数字值)"), + @Parameter(name = "qos", description = "Mqtt 主题 Qos(索引数字值)"), + @Parameter(name = "retain", description = "是否为保留主题"), + }) + @GetMapping("/condition") + public Result> findByCondition( + @NotNull @RequestParam("pageNumber") Integer pageNumber, + @NotNull @RequestParam("pageSize") Integer pageSize, + @RequestParam(value = "area", required = false) Integer area, + @RequestParam(value = "action", required = false) Integer action, + @RequestParam(value = "purpose", required = false) Integer purpose) { + + Page pages = mqttCategoryService.findByCondition(pageNumber, pageSize, Area.parse(area), Action.parse(action), Purpose.parse(purpose)); + return resultFromPage(pages); + } +} -- Gitee From 83d6059c4bd2118f81b40d090f7fd4951aba9192 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=81=E5=8C=A0=E5=90=9B?= Date: Fri, 3 Jul 2026 23:08:49 +0800 Subject: [PATCH 07/24] =?UTF-8?q?[=E6=96=B0=E5=A2=9E]=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=20Mqtt=20=E8=B4=A6=E6=88=B7=E3=80=81=E7=B1=BB=E5=88=AB?= =?UTF-8?q?=E5=8F=8A=E6=8E=88=E6=9D=83=E7=AE=A1=E7=90=86=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=E5=88=9D=E5=A7=8B=E5=8C=96=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sqls/iot-standalone-data-mysql.sql | 16 ---------------- .../sqls/iot-standalone-data-postgresql.sql | 17 ----------------- 2 files changed, 33 deletions(-) diff --git a/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-mysql.sql b/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-mysql.sql index d88aba8..d11e960 100644 --- a/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-mysql.sql +++ b/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-mysql.sql @@ -38,14 +38,6 @@ INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_b INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('e90fede1-ab1d-4bcd-b508-8f03a99a8086', '2026-04-21 15:58:57.588', '2026-04-21 15:59:56.091', 'system', 0, 'system', NULL, 1, b'1', 0, 'WEB', 'views/testing/iot-testing/oauth2-registration/Index.vue', b'0', 'MENU', b'1', b'1', 'mdi-monitor-lock', b'0', 'TESTING', 'OAuth2Registration', b'1', '4559b892-75b0-4a3d-9f2e-28927fc77d63', '/iot-testing/oauth2-registration', NULL, 'OAuth2动态注册测试'); INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('6408e0e7-726f-48cf-ad0f-336a4ca6f955', '2026-04-21 16:04:22.551', '2026-04-21 16:14:01.467', 'system', 0, 'system', NULL, 3, b'1', 0, 'WEB', 'views/testing/iot-testing/mqtt-registration/Index.vue', b'0', 'MENU', b'1', b'1', 'mdi-monitor-cellphone-star', b'0', 'TESTING', 'MqttRegistration', b'1', '4559b892-75b0-4a3d-9f2e-28927fc77d63', '/iot-testing/mqtt-registration', NULL, 'Mqtt动态注册测试'); INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('bf8c4daf-4e0c-4e09-9e14-18fbc6643904', '2026-04-21 16:05:47.076', '2026-04-21 16:06:01.686', 'system', 0, 'system', NULL, 4, b'1', 0, 'WEB', 'views/testing/iot-testing/mqtt-signature/Index.vue', b'0', 'MENU', b'1', b'1', 'mdi-monitor-edit', b'0', 'TESTING', 'MqttSignature', b'1', '4559b892-75b0-4a3d-9f2e-28927fc77d63', '/iot-testing/mqtt-signature', NULL, 'Mqtt签名认证测试'); -INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('0dcdeae6-61b8-4481-8374-38fd4e0c162a', '2026-07-02 15:09:35.971', '2026-07-02 15:09:35.971', 'system', 0, 'system', NULL, 10, b'1', 0, 'WEB', 'views/layouts/Index.vue', b'0', 'MENU', b'1', b'0', 'mdi-office-building-cog', b'0', 'APP', NULL, b'1', NULL, '/things', '/things/mqtt-account', '物联平台管理'); -INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('300aa2e3-c440-48f7-9010-096257794cca', '2026-07-02 15:12:00.361', '2026-07-02 15:12:00.361', 'system', 0, 'system', NULL, 1, b'1', 0, 'WEB', 'views/pages/iot/mqtt-account/Index.vue', b'0', 'MENU', b'1', b'1', 'mdi-link-variant', b'0', 'APP', 'MqttAccount', b'1', '0dcdeae6-61b8-4481-8374-38fd4e0c162a', '/things/mqtt-account', NULL, 'Mqtt账号管理'); -INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('a2296f0c-be5a-4d6d-abf8-276b6eb9d087', '2026-07-02 15:15:14.636', '2026-07-02 15:15:14.636', 'system', 0, 'system', NULL, 2, b'1', 0, 'WEB', 'views/pages/iot/mqtt-account/Authorize.vue', b'1', 'MENU', b'0', b'0', 'mdi-shield-link-variant', b'0', 'APP', 'MqttAccountAuthorize', b'1', '300aa2e3-c440-48f7-9010-096257794cca', '/things/mqtt-account/authorize', NULL, 'Mqtt账号类别'); -INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('1a82f5dd-e516-4e35-baf1-694ab27edb02', '2026-07-02 15:17:34.436', '2026-07-02 15:17:34.436', 'system', 0, 'system', NULL, 2, b'1', 0, 'WEB', 'views/pages/iot/mqtt-category/Index.vue', b'0', 'MENU', b'1', b'1', 'mdi-link', b'0', 'APP', 'MqttCategory', b'1', '0dcdeae6-61b8-4481-8374-38fd4e0c162a', '/things/mqtt-category', NULL, 'Mqtt类别管理'); -INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('b19d9bf0-6235-4ceb-81e0-4c14ce305804', '2026-07-02 15:19:12.188', '2026-07-02 15:19:12.188', 'system', 0, 'system', NULL, 1, b'1', 0, 'WEB', 'views/pages/iot/mqtt-category/Content.vue', b'1', 'MENU', b'0', b'0', 'mdi-link-edit', b'0', 'APP', 'MqttCategoryContent', b'1', '1a82f5dd-e516-4e35-baf1-694ab27edb02', '/things/mqtt-category/content', NULL, 'Mqtt类别详情'); -INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('60bfcbb0-520b-4bd1-b13e-97e3904af616', '2026-07-02 15:23:33.162', '2026-07-02 15:23:33.162', 'system', 0, 'system', NULL, 2, b'1', 0, 'WEB', 'views/pages/iot/mqtt-category/Authorize.vue', b'1', 'MENU', b'0', b'0', 'mdi-link-lock', b'0', 'APP', 'MqttCategoryAuthorize', b'1', '1a82f5dd-e516-4e35-baf1-694ab27edb02', '/things/mqtt-category/authorize', NULL, 'Mqtt类别授权'); -INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('02955b35-6ec5-4741-a8fc-200b434ba864', '2026-07-02 15:25:31.404', '2026-07-02 15:25:31.404', 'system', 0, 'system', NULL, 3, b'1', 0, 'WEB', 'views/pages/iot/mqtt-authority/Index.vue', b'0', 'MENU', b'1', b'1', 'mdi-message-bulleted', b'0', 'APP', 'MqttAuthority', b'1', '0dcdeae6-61b8-4481-8374-38fd4e0c162a', '/things/mqtt-authority', NULL, 'Mqtt权限管理'); -INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('91304ea2-f053-4532-93f4-a7fd03ddbe9e', '2026-07-02 15:27:43.339', '2026-07-02 15:27:43.339', 'system', 0, 'system', NULL, 1, b'1', 0, 'WEB', 'views/pages/iot/mqtt-authority/Content.vue', b'1', 'MENU', b'0', b'0', 'mdi-message-draw', b'0', 'APP', 'MqttAuthorityContent', b'1', '02955b35-6ec5-4741-a8fc-200b434ba864', '/things/mqtt-authority/content', NULL, 'Mqtt权限详情'); -- ---------------------------- -- Table data for sys_element_role @@ -66,14 +58,6 @@ INSERT INTO `sys_element_role` (`element_id`, `role_id`) VALUES ('e90fede1-ab1d- INSERT INTO `sys_element_role` (`element_id`, `role_id`) VALUES ('b5849c6c-8f5c-4664-b82d-80910ccf5748', '1'); INSERT INTO `sys_element_role` (`element_id`, `role_id`) VALUES ('6408e0e7-726f-48cf-ad0f-336a4ca6f955', '1'); INSERT INTO `sys_element_role` (`element_id`, `role_id`) VALUES ('bf8c4daf-4e0c-4e09-9e14-18fbc6643904', '1'); -INSERT INTO `sys_element_role` (`element_id`, `role_id`) VALUES ('0dcdeae6-61b8-4481-8374-38fd4e0c162a', '1'); -INSERT INTO `sys_element_role` (`element_id`, `role_id`) VALUES ('300aa2e3-c440-48f7-9010-096257794cca', '1'); -INSERT INTO `sys_element_role` (`element_id`, `role_id`) VALUES ('a2296f0c-be5a-4d6d-abf8-276b6eb9d087', '1'); -INSERT INTO `sys_element_role` (`element_id`, `role_id`) VALUES ('1a82f5dd-e516-4e35-baf1-694ab27edb02', '1'); -INSERT INTO `sys_element_role` (`element_id`, `role_id`) VALUES ('b19d9bf0-6235-4ceb-81e0-4c14ce305804', '1'); -INSERT INTO `sys_element_role` (`element_id`, `role_id`) VALUES ('60bfcbb0-520b-4bd1-b13e-97e3904af616', '1'); -INSERT INTO `sys_element_role` (`element_id`, `role_id`) VALUES ('02955b35-6ec5-4741-a8fc-200b434ba864', '1'); -INSERT INTO `sys_element_role` (`element_id`, `role_id`) VALUES ('91304ea2-f053-4532-93f4-a7fd03ddbe9e', '1'); -- ---------------------------- -- Table data for iot_tsl_unit diff --git a/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-postgresql.sql b/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-postgresql.sql index d6c0ae2..70f0a4f 100644 --- a/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-postgresql.sql +++ b/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-postgresql.sql @@ -38,14 +38,6 @@ INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_b INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('e90fede1-ab1d-4bcd-b508-8f03a99a8086', '2026-04-21 15:58:57.588', '2026-04-21 15:59:56.091', 'system', 0, 'system', NULL, 1, 't', 0, 'WEB', 'views/testing/iot-testing/oauth2-registration/Index.vue', 'f', 'MENU', 't', 't', 'mdi-monitor-lock', 'f', 'TESTING', 'OAuth2Registration', 't', '4559b892-75b0-4a3d-9f2e-28927fc77d63', '/iot-testing/oauth2-registration', NULL, 'OAuth2动态注册测试'); INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('6408e0e7-726f-48cf-ad0f-336a4ca6f955', '2026-04-21 16:04:22.551', '2026-04-21 16:14:01.467', 'system', 0, 'system', NULL, 3, 't', 0, 'WEB', 'views/testing/iot-testing/mqtt-registration/Index.vue', 'f', 'MENU', 't', 't', 'mdi-monitor-cellphone-star', 'f', 'TESTING', 'MqttRegistration', 't', '4559b892-75b0-4a3d-9f2e-28927fc77d63', '/iot-testing/mqtt-registration', NULL, 'Mqtt动态注册测试'); INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('bf8c4daf-4e0c-4e09-9e14-18fbc6643904', '2026-04-21 16:05:47.076', '2026-04-21 16:06:01.686', 'system', 0, 'system', NULL, 4, 't', 0, 'WEB', 'views/testing/iot-testing/mqtt-signature/Index.vue', 'f', 'MENU', 't', 't', 'mdi-monitor-edit', 'f', 'TESTING', 'MqttSignature', 't', '4559b892-75b0-4a3d-9f2e-28927fc77d63', '/iot-testing/mqtt-signature', NULL, 'Mqtt签名认证测试'); -INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('0dcdeae6-61b8-4481-8374-38fd4e0c162a', '2026-07-02 15:09:35.971', '2026-07-02 15:09:35.971', 'system', 0, 'system', NULL, 10, 't', 0, 'WEB', 'views/layouts/Index.vue', 'f', 'MENU', 't', 'f', 'mdi-office-building-cog', 'f', 'APP', NULL, 't', NULL, '/things', '/things/mqtt-account', '物联平台管理'); -INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('300aa2e3-c440-48f7-9010-096257794cca', '2026-07-02 15:12:00.361', '2026-07-02 15:12:00.361', 'system', 0, 'system', NULL, 1, 't', 0, 'WEB', 'views/pages/iot/mqtt-account/Index.vue', 'f', 'MENU', 't', 't', 'mdi-link-variant', 'f', 'APP', 'MqttAccount', 't', '0dcdeae6-61b8-4481-8374-38fd4e0c162a', '/things/mqtt-account', NULL, 'Mqtt账号管理'); -INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('a2296f0c-be5a-4d6d-abf8-276b6eb9d087', '2026-07-02 15:15:14.636', '2026-07-02 15:15:14.636', 'system', 0, 'system', NULL, 2, 't', 0, 'WEB', 'views/pages/iot/mqtt-account/Authorize.vue', 't', 'MENU', 'f', 'f', 'mdi-shield-link-variant', 'f', 'APP', 'MqttAccountAuthorize', 't', '300aa2e3-c440-48f7-9010-096257794cca', '/things/mqtt-account/authorize', NULL, 'Mqtt账号类别'); -INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('1a82f5dd-e516-4e35-baf1-694ab27edb02', '2026-07-02 15:17:34.436', '2026-07-02 15:17:34.436', 'system', 0, 'system', NULL, 2, 't', 0, 'WEB', 'views/pages/iot/mqtt-category/Index.vue', 'f', 'MENU', 't', 't', 'mdi-link', 'f', 'APP', 'MqttCategory', 't', '0dcdeae6-61b8-4481-8374-38fd4e0c162a', '/things/mqtt-category', NULL, 'Mqtt类别管理'); -INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('b19d9bf0-6235-4ceb-81e0-4c14ce305804', '2026-07-02 15:19:12.188', '2026-07-02 15:19:12.188', 'system', 0, 'system', NULL, 1, 't', 0, 'WEB', 'views/pages/iot/mqtt-category/Content.vue', 't', 'MENU', 'f', 'f', 'mdi-link-edit', 'f', 'APP', 'MqttCategoryContent', 't', '1a82f5dd-e516-4e35-baf1-694ab27edb02', '/things/mqtt-category/content', NULL, 'Mqtt类别详情'); -INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('60bfcbb0-520b-4bd1-b13e-97e3904af616', '2026-07-02 15:23:33.162', '2026-07-02 15:23:33.162', 'system', 0, 'system', NULL, 2, 't', 0, 'WEB', 'views/pages/iot/mqtt-category/Authorize.vue', 't', 'MENU', 'f', 'f', 'mdi-link-lock', 'f', 'APP', 'MqttCategoryAuthorize', 't', '1a82f5dd-e516-4e35-baf1-694ab27edb02', '/things/mqtt-category/authorize', NULL, 'Mqtt类别授权'); -INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('02955b35-6ec5-4741-a8fc-200b434ba864', '2026-07-02 15:25:31.404', '2026-07-02 15:25:31.404', 'system', 0, 'system', NULL, 3, 't', 0, 'WEB', 'views/pages/iot/mqtt-authority/Index.vue', 'f', 'MENU', 't', 't', 'mdi-message-bulleted', 'f', 'APP', 'MqttAuthority', 't', '0dcdeae6-61b8-4481-8374-38fd4e0c162a', '/things/mqtt-authority', NULL, 'Mqtt权限管理'); -INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('91304ea2-f053-4532-93f4-a7fd03ddbe9e', '2026-07-02 15:27:43.339', '2026-07-02 15:27:43.339', 'system', 0, 'system', NULL, 1, 't', 0, 'WEB', 'views/pages/iot/mqtt-authority/Content.vue', 't', 'MENU', 'f', 'f', 'mdi-message-draw', 'f', 'APP', 'MqttAuthorityContent', 't', '02955b35-6ec5-4741-a8fc-200b434ba864', '/things/mqtt-authority/content', NULL, 'Mqtt权限详情'); -- ---------------------------- -- Table data for sys_element_role @@ -66,15 +58,6 @@ INSERT INTO "sys_element_role" ("element_id", "role_id") VALUES ('e90fede1-ab1d- INSERT INTO "sys_element_role" ("element_id", "role_id") VALUES ('b5849c6c-8f5c-4664-b82d-80910ccf5748', '1'); INSERT INTO "sys_element_role" ("element_id", "role_id") VALUES ('6408e0e7-726f-48cf-ad0f-336a4ca6f955', '1'); INSERT INTO "sys_element_role" ("element_id", "role_id") VALUES ('bf8c4daf-4e0c-4e09-9e14-18fbc6643904', '1'); -INSERT INTO "sys_element_role" ("element_id", "role_id") VALUES ('0dcdeae6-61b8-4481-8374-38fd4e0c162a', '1'); -INSERT INTO "sys_element_role" ("element_id", "role_id") VALUES ('300aa2e3-c440-48f7-9010-096257794cca', '1'); -INSERT INTO "sys_element_role" ("element_id", "role_id") VALUES ('a2296f0c-be5a-4d6d-abf8-276b6eb9d087', '1'); -INSERT INTO "sys_element_role" ("element_id", "role_id") VALUES ('1a82f5dd-e516-4e35-baf1-694ab27edb02', '1'); -INSERT INTO "sys_element_role" ("element_id", "role_id") VALUES ('b19d9bf0-6235-4ceb-81e0-4c14ce305804', '1'); -INSERT INTO "sys_element_role" ("element_id", "role_id") VALUES ('60bfcbb0-520b-4bd1-b13e-97e3904af616', '1'); -INSERT INTO "sys_element_role" ("element_id", "role_id") VALUES ('02955b35-6ec5-4741-a8fc-200b434ba864', '1'); -INSERT INTO "sys_element_role" ("element_id", "role_id") VALUES ('91304ea2-f053-4532-93f4-a7fd03ddbe9e', '1'); - -- ---------------------------- -- Table data for iot_tsl_unit -- Gitee From f0f936a5699da55883a2a347e132c2d3f0005ba6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=81=E5=8C=A0=E5=90=9B?= Date: Fri, 3 Jul 2026 23:18:48 +0800 Subject: [PATCH 08/24] =?UTF-8?q?[=E6=96=B0=E5=A2=9E]=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=20Mqtt=20=E8=B4=A6=E6=88=B7=E3=80=81=E7=B1=BB=E5=88=AB?= =?UTF-8?q?=E5=8F=8A=E6=8E=88=E6=9D=83=E7=AE=A1=E7=90=86=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=E5=88=9D=E5=A7=8B=E5=8C=96=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sqls/iot-standalone-data-mysql.sql | 17 ++++++++++++++++- .../sqls/iot-standalone-data-postgresql.sql | 16 ++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-mysql.sql b/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-mysql.sql index d11e960..fd16a72 100644 --- a/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-mysql.sql +++ b/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-mysql.sql @@ -38,6 +38,14 @@ INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_b INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('e90fede1-ab1d-4bcd-b508-8f03a99a8086', '2026-04-21 15:58:57.588', '2026-04-21 15:59:56.091', 'system', 0, 'system', NULL, 1, b'1', 0, 'WEB', 'views/testing/iot-testing/oauth2-registration/Index.vue', b'0', 'MENU', b'1', b'1', 'mdi-monitor-lock', b'0', 'TESTING', 'OAuth2Registration', b'1', '4559b892-75b0-4a3d-9f2e-28927fc77d63', '/iot-testing/oauth2-registration', NULL, 'OAuth2动态注册测试'); INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('6408e0e7-726f-48cf-ad0f-336a4ca6f955', '2026-04-21 16:04:22.551', '2026-04-21 16:14:01.467', 'system', 0, 'system', NULL, 3, b'1', 0, 'WEB', 'views/testing/iot-testing/mqtt-registration/Index.vue', b'0', 'MENU', b'1', b'1', 'mdi-monitor-cellphone-star', b'0', 'TESTING', 'MqttRegistration', b'1', '4559b892-75b0-4a3d-9f2e-28927fc77d63', '/iot-testing/mqtt-registration', NULL, 'Mqtt动态注册测试'); INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('bf8c4daf-4e0c-4e09-9e14-18fbc6643904', '2026-04-21 16:05:47.076', '2026-04-21 16:06:01.686', 'system', 0, 'system', NULL, 4, b'1', 0, 'WEB', 'views/testing/iot-testing/mqtt-signature/Index.vue', b'0', 'MENU', b'1', b'1', 'mdi-monitor-edit', b'0', 'TESTING', 'MqttSignature', b'1', '4559b892-75b0-4a3d-9f2e-28927fc77d63', '/iot-testing/mqtt-signature', NULL, 'Mqtt签名认证测试'); +INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('d8b88ff6-b41c-4db9-86bb-d7fb416586ba', '2026-07-03 15:03:18.311', '2026-07-03 15:03:18.311', 'system', 0, 'system', NULL, 3, b'1', 0, 'WEB', 'views/pages/iot/mqtt-account/Index.vue', b'0', 'MENU', b'1', b'1', 'mdi-link-variant', b'0', 'APP', 'MqttAccount', b'1', 'f7527762-16f9-429c-a82f-696862633fef', '/things/mqtt-account', NULL, '终端账号管理'); +INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('024b8aab-7a8d-4aa9-8dc2-1c6842e01757', '2026-07-03 15:04:50.941', '2026-07-03 15:04:50.941', 'system', 0, 'system', NULL, 2, b'1', 0, 'WEB', 'views/pages/iot/mqtt-account/Authorize.vue', b'1', 'MENU', b'0', b'0', 'mdi-shield-link-variant', b'0', 'APP', 'MqttAccountAuthorize', b'1', 'd8b88ff6-b41c-4db9-86bb-d7fb416586ba', '/things/mqtt-account/authorize', NULL, '终端账号分类'); +INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('f7527762-16f9-429c-a82f-696862633fef', '2026-07-03 14:53:53.809', '2026-07-03 14:53:53.809', 'system', 0, 'system', NULL, 10, b'1', 0, 'WEB', 'views/layouts/Index.vue', b'0', 'MENU', b'1', b'0', 'mdi-office-building-cog', b'0', 'APP', NULL, b'1', NULL, '/things', '/things/mqtt-category', '物联平台管理'); +INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('f5212952-c46d-423d-b185-954f0652c17d', '2026-07-03 14:55:14.721', '2026-07-03 14:55:14.721', 'system', 0, 'system', NULL, 1, b'1', 0, 'WEB', 'views/pages/iot/mqtt-category/Index.vue', b'0', 'MENU', b'1', b'1', 'mdi-message-bulleted', b'0', 'APP', 'MqttCategory', b'1', 'f7527762-16f9-429c-a82f-696862633fef', '/things/mqtt-category', NULL, '主题类别管理'); +INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('31b4a5ab-6861-4cf4-926e-ae1b6cefd5d0', '2026-07-03 14:57:22.063', '2026-07-03 14:57:22.063', 'system', 0, 'system', NULL, 1, b'1', 0, 'WEB', 'views/pages/iot/mqtt-category/Content.vue', b'1', 'MENU', b'0', b'0', 'mdi-message-draw', b'0', 'APP', 'MqttCategoryContent', b'1', 'f5212952-c46d-423d-b185-954f0652c17d', '/things/mqtt-category/content', NULL, '主题类别详情'); +INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('c499066e-5d36-4260-a3fa-e9be0b07f374', '2026-07-03 14:59:10.223', '2026-07-03 14:59:10.223', 'system', 0, 'system', NULL, 2, b'1', 0, 'WEB', 'views/pages/iot/mqtt-authority/Index.vue', b'0', 'MENU', b'1', b'1', 'mdi-link', b'0', 'APP', 'MqttAuthority', b'1', 'f7527762-16f9-429c-a82f-696862633fef', '/things/mqtt-authority', NULL, '主题权限管理'); +INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('33353926-fef2-4272-82d0-762aed89fc6e', '2026-07-03 15:00:28.812', '2026-07-03 15:00:28.812', 'system', 0, 'system', NULL, 1, b'1', 0, 'WEB', 'views/pages/iot/mqtt-authority/Content.vue', b'1', 'MENU', b'0', b'0', 'mdi-link-edit', b'0', 'APP', 'MqttAuthorityContent', b'1', 'c499066e-5d36-4260-a3fa-e9be0b07f374', '/things/mqtt-authority/content', NULL, '主题权限详情'); +INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('146512ac-c7e6-41f6-822d-886840baaeeb', '2026-07-03 15:01:25.771', '2026-07-03 15:01:45.351', 'system', 0, 'system', NULL, 2, b'1', 0, 'WEB', 'views/pages/iot/mqtt-authority/Authorize.vue', b'1', 'MENU', b'0', b'0', 'mdi-link-lock', b'0', 'APP', 'MqttAuthorityAuthorize', b'1', 'c499066e-5d36-4260-a3fa-e9be0b07f374', '/things/mqtt-authority/authorize', NULL, '主题权限授权'); -- ---------------------------- -- Table data for sys_element_role @@ -58,7 +66,14 @@ INSERT INTO `sys_element_role` (`element_id`, `role_id`) VALUES ('e90fede1-ab1d- INSERT INTO `sys_element_role` (`element_id`, `role_id`) VALUES ('b5849c6c-8f5c-4664-b82d-80910ccf5748', '1'); INSERT INTO `sys_element_role` (`element_id`, `role_id`) VALUES ('6408e0e7-726f-48cf-ad0f-336a4ca6f955', '1'); INSERT INTO `sys_element_role` (`element_id`, `role_id`) VALUES ('bf8c4daf-4e0c-4e09-9e14-18fbc6643904', '1'); - +INSERT INTO `sys_element_role` (`element_id`, `role_id`) VALUES ('f7527762-16f9-429c-a82f-696862633fef', '1'); +INSERT INTO `sys_element_role` (`element_id`, `role_id`) VALUES ('f5212952-c46d-423d-b185-954f0652c17d', '1'); +INSERT INTO `sys_element_role` (`element_id`, `role_id`) VALUES ('31b4a5ab-6861-4cf4-926e-ae1b6cefd5d0', '1'); +INSERT INTO `sys_element_role` (`element_id`, `role_id`) VALUES ('c499066e-5d36-4260-a3fa-e9be0b07f374', '1'); +INSERT INTO `sys_element_role` (`element_id`, `role_id`) VALUES ('33353926-fef2-4272-82d0-762aed89fc6e', '1'); +INSERT INTO `sys_element_role` (`element_id`, `role_id`) VALUES ('146512ac-c7e6-41f6-822d-886840baaeeb', '1'); +INSERT INTO `sys_element_role` (`element_id`, `role_id`) VALUES ('d8b88ff6-b41c-4db9-86bb-d7fb416586ba', '1'); +INSERT INTO `sys_element_role` (`element_id`, `role_id`) VALUES ('024b8aab-7a8d-4aa9-8dc2-1c6842e01757', '1'); -- ---------------------------- -- Table data for iot_tsl_unit -- ---------------------------- diff --git a/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-postgresql.sql b/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-postgresql.sql index 70f0a4f..be68ac2 100644 --- a/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-postgresql.sql +++ b/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-postgresql.sql @@ -38,6 +38,14 @@ INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_b INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('e90fede1-ab1d-4bcd-b508-8f03a99a8086', '2026-04-21 15:58:57.588', '2026-04-21 15:59:56.091', 'system', 0, 'system', NULL, 1, 't', 0, 'WEB', 'views/testing/iot-testing/oauth2-registration/Index.vue', 'f', 'MENU', 't', 't', 'mdi-monitor-lock', 'f', 'TESTING', 'OAuth2Registration', 't', '4559b892-75b0-4a3d-9f2e-28927fc77d63', '/iot-testing/oauth2-registration', NULL, 'OAuth2动态注册测试'); INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('6408e0e7-726f-48cf-ad0f-336a4ca6f955', '2026-04-21 16:04:22.551', '2026-04-21 16:14:01.467', 'system', 0, 'system', NULL, 3, 't', 0, 'WEB', 'views/testing/iot-testing/mqtt-registration/Index.vue', 'f', 'MENU', 't', 't', 'mdi-monitor-cellphone-star', 'f', 'TESTING', 'MqttRegistration', 't', '4559b892-75b0-4a3d-9f2e-28927fc77d63', '/iot-testing/mqtt-registration', NULL, 'Mqtt动态注册测试'); INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('bf8c4daf-4e0c-4e09-9e14-18fbc6643904', '2026-04-21 16:05:47.076', '2026-04-21 16:06:01.686', 'system', 0, 'system', NULL, 4, 't', 0, 'WEB', 'views/testing/iot-testing/mqtt-signature/Index.vue', 'f', 'MENU', 't', 't', 'mdi-monitor-edit', 'f', 'TESTING', 'MqttSignature', 't', '4559b892-75b0-4a3d-9f2e-28927fc77d63', '/iot-testing/mqtt-signature', NULL, 'Mqtt签名认证测试'); +INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('d8b88ff6-b41c-4db9-86bb-d7fb416586ba', '2026-07-03 15:03:18.311', '2026-07-03 15:03:18.311', 'system', 0, 'system', NULL, 3, 't', 0, 'WEB', 'views/pages/iot/mqtt-account/Index.vue', 'f', 'MENU', 't', 't', 'mdi-link-variant', 'f', 'APP', 'MqttAccount', 't', 'f7527762-16f9-429c-a82f-696862633fef', '/things/mqtt-account', NULL, '终端账号管理'); +INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('024b8aab-7a8d-4aa9-8dc2-1c6842e01757', '2026-07-03 15:04:50.941', '2026-07-03 15:04:50.941', 'system', 0, 'system', NULL, 2, 't', 0, 'WEB', 'views/pages/iot/mqtt-account/Authorize.vue', 't', 'MENU', 'f', 'f', 'mdi-shield-link-variant', 'f', 'APP', 'MqttAccountAuthorize', 't', 'd8b88ff6-b41c-4db9-86bb-d7fb416586ba', '/things/mqtt-account/authorize', NULL, '终端账号分类'); +INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('f7527762-16f9-429c-a82f-696862633fef', '2026-07-03 14:53:53.809', '2026-07-03 14:53:53.809', 'system', 0, 'system', NULL, 10, 't', 0, 'WEB', 'views/layouts/Index.vue', 'f', 'MENU', 't', 'f', 'mdi-office-building-cog', 'f', 'APP', NULL, 't', NULL, '/things', '/things/mqtt-category', '物联平台管理'); +INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('f5212952-c46d-423d-b185-954f0652c17d', '2026-07-03 14:55:14.721', '2026-07-03 14:55:14.721', 'system', 0, 'system', NULL, 1, 't', 0, 'WEB', 'views/pages/iot/mqtt-category/Index.vue', 'f', 'MENU', 't', 't', 'mdi-message-bulleted', 'f', 'APP', 'MqttCategory', 't', 'f7527762-16f9-429c-a82f-696862633fef', '/things/mqtt-category', NULL, '主题类别管理'); +INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('31b4a5ab-6861-4cf4-926e-ae1b6cefd5d0', '2026-07-03 14:57:22.063', '2026-07-03 14:57:22.063', 'system', 0, 'system', NULL, 1, 't', 0, 'WEB', 'views/pages/iot/mqtt-category/Content.vue', 't', 'MENU', 'f', 'f', 'mdi-message-draw', 'f', 'APP', 'MqttCategoryContent', 't', 'f5212952-c46d-423d-b185-954f0652c17d', '/things/mqtt-category/content', NULL, '主题类别详情'); +INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('c499066e-5d36-4260-a3fa-e9be0b07f374', '2026-07-03 14:59:10.223', '2026-07-03 14:59:10.223', 'system', 0, 'system', NULL, 2, 't', 0, 'WEB', 'views/pages/iot/mqtt-authority/Index.vue', 'f', 'MENU', 't', 't', 'mdi-link', 'f', 'APP', 'MqttAuthority', 't', 'f7527762-16f9-429c-a82f-696862633fef', '/things/mqtt-authority', NULL, '主题权限管理'); +INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('33353926-fef2-4272-82d0-762aed89fc6e', '2026-07-03 15:00:28.812', '2026-07-03 15:00:28.812', 'system', 0, 'system', NULL, 1, 't', 0, 'WEB', 'views/pages/iot/mqtt-authority/Content.vue', 't', 'MENU', 'f', 'f', 'mdi-link-edit', 'f', 'APP', 'MqttAuthorityContent', 't', 'c499066e-5d36-4260-a3fa-e9be0b07f374', '/things/mqtt-authority/content', NULL, '主题权限详情'); +INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('146512ac-c7e6-41f6-822d-886840baaeeb', '2026-07-03 15:01:25.771', '2026-07-03 15:01:45.351', 'system', 0, 'system', NULL, 2, 't', 0, 'WEB', 'views/pages/iot/mqtt-authority/Authorize.vue', 't', 'MENU', 'f', 'f', 'mdi-link-lock', 'f', 'APP', 'MqttAuthorityAuthorize', 't', 'c499066e-5d36-4260-a3fa-e9be0b07f374', '/things/mqtt-authority/authorize', NULL, '主题权限授权'); -- ---------------------------- -- Table data for sys_element_role @@ -58,6 +66,14 @@ INSERT INTO "sys_element_role" ("element_id", "role_id") VALUES ('e90fede1-ab1d- INSERT INTO "sys_element_role" ("element_id", "role_id") VALUES ('b5849c6c-8f5c-4664-b82d-80910ccf5748', '1'); INSERT INTO "sys_element_role" ("element_id", "role_id") VALUES ('6408e0e7-726f-48cf-ad0f-336a4ca6f955', '1'); INSERT INTO "sys_element_role" ("element_id", "role_id") VALUES ('bf8c4daf-4e0c-4e09-9e14-18fbc6643904', '1'); +INSERT INTO "sys_element_role" ("element_id", "role_id") VALUES ('f7527762-16f9-429c-a82f-696862633fef', '1'); +INSERT INTO "sys_element_role" ("element_id", "role_id") VALUES ('f5212952-c46d-423d-b185-954f0652c17d', '1'); +INSERT INTO "sys_element_role" ("element_id", "role_id") VALUES ('31b4a5ab-6861-4cf4-926e-ae1b6cefd5d0', '1'); +INSERT INTO "sys_element_role" ("element_id", "role_id") VALUES ('c499066e-5d36-4260-a3fa-e9be0b07f374', '1'); +INSERT INTO "sys_element_role" ("element_id", "role_id") VALUES ('33353926-fef2-4272-82d0-762aed89fc6e', '1'); +INSERT INTO "sys_element_role" ("element_id", "role_id") VALUES ('146512ac-c7e6-41f6-822d-886840baaeeb', '1'); +INSERT INTO "sys_element_role" ("element_id", "role_id") VALUES ('d8b88ff6-b41c-4db9-86bb-d7fb416586ba', '1'); +INSERT INTO "sys_element_role" ("element_id", "role_id") VALUES ('024b8aab-7a8d-4aa9-8dc2-1c6842e01757', '1'); -- ---------------------------- -- Table data for iot_tsl_unit -- Gitee From ce08c7012e852fd48e3fad4a59f4ad7051226630 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=81=E5=8C=A0=E5=90=9B?= Date: Fri, 3 Jul 2026 23:47:43 +0800 Subject: [PATCH 09/24] =?UTF-8?q?[=E6=96=B0=E5=A2=9E]=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=20Mqtt=20=E8=B4=A6=E6=88=B7=E3=80=81=E7=B1=BB=E5=88=AB?= =?UTF-8?q?=E5=8F=8A=E6=8E=88=E6=9D=83=E7=AE=A1=E7=90=86=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=E5=88=9D=E5=A7=8B=E5=8C=96=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sqls/iot-standalone-data-mysql.sql | 323 +++++++++--------- .../sqls/iot-standalone-data-postgresql.sql | 322 ++++++++--------- 2 files changed, 322 insertions(+), 323 deletions(-) diff --git a/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-mysql.sql b/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-mysql.sql index fd16a72..73e3fe9 100644 --- a/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-mysql.sql +++ b/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-mysql.sql @@ -397,168 +397,167 @@ INSERT INTO `iot_mqtt_authority` (`authority_id`, `create_time`, `update_time`, -- ---------------------------- -- Table data for iot_mqtt_category_authority -- ---------------------------- -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('1', '1'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('1', '2'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('1', '3'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('1', '4'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('1', '5'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('1', '6'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('1', '7'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('1', '8'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('1', '9'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('1', '10'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('1', '12'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('1', '13'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('1', '14'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('1', '15'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('1', '16'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('1', '17'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('1', '18'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('1', '19'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('1', '20'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('1', '21'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('1', '22'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('1', '23'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('1', '24'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('1', '25'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('1', '26'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('1', '27'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('1', '28'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('1', '29'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('1', '30'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('1', '31'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('1', '32'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('1', '33'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('1', '34'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('1', '35'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('1', '36'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('1', '37'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('1', '38'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('1', '39'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('1', '40'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('2', '41'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('2', '42'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('2', '43'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('2', '44'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('2', '45'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('2', '46'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('2', '47'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('2', '48'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('2', '49'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('2', '50'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('2', '51'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('2', '53'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('2', '54'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('2', '55'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('2', '56'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('2', '57'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('2', '58'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('2', '59'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('2', '60'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('2', '61'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('2', '62'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('2', '63'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('2', '64'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('2', '65'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('2', '66'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('2', '67'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('2', '68'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('2', '69'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('2', '70'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('2', '71'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('2', '72'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('2', '73'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('2', '74'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('2', '75'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('2', '76'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('2', '77'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('2', '78'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('2', '79'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('2', '80'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('2', '81'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('2', '82'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('3', '83'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('3', '84'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('3', '85'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('3', '86'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('3', '87'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('3', '88'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('3', '89'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('3', '90'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('3', '91'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('3', '92'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('3', '93'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('3', '95'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('3', '96'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('3', '97'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('3', '98'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('3', '99'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('3', '100'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('3', '101'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('3', '102'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('3', '103'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('3', '104'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('3', '105'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('3', '106'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('3', '107'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('3', '108'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('3', '109'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('3', '110'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('3', '111'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('3', '112'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('3', '113'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('3', '114'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('3', '115'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('3', '116'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('3', '117'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('3', '118'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('3', '119'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('3', '120'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('3', '121'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('3', '122'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('3', '123'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('3', '124'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('4', '125'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('4', '126'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('4', '127'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('4', '128'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('4', '129'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('4', '130'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('4', '131'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('4', '132'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('4', '133'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('4', '134'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('4', '136'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('4', '137'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('4', '138'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('4', '139'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('4', '140'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('4', '141'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('4', '142'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('4', '143'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('4', '144'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('4', '145'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('4', '146'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('4', '147'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('4', '148'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('4', '149'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('4', '150'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('4', '151'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('4', '152'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('4', '153'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('4', '154'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('4', '155'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('4', '156'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('4', '157'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('4', '158'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('4', '159'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('4', '160'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('4', '161'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('4', '162'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('4', '163'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('4', '164'); -INSERT INTO `iot_mqtt_category_authority` (`category_id`, `authority_id`) VALUES ('5', '165'); - +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('1', '1'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('2', '1'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('3', '1'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('4', '1'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('5', '1'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('6', '1'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('7', '1'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('8', '1'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('9', '1'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('10', '1'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('12', '1'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('13', '1'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('14', '1'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('15', '1'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('16', '1'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('17', '1'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('18', '1'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('19', '1'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('20', '1'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('21', '1'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('22', '1'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('23', '1'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('24', '1'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('25', '1'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('26', '1'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('27', '1'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('28', '1'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('29', '1'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('30', '1'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('31', '1'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('32', '1'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('33', '1'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('34', '1'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('35', '1'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('36', '1'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('37', '1'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('38', '1'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('39', '1'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('40', '1'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('41', '2'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('42', '2'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('43', '2'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('44', '2'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('45', '2'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('46', '2'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('47', '2'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('48', '2'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('49', '2'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('50', '2'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('51', '2'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('53', '2'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('54', '2'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('55', '2'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('56', '2'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('57', '2'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('58', '2'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('59', '2'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('60', '2'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('61', '2'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('62', '2'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('63', '2'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('64', '2'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('65', '2'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('66', '2'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('67', '2'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('68', '2'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('69', '2'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('70', '2'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('71', '2'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('72', '2'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('73', '2'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('74', '2'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('75', '2'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('76', '2'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('77', '2'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('78', '2'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('79', '2'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('80', '2'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('81', '2'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('82', '2'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('83', '3'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('84', '3'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('85', '3'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('86', '3'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('87', '3'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('88', '3'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('89', '3'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('90', '3'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('91', '3'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('92', '3'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('93', '3'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('95', '3'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('96', '3'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('97', '3'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('98', '3'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('99', '3'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('100', '3'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('101', '3'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('102', '3'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('103', '3'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('104', '3'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('105', '3'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('106', '3'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('107', '3'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('108', '3'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('109', '3'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('110', '3'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('111', '3'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('112', '3'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('113', '3'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('114', '3'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('115', '3'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('116', '3'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('117', '3'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('118', '3'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('119', '3'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('120', '3'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('121', '3'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('122', '3'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('123', '3'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('124', '3'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('125', '4'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('126', '4'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('127', '4'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('128', '4'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('129', '4'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('130', '4'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('131', '4'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('132', '4'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('133', '4'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('134', '4'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('136', '4'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('137', '4'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('138', '4'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('139', '4'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('140', '4'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('141', '4'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('142', '4'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('143', '4'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('144', '4'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('145', '4'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('146', '4'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('147', '4'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('148', '4'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('149', '4'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('150', '4'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('151', '4'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('152', '4'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('153', '4'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('154', '4'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('155', '4'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('156', '4'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('157', '4'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('158', '4'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('159', '4'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('160', '4'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('161', '4'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('162', '4'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('163', '4'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('164', '4'); +INSERT INTO `iot_mqtt_authority_category` (`authority_id`, `category_id`) VALUES ('165', '5'); -- ---------------------------- -- Table data for sys_interface_authority diff --git a/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-postgresql.sql b/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-postgresql.sql index be68ac2..c80f1b2 100644 --- a/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-postgresql.sql +++ b/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-postgresql.sql @@ -398,167 +398,167 @@ INSERT INTO "iot_mqtt_authority" ("authority_id", "create_time", "update_time", -- ---------------------------- -- Table data for iot_mqtt_category_authority -- ---------------------------- -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('1', '1'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('1', '2'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('1', '3'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('1', '4'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('1', '5'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('1', '6'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('1', '7'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('1', '8'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('1', '9'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('1', '10'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('1', '12'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('1', '13'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('1', '14'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('1', '15'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('1', '16'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('1', '17'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('1', '18'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('1', '19'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('1', '20'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('1', '21'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('1', '22'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('1', '23'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('1', '24'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('1', '25'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('1', '26'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('1', '27'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('1', '28'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('1', '29'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('1', '30'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('1', '31'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('1', '32'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('1', '33'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('1', '34'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('1', '35'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('1', '36'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('1', '37'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('1', '38'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('1', '39'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('1', '40'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('2', '41'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('2', '42'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('2', '43'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('2', '44'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('2', '45'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('2', '46'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('2', '47'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('2', '48'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('2', '49'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('2', '50'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('2', '51'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('2', '53'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('2', '54'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('2', '55'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('2', '56'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('2', '57'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('2', '58'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('2', '59'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('2', '60'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('2', '61'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('2', '62'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('2', '63'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('2', '64'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('2', '65'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('2', '66'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('2', '67'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('2', '68'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('2', '69'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('2', '70'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('2', '71'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('2', '72'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('2', '73'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('2', '74'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('2', '75'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('2', '76'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('2', '77'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('2', '78'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('2', '79'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('2', '80'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('2', '81'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('2', '82'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('3', '83'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('3', '84'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('3', '85'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('3', '86'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('3', '87'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('3', '88'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('3', '89'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('3', '90'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('3', '91'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('3', '92'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('3', '93'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('3', '95'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('3', '96'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('3', '97'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('3', '98'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('3', '99'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('3', '100'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('3', '101'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('3', '102'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('3', '103'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('3', '104'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('3', '105'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('3', '106'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('3', '107'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('3', '108'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('3', '109'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('3', '110'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('3', '111'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('3', '112'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('3', '113'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('3', '114'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('3', '115'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('3', '116'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('3', '117'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('3', '118'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('3', '119'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('3', '120'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('3', '121'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('3', '122'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('3', '123'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('3', '124'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('4', '125'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('4', '126'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('4', '127'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('4', '128'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('4', '129'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('4', '130'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('4', '131'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('4', '132'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('4', '133'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('4', '134'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('4', '136'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('4', '137'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('4', '138'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('4', '139'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('4', '140'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('4', '141'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('4', '142'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('4', '143'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('4', '144'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('4', '145'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('4', '146'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('4', '147'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('4', '148'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('4', '149'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('4', '150'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('4', '151'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('4', '152'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('4', '153'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('4', '154'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('4', '155'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('4', '156'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('4', '157'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('4', '158'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('4', '159'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('4', '160'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('4', '161'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('4', '162'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('4', '163'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('4', '164'); -INSERT INTO "iot_mqtt_category_authority" ("category_id", "authority_id") VALUES ('5', '165'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('1', '1'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('2', '1'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('3', '1'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('4', '1'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('5', '1'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('6', '1'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('7', '1'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('8', '1'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('9', '1'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('10', '1'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('12', '1'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('13', '1'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('14', '1'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('15', '1'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('16', '1'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('17', '1'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('18', '1'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('19', '1'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('20', '1'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('21', '1'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('22', '1'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('23', '1'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('24', '1'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('25', '1'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('26', '1'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('27', '1'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('28', '1'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('29', '1'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('30', '1'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('31', '1'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('32', '1'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('33', '1'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('34', '1'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('35', '1'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('36', '1'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('37', '1'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('38', '1'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('39', '1'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('40', '1'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('41', '2'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('42', '2'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('43', '2'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('44', '2'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('45', '2'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('46', '2'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('47', '2'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('48', '2'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('49', '2'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('50', '2'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('51', '2'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('53', '2'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('54', '2'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('55', '2'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('56', '2'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('57', '2'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('58', '2'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('59', '2'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('60', '2'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('61', '2'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('62', '2'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('63', '2'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('64', '2'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('65', '2'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('66', '2'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('67', '2'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('68', '2'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('69', '2'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('70', '2'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('71', '2'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('72', '2'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('73', '2'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('74', '2'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('75', '2'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('76', '2'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('77', '2'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('78', '2'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('79', '2'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('80', '2'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('81', '2'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('82', '2'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('83', '3'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('84', '3'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('85', '3'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('86', '3'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('87', '3'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('88', '3'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('89', '3'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('90', '3'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('91', '3'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('92', '3'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('93', '3'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('95', '3'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('96', '3'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('97', '3'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('98', '3'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('99', '3'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('100', '3'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('101', '3'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('102', '3'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('103', '3'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('104', '3'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('105', '3'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('106', '3'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('107', '3'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('108', '3'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('109', '3'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('110', '3'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('111', '3'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('112', '3'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('113', '3'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('114', '3'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('115', '3'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('116', '3'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('117', '3'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('118', '3'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('119', '3'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('120', '3'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('121', '3'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('122', '3'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('123', '3'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('124', '3'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('125', '4'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('126', '4'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('127', '4'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('128', '4'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('129', '4'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('130', '4'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('131', '4'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('132', '4'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('133', '4'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('134', '4'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('136', '4'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('137', '4'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('138', '4'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('139', '4'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('140', '4'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('141', '4'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('142', '4'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('143', '4'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('144', '4'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('145', '4'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('146', '4'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('147', '4'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('148', '4'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('149', '4'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('150', '4'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('151', '4'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('152', '4'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('153', '4'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('154', '4'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('155', '4'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('156', '4'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('157', '4'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('158', '4'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('159', '4'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('160', '4'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('161', '4'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('162', '4'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('163', '4'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('164', '4'); +INSERT INTO "iot_mqtt_authority_category" ("authority_id", "category_id") VALUES ('165', '5'); -- ---------------------------- -- Table data for sys_interface_authority -- Gitee From 8c2128f047d0511629cedc0515a4d80f419b95f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=81=E5=8C=A0=E5=90=9B?= Date: Sat, 4 Jul 2026 11:34:06 +0800 Subject: [PATCH 10/24] =?UTF-8?q?[=E6=96=B0=E5=A2=9E]=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=20Mqtt=20=E8=B4=A6=E6=88=B7=E3=80=81=E7=B1=BB=E5=88=AB?= =?UTF-8?q?=E5=8F=8A=E6=8E=88=E6=9D=83=E7=AE=A1=E7=90=86=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=E5=88=9D=E5=A7=8B=E5=8C=96=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/sqls/iot-standalone-data-mysql.sql | 14 +++++++------- .../sqls/iot-standalone-data-postgresql.sql | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-mysql.sql b/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-mysql.sql index 73e3fe9..c2d638b 100644 --- a/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-mysql.sql +++ b/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-mysql.sql @@ -38,14 +38,14 @@ INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_b INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('e90fede1-ab1d-4bcd-b508-8f03a99a8086', '2026-04-21 15:58:57.588', '2026-04-21 15:59:56.091', 'system', 0, 'system', NULL, 1, b'1', 0, 'WEB', 'views/testing/iot-testing/oauth2-registration/Index.vue', b'0', 'MENU', b'1', b'1', 'mdi-monitor-lock', b'0', 'TESTING', 'OAuth2Registration', b'1', '4559b892-75b0-4a3d-9f2e-28927fc77d63', '/iot-testing/oauth2-registration', NULL, 'OAuth2动态注册测试'); INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('6408e0e7-726f-48cf-ad0f-336a4ca6f955', '2026-04-21 16:04:22.551', '2026-04-21 16:14:01.467', 'system', 0, 'system', NULL, 3, b'1', 0, 'WEB', 'views/testing/iot-testing/mqtt-registration/Index.vue', b'0', 'MENU', b'1', b'1', 'mdi-monitor-cellphone-star', b'0', 'TESTING', 'MqttRegistration', b'1', '4559b892-75b0-4a3d-9f2e-28927fc77d63', '/iot-testing/mqtt-registration', NULL, 'Mqtt动态注册测试'); INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('bf8c4daf-4e0c-4e09-9e14-18fbc6643904', '2026-04-21 16:05:47.076', '2026-04-21 16:06:01.686', 'system', 0, 'system', NULL, 4, b'1', 0, 'WEB', 'views/testing/iot-testing/mqtt-signature/Index.vue', b'0', 'MENU', b'1', b'1', 'mdi-monitor-edit', b'0', 'TESTING', 'MqttSignature', b'1', '4559b892-75b0-4a3d-9f2e-28927fc77d63', '/iot-testing/mqtt-signature', NULL, 'Mqtt签名认证测试'); -INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('d8b88ff6-b41c-4db9-86bb-d7fb416586ba', '2026-07-03 15:03:18.311', '2026-07-03 15:03:18.311', 'system', 0, 'system', NULL, 3, b'1', 0, 'WEB', 'views/pages/iot/mqtt-account/Index.vue', b'0', 'MENU', b'1', b'1', 'mdi-link-variant', b'0', 'APP', 'MqttAccount', b'1', 'f7527762-16f9-429c-a82f-696862633fef', '/things/mqtt-account', NULL, '终端账号管理'); -INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('024b8aab-7a8d-4aa9-8dc2-1c6842e01757', '2026-07-03 15:04:50.941', '2026-07-03 15:04:50.941', 'system', 0, 'system', NULL, 2, b'1', 0, 'WEB', 'views/pages/iot/mqtt-account/Authorize.vue', b'1', 'MENU', b'0', b'0', 'mdi-shield-link-variant', b'0', 'APP', 'MqttAccountAuthorize', b'1', 'd8b88ff6-b41c-4db9-86bb-d7fb416586ba', '/things/mqtt-account/authorize', NULL, '终端账号分类'); +INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('d8b88ff6-b41c-4db9-86bb-d7fb416586ba', '2026-07-03 15:03:18.311', '2026-07-03 15:03:18.311', 'system', 0, 'system', NULL, 3, b'1', 0, 'WEB', 'views/pages/iot/mqtt-account/Index.vue', b'0', 'MENU', b'1', b'1', 'mdi-link-variant', b'0', 'APP', 'ThingsMqttAccount', b'1', 'f7527762-16f9-429c-a82f-696862633fef', '/things/mqtt-account', NULL, '终端账号管理'); +INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('024b8aab-7a8d-4aa9-8dc2-1c6842e01757', '2026-07-03 15:04:50.941', '2026-07-03 15:04:50.941', 'system', 0, 'system', NULL, 2, b'1', 0, 'WEB', 'views/pages/iot/mqtt-account/Authorize.vue', b'1', 'MENU', b'0', b'0', 'mdi-shield-link-variant', b'0', 'APP', 'ThingsMqttAccountAuthorize', b'1', 'd8b88ff6-b41c-4db9-86bb-d7fb416586ba', '/things/mqtt-account/authorize', NULL, '终端账号分类'); INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('f7527762-16f9-429c-a82f-696862633fef', '2026-07-03 14:53:53.809', '2026-07-03 14:53:53.809', 'system', 0, 'system', NULL, 10, b'1', 0, 'WEB', 'views/layouts/Index.vue', b'0', 'MENU', b'1', b'0', 'mdi-office-building-cog', b'0', 'APP', NULL, b'1', NULL, '/things', '/things/mqtt-category', '物联平台管理'); -INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('f5212952-c46d-423d-b185-954f0652c17d', '2026-07-03 14:55:14.721', '2026-07-03 14:55:14.721', 'system', 0, 'system', NULL, 1, b'1', 0, 'WEB', 'views/pages/iot/mqtt-category/Index.vue', b'0', 'MENU', b'1', b'1', 'mdi-message-bulleted', b'0', 'APP', 'MqttCategory', b'1', 'f7527762-16f9-429c-a82f-696862633fef', '/things/mqtt-category', NULL, '主题类别管理'); -INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('31b4a5ab-6861-4cf4-926e-ae1b6cefd5d0', '2026-07-03 14:57:22.063', '2026-07-03 14:57:22.063', 'system', 0, 'system', NULL, 1, b'1', 0, 'WEB', 'views/pages/iot/mqtt-category/Content.vue', b'1', 'MENU', b'0', b'0', 'mdi-message-draw', b'0', 'APP', 'MqttCategoryContent', b'1', 'f5212952-c46d-423d-b185-954f0652c17d', '/things/mqtt-category/content', NULL, '主题类别详情'); -INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('c499066e-5d36-4260-a3fa-e9be0b07f374', '2026-07-03 14:59:10.223', '2026-07-03 14:59:10.223', 'system', 0, 'system', NULL, 2, b'1', 0, 'WEB', 'views/pages/iot/mqtt-authority/Index.vue', b'0', 'MENU', b'1', b'1', 'mdi-link', b'0', 'APP', 'MqttAuthority', b'1', 'f7527762-16f9-429c-a82f-696862633fef', '/things/mqtt-authority', NULL, '主题权限管理'); -INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('33353926-fef2-4272-82d0-762aed89fc6e', '2026-07-03 15:00:28.812', '2026-07-03 15:00:28.812', 'system', 0, 'system', NULL, 1, b'1', 0, 'WEB', 'views/pages/iot/mqtt-authority/Content.vue', b'1', 'MENU', b'0', b'0', 'mdi-link-edit', b'0', 'APP', 'MqttAuthorityContent', b'1', 'c499066e-5d36-4260-a3fa-e9be0b07f374', '/things/mqtt-authority/content', NULL, '主题权限详情'); -INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('146512ac-c7e6-41f6-822d-886840baaeeb', '2026-07-03 15:01:25.771', '2026-07-03 15:01:45.351', 'system', 0, 'system', NULL, 2, b'1', 0, 'WEB', 'views/pages/iot/mqtt-authority/Authorize.vue', b'1', 'MENU', b'0', b'0', 'mdi-link-lock', b'0', 'APP', 'MqttAuthorityAuthorize', b'1', 'c499066e-5d36-4260-a3fa-e9be0b07f374', '/things/mqtt-authority/authorize', NULL, '主题权限授权'); +INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('f5212952-c46d-423d-b185-954f0652c17d', '2026-07-03 14:55:14.721', '2026-07-03 14:55:14.721', 'system', 0, 'system', NULL, 1, b'1', 0, 'WEB', 'views/pages/iot/mqtt-category/Index.vue', b'0', 'MENU', b'1', b'1', 'mdi-message-bulleted', b'0', 'APP', 'ThingsMqttCategory', b'1', 'f7527762-16f9-429c-a82f-696862633fef', '/things/mqtt-category', NULL, '主题类别管理'); +INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('31b4a5ab-6861-4cf4-926e-ae1b6cefd5d0', '2026-07-03 14:57:22.063', '2026-07-03 14:57:22.063', 'system', 0, 'system', NULL, 1, b'1', 0, 'WEB', 'views/pages/iot/mqtt-category/Content.vue', b'1', 'MENU', b'0', b'0', 'mdi-message-draw', b'0', 'APP', 'ThingsMqttCategoryContent', b'1', 'f5212952-c46d-423d-b185-954f0652c17d', '/things/mqtt-category/content', NULL, '主题类别详情'); +INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('c499066e-5d36-4260-a3fa-e9be0b07f374', '2026-07-03 14:59:10.223', '2026-07-03 14:59:10.223', 'system', 0, 'system', NULL, 2, b'1', 0, 'WEB', 'views/pages/iot/mqtt-authority/Index.vue', b'0', 'MENU', b'1', b'1', 'mdi-link', b'0', 'APP', 'ThingsMqttAuthority', b'1', 'f7527762-16f9-429c-a82f-696862633fef', '/things/mqtt-authority', NULL, '主题权限管理'); +INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('33353926-fef2-4272-82d0-762aed89fc6e', '2026-07-03 15:00:28.812', '2026-07-03 15:00:28.812', 'system', 0, 'system', NULL, 1, b'1', 0, 'WEB', 'views/pages/iot/mqtt-authority/Content.vue', b'1', 'MENU', b'0', b'0', 'mdi-link-edit', b'0', 'APP', 'ThingsMqttAuthorityContent', b'1', 'c499066e-5d36-4260-a3fa-e9be0b07f374', '/things/mqtt-authority/content', NULL, '主题权限详情'); +INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('146512ac-c7e6-41f6-822d-886840baaeeb', '2026-07-03 15:01:25.771', '2026-07-03 15:01:45.351', 'system', 0, 'system', NULL, 2, b'1', 0, 'WEB', 'views/pages/iot/mqtt-authority/Authorize.vue', b'1', 'MENU', b'0', b'0', 'mdi-link-lock', b'0', 'APP', 'ThingsMqttAuthorityAuthorize', b'1', 'c499066e-5d36-4260-a3fa-e9be0b07f374', '/things/mqtt-authority/authorize', NULL, '主题权限授权'); -- ---------------------------- -- Table data for sys_element_role diff --git a/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-postgresql.sql b/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-postgresql.sql index c80f1b2..70e83b8 100644 --- a/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-postgresql.sql +++ b/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-postgresql.sql @@ -38,14 +38,14 @@ INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_b INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('e90fede1-ab1d-4bcd-b508-8f03a99a8086', '2026-04-21 15:58:57.588', '2026-04-21 15:59:56.091', 'system', 0, 'system', NULL, 1, 't', 0, 'WEB', 'views/testing/iot-testing/oauth2-registration/Index.vue', 'f', 'MENU', 't', 't', 'mdi-monitor-lock', 'f', 'TESTING', 'OAuth2Registration', 't', '4559b892-75b0-4a3d-9f2e-28927fc77d63', '/iot-testing/oauth2-registration', NULL, 'OAuth2动态注册测试'); INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('6408e0e7-726f-48cf-ad0f-336a4ca6f955', '2026-04-21 16:04:22.551', '2026-04-21 16:14:01.467', 'system', 0, 'system', NULL, 3, 't', 0, 'WEB', 'views/testing/iot-testing/mqtt-registration/Index.vue', 'f', 'MENU', 't', 't', 'mdi-monitor-cellphone-star', 'f', 'TESTING', 'MqttRegistration', 't', '4559b892-75b0-4a3d-9f2e-28927fc77d63', '/iot-testing/mqtt-registration', NULL, 'Mqtt动态注册测试'); INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('bf8c4daf-4e0c-4e09-9e14-18fbc6643904', '2026-04-21 16:05:47.076', '2026-04-21 16:06:01.686', 'system', 0, 'system', NULL, 4, 't', 0, 'WEB', 'views/testing/iot-testing/mqtt-signature/Index.vue', 'f', 'MENU', 't', 't', 'mdi-monitor-edit', 'f', 'TESTING', 'MqttSignature', 't', '4559b892-75b0-4a3d-9f2e-28927fc77d63', '/iot-testing/mqtt-signature', NULL, 'Mqtt签名认证测试'); -INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('d8b88ff6-b41c-4db9-86bb-d7fb416586ba', '2026-07-03 15:03:18.311', '2026-07-03 15:03:18.311', 'system', 0, 'system', NULL, 3, 't', 0, 'WEB', 'views/pages/iot/mqtt-account/Index.vue', 'f', 'MENU', 't', 't', 'mdi-link-variant', 'f', 'APP', 'MqttAccount', 't', 'f7527762-16f9-429c-a82f-696862633fef', '/things/mqtt-account', NULL, '终端账号管理'); -INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('024b8aab-7a8d-4aa9-8dc2-1c6842e01757', '2026-07-03 15:04:50.941', '2026-07-03 15:04:50.941', 'system', 0, 'system', NULL, 2, 't', 0, 'WEB', 'views/pages/iot/mqtt-account/Authorize.vue', 't', 'MENU', 'f', 'f', 'mdi-shield-link-variant', 'f', 'APP', 'MqttAccountAuthorize', 't', 'd8b88ff6-b41c-4db9-86bb-d7fb416586ba', '/things/mqtt-account/authorize', NULL, '终端账号分类'); +INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('d8b88ff6-b41c-4db9-86bb-d7fb416586ba', '2026-07-03 15:03:18.311', '2026-07-03 15:03:18.311', 'system', 0, 'system', NULL, 3, 't', 0, 'WEB', 'views/pages/iot/mqtt-account/Index.vue', 'f', 'MENU', 't', 't', 'mdi-link-variant', 'f', 'APP', 'ThingsMqttAccount', 't', 'f7527762-16f9-429c-a82f-696862633fef', '/things/mqtt-account', NULL, '终端账号管理'); +INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('024b8aab-7a8d-4aa9-8dc2-1c6842e01757', '2026-07-03 15:04:50.941', '2026-07-03 15:04:50.941', 'system', 0, 'system', NULL, 2, 't', 0, 'WEB', 'views/pages/iot/mqtt-account/Authorize.vue', 't', 'MENU', 'f', 'f', 'mdi-shield-link-variant', 'f', 'APP', 'ThingsMqttAccountAuthorize', 't', 'd8b88ff6-b41c-4db9-86bb-d7fb416586ba', '/things/mqtt-account/authorize', NULL, '终端账号分类'); INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('f7527762-16f9-429c-a82f-696862633fef', '2026-07-03 14:53:53.809', '2026-07-03 14:53:53.809', 'system', 0, 'system', NULL, 10, 't', 0, 'WEB', 'views/layouts/Index.vue', 'f', 'MENU', 't', 'f', 'mdi-office-building-cog', 'f', 'APP', NULL, 't', NULL, '/things', '/things/mqtt-category', '物联平台管理'); -INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('f5212952-c46d-423d-b185-954f0652c17d', '2026-07-03 14:55:14.721', '2026-07-03 14:55:14.721', 'system', 0, 'system', NULL, 1, 't', 0, 'WEB', 'views/pages/iot/mqtt-category/Index.vue', 'f', 'MENU', 't', 't', 'mdi-message-bulleted', 'f', 'APP', 'MqttCategory', 't', 'f7527762-16f9-429c-a82f-696862633fef', '/things/mqtt-category', NULL, '主题类别管理'); -INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('31b4a5ab-6861-4cf4-926e-ae1b6cefd5d0', '2026-07-03 14:57:22.063', '2026-07-03 14:57:22.063', 'system', 0, 'system', NULL, 1, 't', 0, 'WEB', 'views/pages/iot/mqtt-category/Content.vue', 't', 'MENU', 'f', 'f', 'mdi-message-draw', 'f', 'APP', 'MqttCategoryContent', 't', 'f5212952-c46d-423d-b185-954f0652c17d', '/things/mqtt-category/content', NULL, '主题类别详情'); -INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('c499066e-5d36-4260-a3fa-e9be0b07f374', '2026-07-03 14:59:10.223', '2026-07-03 14:59:10.223', 'system', 0, 'system', NULL, 2, 't', 0, 'WEB', 'views/pages/iot/mqtt-authority/Index.vue', 'f', 'MENU', 't', 't', 'mdi-link', 'f', 'APP', 'MqttAuthority', 't', 'f7527762-16f9-429c-a82f-696862633fef', '/things/mqtt-authority', NULL, '主题权限管理'); -INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('33353926-fef2-4272-82d0-762aed89fc6e', '2026-07-03 15:00:28.812', '2026-07-03 15:00:28.812', 'system', 0, 'system', NULL, 1, 't', 0, 'WEB', 'views/pages/iot/mqtt-authority/Content.vue', 't', 'MENU', 'f', 'f', 'mdi-link-edit', 'f', 'APP', 'MqttAuthorityContent', 't', 'c499066e-5d36-4260-a3fa-e9be0b07f374', '/things/mqtt-authority/content', NULL, '主题权限详情'); -INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('146512ac-c7e6-41f6-822d-886840baaeeb', '2026-07-03 15:01:25.771', '2026-07-03 15:01:45.351', 'system', 0, 'system', NULL, 2, 't', 0, 'WEB', 'views/pages/iot/mqtt-authority/Authorize.vue', 't', 'MENU', 'f', 'f', 'mdi-link-lock', 'f', 'APP', 'MqttAuthorityAuthorize', 't', 'c499066e-5d36-4260-a3fa-e9be0b07f374', '/things/mqtt-authority/authorize', NULL, '主题权限授权'); +INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('f5212952-c46d-423d-b185-954f0652c17d', '2026-07-03 14:55:14.721', '2026-07-03 14:55:14.721', 'system', 0, 'system', NULL, 1, 't', 0, 'WEB', 'views/pages/iot/mqtt-category/Index.vue', 'f', 'MENU', 't', 't', 'mdi-message-bulleted', 'f', 'APP', 'ThingsMqttCategory', 't', 'f7527762-16f9-429c-a82f-696862633fef', '/things/mqtt-category', NULL, '主题类别管理'); +INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('31b4a5ab-6861-4cf4-926e-ae1b6cefd5d0', '2026-07-03 14:57:22.063', '2026-07-03 14:57:22.063', 'system', 0, 'system', NULL, 1, 't', 0, 'WEB', 'views/pages/iot/mqtt-category/Content.vue', 't', 'MENU', 'f', 'f', 'mdi-message-draw', 'f', 'APP', 'ThingsMqttCategoryContent', 't', 'f5212952-c46d-423d-b185-954f0652c17d', '/things/mqtt-category/content', NULL, '主题类别详情'); +INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('c499066e-5d36-4260-a3fa-e9be0b07f374', '2026-07-03 14:59:10.223', '2026-07-03 14:59:10.223', 'system', 0, 'system', NULL, 2, 't', 0, 'WEB', 'views/pages/iot/mqtt-authority/Index.vue', 'f', 'MENU', 't', 't', 'mdi-link', 'f', 'APP', 'ThingsMqttAuthority', 't', 'f7527762-16f9-429c-a82f-696862633fef', '/things/mqtt-authority', NULL, '主题权限管理'); +INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('33353926-fef2-4272-82d0-762aed89fc6e', '2026-07-03 15:00:28.812', '2026-07-03 15:00:28.812', 'system', 0, 'system', NULL, 1, 't', 0, 'WEB', 'views/pages/iot/mqtt-authority/Content.vue', 't', 'MENU', 'f', 'f', 'mdi-link-edit', 'f', 'APP', 'ThingsMqttAuthorityContent', 't', 'c499066e-5d36-4260-a3fa-e9be0b07f374', '/things/mqtt-authority/content', NULL, '主题权限详情'); +INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('146512ac-c7e6-41f6-822d-886840baaeeb', '2026-07-03 15:01:25.771', '2026-07-03 15:01:45.351', 'system', 0, 'system', NULL, 2, 't', 0, 'WEB', 'views/pages/iot/mqtt-authority/Authorize.vue', 't', 'MENU', 'f', 'f', 'mdi-link-lock', 'f', 'APP', 'ThingsMqttAuthorityAuthorize', 't', 'c499066e-5d36-4260-a3fa-e9be0b07f374', '/things/mqtt-authority/authorize', NULL, '主题权限授权'); -- ---------------------------- -- Table data for sys_element_role -- Gitee From ba6610e6869031c2b350ae19e45ec69cc6dbbfe4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=81=E5=8C=A0=E5=90=9B?= Date: Sat, 4 Jul 2026 17:07:38 +0800 Subject: [PATCH 11/24] =?UTF-8?q?[=E6=96=B0=E5=A2=9E]=20Mqtt=20Account=20?= =?UTF-8?q?=E5=AE=9E=E4=BD=93=E6=96=B0=E5=A2=9E=E7=B4=A2=E5=BC=95=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=EF=BC=8C=E4=BB=A5=E6=8F=90=E5=8D=87=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E6=95=88=E7=8E=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../persistence/jpa/logic/entity/HerodotusMqttAccount.java | 1 + .../rest/controller/servlet/MqttCategoryController.java | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/logic/entity/HerodotusMqttAccount.java b/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/logic/entity/HerodotusMqttAccount.java index 59e9df6..698377a 100644 --- a/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/logic/entity/HerodotusMqttAccount.java +++ b/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/logic/entity/HerodotusMqttAccount.java @@ -49,6 +49,7 @@ import java.util.Set; @Table(name = "iot_mqtt_account", indexes = { @Index(name = "iot_mqtt_account_id_idx", columnList = "account_id"), @Index(name = "iot_mqtt_account_did_idx", columnList = "client_id"), + @Index(name = "iot_mqtt_account_un_idx", columnList = "username"), }) @Cacheable @org.hibernate.annotations.Cache(usage = CacheConcurrencyStrategy.READ_WRITE, region = PersistenceConstants.REGION_IOT_MQTT_ACCOUNT) diff --git a/thingsbrain-platform/thingsbrain-platform-rest/src/main/java/cn/herodotus/thingsbrain/platform/rest/controller/servlet/MqttCategoryController.java b/thingsbrain-platform/thingsbrain-platform-rest/src/main/java/cn/herodotus/thingsbrain/platform/rest/controller/servlet/MqttCategoryController.java index 6aece18..1642dc0 100644 --- a/thingsbrain-platform/thingsbrain-platform-rest/src/main/java/cn/herodotus/thingsbrain/platform/rest/controller/servlet/MqttCategoryController.java +++ b/thingsbrain-platform/thingsbrain-platform-rest/src/main/java/cn/herodotus/thingsbrain/platform/rest/controller/servlet/MqttCategoryController.java @@ -80,11 +80,9 @@ public class MqttCategoryController extends AbstractEntityWriteAndPageController @Parameters({ @Parameter(name = "pageNumber", required = true, description = "当前页码"), @Parameter(name = "pageSize", required = true, description = "每页显示数量"), - @Parameter(name = "topic", description = "Mqtt主题"), + @Parameter(name = "area", description = "Mqtt主题使用区域(索引数字值)"), @Parameter(name = "action", description = "Mqtt主题操作(索引数字值)"), - @Parameter(name = "permission", description = "Mqtt主题权限(索引数字值)"), - @Parameter(name = "qos", description = "Mqtt 主题 Qos(索引数字值)"), - @Parameter(name = "retain", description = "是否为保留主题"), + @Parameter(name = "purpose", description = "Mqtt主题用途(索引数字值)"), }) @GetMapping("/condition") public Result> findByCondition( -- Gitee From a38c11652042049ca2cd4515e6a521236a395cf2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=81=E5=8C=A0=E5=90=9B?= Date: Sat, 4 Jul 2026 21:40:18 +0800 Subject: [PATCH 12/24] =?UTF-8?q?[=E4=BC=98=E5=8C=96]=20=E8=A1=A5=E5=85=85?= =?UTF-8?q?=E5=89=8D=E7=AB=AF=E9=9C=80=E8=A6=81=E5=B1=95=E7=A4=BA=E7=9A=84?= =?UTF-8?q?=20Enum=20=E5=AD=97=E5=85=B8=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../customizer/PlatformEnumDictionaryBuilderCustomizer.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/thingsbrain-platform/thingsbrain-platform-autoconfigure/src/main/java/cn/herodotus/thingsbrain/platform/autoconfigure/customizer/PlatformEnumDictionaryBuilderCustomizer.java b/thingsbrain-platform/thingsbrain-platform-autoconfigure/src/main/java/cn/herodotus/thingsbrain/platform/autoconfigure/customizer/PlatformEnumDictionaryBuilderCustomizer.java index 3ea305c..84c0da6 100644 --- a/thingsbrain-platform/thingsbrain-platform-autoconfigure/src/main/java/cn/herodotus/thingsbrain/platform/autoconfigure/customizer/PlatformEnumDictionaryBuilderCustomizer.java +++ b/thingsbrain-platform/thingsbrain-platform-autoconfigure/src/main/java/cn/herodotus/thingsbrain/platform/autoconfigure/customizer/PlatformEnumDictionaryBuilderCustomizer.java @@ -27,6 +27,8 @@ package cn.herodotus.thingsbrain.platform.autoconfigure.customizer; import cn.herodotus.dante.core.builder.EnumDictionaryBuilder; import cn.herodotus.dante.core.function.EnumDictionaryBuilderCustomizer; +import cn.herodotus.thingsbrain.kernel.commons.enums.AuthType; +import cn.herodotus.thingsbrain.kernel.commons.enums.Qos; import cn.herodotus.thingsbrain.kernel.tsl.enums.*; import cn.herodotus.thingsbrain.persistence.commons.enums.*; @@ -53,5 +55,8 @@ public class PlatformEnumDictionaryBuilderCustomizer implements EnumDictionaryBu builder.append(AuthenticationMode.getDictionaries()); builder.append(Area.getDictionaries()); builder.append(Purpose.getDictionaries()); + builder.append(AuthType.getDictionaries()); + builder.append(Qos.getDictionaries()); + builder.append(Retain.getDictionaries()); } } -- Gitee From bd76f35f4b205439137d7394aa24dcf2fb98709b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=81=E5=8C=A0=E5=90=9B?= Date: Sat, 4 Jul 2026 21:45:00 +0800 Subject: [PATCH 13/24] =?UTF-8?q?[=E6=96=B0=E5=A2=9E]=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=20Mqtt=20=E8=B4=A6=E6=88=B7=E3=80=81=E7=B1=BB=E5=88=AB?= =?UTF-8?q?=E5=8F=8A=E6=8E=88=E6=9D=83=E7=AE=A1=E7=90=86=20REST=20?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/servlet/MqttCategoryController.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/thingsbrain-platform/thingsbrain-platform-rest/src/main/java/cn/herodotus/thingsbrain/platform/rest/controller/servlet/MqttCategoryController.java b/thingsbrain-platform/thingsbrain-platform-rest/src/main/java/cn/herodotus/thingsbrain/platform/rest/controller/servlet/MqttCategoryController.java index 1642dc0..8db30d3 100644 --- a/thingsbrain-platform/thingsbrain-platform-rest/src/main/java/cn/herodotus/thingsbrain/platform/rest/controller/servlet/MqttCategoryController.java +++ b/thingsbrain-platform/thingsbrain-platform-rest/src/main/java/cn/herodotus/thingsbrain/platform/rest/controller/servlet/MqttCategoryController.java @@ -46,6 +46,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; +import java.util.List; import java.util.Map; /** @@ -95,4 +96,16 @@ public class MqttCategoryController extends AbstractEntityWriteAndPageController Page pages = mqttCategoryService.findByCondition(pageNumber, pageSize, Area.parse(area), Action.parse(action), Purpose.parse(purpose)); return resultFromPage(pages); } + + @AccessLimited + @Operation(summary = "获取全部Mqtt主题类别", description = "获取全部Mqtt主题类别数据列表", + responses = { + @ApiResponse(description = "全部数据列表", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, schema = @Schema(implementation = Result.class))), + @ApiResponse(responseCode = "500", description = "查询失败") + }) + @GetMapping("/list") + public Result> findAll() { + List sysAuthorities = mqttCategoryService.findAll(); + return result(sysAuthorities); + } } -- Gitee From c58234e2a79782faf7be12545c275053beea3be7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=81=E5=8C=A0=E5=90=9B?= Date: Sat, 4 Jul 2026 21:59:52 +0800 Subject: [PATCH 14/24] =?UTF-8?q?[=E6=96=B0=E5=A2=9E]=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=20Mqtt=20=E8=B4=A6=E6=88=B7=E3=80=81=E7=B1=BB=E5=88=AB?= =?UTF-8?q?=E5=8F=8A=E6=8E=88=E6=9D=83=E7=AE=A1=E7=90=86=20REST=20?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rest/controller/servlet/MqttAuthorityController.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/thingsbrain-platform/thingsbrain-platform-rest/src/main/java/cn/herodotus/thingsbrain/platform/rest/controller/servlet/MqttAuthorityController.java b/thingsbrain-platform/thingsbrain-platform-rest/src/main/java/cn/herodotus/thingsbrain/platform/rest/controller/servlet/MqttAuthorityController.java index d6a6aa7..7c1ea2a 100644 --- a/thingsbrain-platform/thingsbrain-platform-rest/src/main/java/cn/herodotus/thingsbrain/platform/rest/controller/servlet/MqttAuthorityController.java +++ b/thingsbrain-platform/thingsbrain-platform-rest/src/main/java/cn/herodotus/thingsbrain/platform/rest/controller/servlet/MqttAuthorityController.java @@ -102,12 +102,12 @@ public class MqttAuthorityController extends AbstractEntityWriteAndPageControlle requestBody = @io.swagger.v3.oas.annotations.parameters.RequestBody(content = @Content(mediaType = MediaType.APPLICATION_FORM_URLENCODED_VALUE)), responses = {@ApiResponse(description = "已分配权限的Mqtt主题权限数据", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE))}) @Parameters({ - @Parameter(name = "id", required = true, description = "Mqtt主题类别ID"), - @Parameter(name = "authorities[]", required = true, description = "Mqtt主题权限对象组成的数组") + @Parameter(name = "id", required = true, description = "Mqtt主题权限ID"), + @Parameter(name = "categories[]", required = true, description = "Mqtt主题类别组成的数组") }) @PutMapping - public Result assign(@RequestParam(name = "id") String id, @RequestParam(name = "authorities[]") String[] authorities) { - MqttAuthority mqttAuthority = mqttAuthorityService.assign(id, authorities); + public Result assign(@RequestParam(name = "id") String id, @RequestParam(name = "categories[]") String[] categories) { + MqttAuthority mqttAuthority = mqttAuthorityService.assign(id, categories); return result(mqttAuthority); } } -- Gitee From 2c47af415f73a14c836f60fdfafd51461ae9915d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=81=E5=8C=A0=E5=90=9B?= Date: Sat, 4 Jul 2026 22:01:36 +0800 Subject: [PATCH 15/24] =?UTF-8?q?[=E6=96=B0=E5=A2=9E]=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=20Mqtt=20=E8=B4=A6=E6=88=B7=E3=80=81=E7=B1=BB=E5=88=AB?= =?UTF-8?q?=E5=8F=8A=E6=8E=88=E6=9D=83=E7=AE=A1=E7=90=86=20REST=20?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/sqls/iot-standalone-data-mysql.sql | 2 +- .../src/main/resources/sqls/iot-standalone-data-postgresql.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-mysql.sql b/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-mysql.sql index c2d638b..03d6307 100644 --- a/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-mysql.sql +++ b/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-mysql.sql @@ -27,7 +27,7 @@ INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_b INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('22fd4a47-a12c-49a8-b041-3c5f4b6b788a', '2024-08-16 11:50:30.373', '2024-08-16 11:57:51.287', 'system', 0, 'system', NULL, 1, b'1', 0, 'WEB', 'views/pages/iot/product-category/Index.vue', b'0', 'MENU', b'1', b'1', 'mdi-format-list-checks', b'0', 'APP', 'IotProductCategory', b'1', '7f51cd60-3b17-4f0f-a46a-19028d0c2294', '/iot/product-category', NULL, '品类管理'); INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('f52e614a-b466-4958-889a-e037495d925c', '2024-08-16 11:51:49.706', '2024-08-16 11:58:06.262', 'system', 0, 'system', NULL, 1, b'1', 0, 'WEB', 'views/pages/iot/product-category/Content.vue', b'1', 'MENU', b'0', b'0', 'mdi-clipboard-list', b'0', 'APP', 'IotProductCategoryContent', b'1', '22fd4a47-a12c-49a8-b041-3c5f4b6b788a', '/iot/product-category/content', NULL, '分类详情'); INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('017ca0e8-1f30-4230-8602-12b6e95b502d', '2024-08-16 11:53:08.993', '2024-08-16 12:01:27.068', 'system', 0, 'system', NULL, 2, b'1', 0, 'WEB', 'views/pages/iot/product/Index.vue', b'0', 'MENU', b'1', b'1', 'mdi-cube', b'0', 'APP', 'IotProduct', b'1', '7f51cd60-3b17-4f0f-a46a-19028d0c2294', '/iot/product', NULL, '产品管理'); -INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('7f51cd60-3b17-4f0f-a46a-19028d0c2294', '2024-08-16 11:46:38.873', '2024-08-16 12:02:22.513', 'system', 0, 'system', NULL, 9, b'1', 0, 'WEB', 'views/layouts/Index.vue', b'0', 'MENU', b'1', b'0', 'mdi-drag-variant', b'0', 'APP', '', b'1', NULL, '/iot', '/iot/product-category', '万物互联管理'); +INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('7f51cd60-3b17-4f0f-a46a-19028d0c2294', '2024-08-16 11:46:38.873', '2024-08-16 12:02:22.513', 'system', 0, 'system', NULL, 9, b'1', 0, 'WEB', 'views/layouts/Index.vue', b'0', 'MENU', b'1', b'0', 'mdi-drag-variant', b'0', 'APP', '', b'1', NULL, '/iot', '/iot/product-category', '物联设备管理'); INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('52be4bb7-9d4c-42fd-8ae7-9efc4ce1c029', '2024-08-30 22:58:28.829', '2024-08-30 22:58:43.313', 'system', 0, 'system', NULL, 0, b'1', 0, 'WEB', 'views/pages/iot/product/Info.vue', b'1', 'MENU', b'0', b'0', 'mdi-cube-send', b'0', 'APP', 'IotProductInfo', b'1', '017ca0e8-1f30-4230-8602-12b6e95b502d', '/iot/product/info', NULL, '产品信息'); INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('3e88d6e3-b97d-48eb-b4d4-c2ac1cf444b8', '2024-08-30 22:59:41.313', '2024-08-30 23:00:01.473', 'system', 0, 'system', NULL, 0, b'1', 0, 'WEB', 'views/pages/iot/device/Info.vue', b'1', 'MENU', b'0', b'0', 'mdi-network-pos', b'0', 'APP', 'IotDeviceInfo', b'1', 'b827346f-494d-4044-8bc9-0ef33f7e9d45', '/iot/device/info', NULL, '设备信息'); INSERT INTO `sys_element` (`element_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `application_type`, `component`, `detail_content`, `element_category`, `have_child`, `hide_all_child`, `icon`, `ignore_auth`, `menu_scenario`, `name`, `not_keep_alive`, `parent_id`, `path`, `redirect`, `title`) VALUES ('310a9900-400d-43cf-9e3b-e262c61a5cd5', '2024-11-12 22:13:21.626', '2024-11-12 22:17:00.299', 'system', 0, 'system', NULL, 3, b'1', 0, 'WEB', 'views/pages/iot/device/Setup.vue', b'1', 'MENU', b'0', b'0', 'mdi-cog-transfer-outline', b'0', 'APP', 'IotDeviceSetup', b'1', 'b827346f-494d-4044-8bc9-0ef33f7e9d45', '/iot/device/setup', NULL, '设置属性'); diff --git a/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-postgresql.sql b/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-postgresql.sql index 70e83b8..1513eb2 100644 --- a/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-postgresql.sql +++ b/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-postgresql.sql @@ -27,7 +27,7 @@ INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_b INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('22fd4a47-a12c-49a8-b041-3c5f4b6b788a', '2024-08-16 11:50:30.373', '2024-08-16 11:57:51.287', 'system', 0, 'system', NULL, 1, 't', 0, 'WEB', 'views/pages/iot/product-category/Index.vue', 'f', 'MENU', 't', 't', 'mdi-format-list-checks', 'f', 'APP', 'IotProductCategory', 't', '7f51cd60-3b17-4f0f-a46a-19028d0c2294', '/iot/product-category', NULL, '品类管理'); INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('f52e614a-b466-4958-889a-e037495d925c', '2024-08-16 11:51:49.706', '2024-08-16 11:58:06.262', 'system', 0, 'system', NULL, 1, 't', 0, 'WEB', 'views/pages/iot/product-category/Content.vue', 't', 'MENU', 'f', 'f', 'mdi-clipboard-list', 'f', 'APP', 'IotProductCategoryContent', 't', '22fd4a47-a12c-49a8-b041-3c5f4b6b788a', '/iot/product-category/content', NULL, '分类详情'); INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('017ca0e8-1f30-4230-8602-12b6e95b502d', '2024-08-16 11:53:08.993', '2024-08-16 12:01:27.068', 'system', 0, 'system', NULL, 2, 't', 0, 'WEB', 'views/pages/iot/product/Index.vue', 'f', 'MENU', 't', 't', 'mdi-cube', 'f', 'APP', 'IotProduct', 't', '7f51cd60-3b17-4f0f-a46a-19028d0c2294', '/iot/product', NULL, '产品管理'); -INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('7f51cd60-3b17-4f0f-a46a-19028d0c2294', '2024-08-16 11:46:38.873', '2024-08-16 12:02:22.513', 'system', 0, 'system', NULL, 9, 't', 0, 'WEB', 'views/layouts/Index.vue', 'f', 'MENU', 't', 'f', 'mdi-drag-variant', 'f', 'APP', '', 't', NULL, '/iot', '/iot/product-category', '万物互联管理'); +INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('7f51cd60-3b17-4f0f-a46a-19028d0c2294', '2024-08-16 11:46:38.873', '2024-08-16 12:02:22.513', 'system', 0, 'system', NULL, 9, 't', 0, 'WEB', 'views/layouts/Index.vue', 'f', 'MENU', 't', 'f', 'mdi-drag-variant', 'f', 'APP', '', 't', NULL, '/iot', '/iot/product-category', '物联设备管理'); INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('52be4bb7-9d4c-42fd-8ae7-9efc4ce1c029', '2024-08-30 22:58:28.829', '2024-08-30 22:58:43.313', 'system', 0, 'system', NULL, 0, 't', 0, 'WEB', 'views/pages/iot/product/Info.vue', 't', 'MENU', 'f', 'f', 'mdi-cube-send', 'f', 'APP', 'IotProductInfo', 't', '017ca0e8-1f30-4230-8602-12b6e95b502d', '/iot/product/info', NULL, '产品信息'); INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('3e88d6e3-b97d-48eb-b4d4-c2ac1cf444b8', '2024-08-30 22:59:41.313', '2024-08-30 23:00:01.473', 'system', 0, 'system', NULL, 0, 't', 0, 'WEB', 'views/pages/iot/device/Info.vue', 't', 'MENU', 'f', 'f', 'mdi-network-pos', 'f', 'APP', 'IotDeviceInfo', 't', 'b827346f-494d-4044-8bc9-0ef33f7e9d45', '/iot/device/info', NULL, '设备信息'); INSERT INTO "sys_element" ("element_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "application_type", "component", "detail_content", "element_category", "have_child", "hide_all_child", "icon", "ignore_auth", "menu_scenario", "name", "not_keep_alive", "parent_id", "path", "redirect", "title") VALUES ('310a9900-400d-43cf-9e3b-e262c61a5cd5', '2024-11-12 22:13:21.626', '2024-11-12 22:17:00.299', 'system', 0, 'system', NULL, 3, 't', 0, 'WEB', 'views/pages/iot/device/Setup.vue', 't', 'MENU', 'f', 'f', 'mdi-cog-transfer-outline', 'f', 'APP', 'IotDeviceSetup', 't', 'b827346f-494d-4044-8bc9-0ef33f7e9d45', '/iot/device/setup', NULL, '设置属性'); -- Gitee From be0ad946965bf51a985c07882f2654928e2768cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=81=E5=8C=A0=E5=90=9B?= Date: Sat, 4 Jul 2026 22:08:27 +0800 Subject: [PATCH 16/24] =?UTF-8?q?[=E6=96=B0=E5=A2=9E]=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=20Mqtt=20=E8=B4=A6=E6=88=B7=E3=80=81=E7=B1=BB=E5=88=AB?= =?UTF-8?q?=E5=8F=8A=E6=8E=88=E6=9D=83=E7=AE=A1=E7=90=86=20REST=20?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jpa/specification/JpaMqttCategoryService.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/specification/JpaMqttCategoryService.java b/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/specification/JpaMqttCategoryService.java index 9d3cbcd..f6faa60 100644 --- a/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/specification/JpaMqttCategoryService.java +++ b/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/specification/JpaMqttCategoryService.java @@ -38,6 +38,8 @@ import org.springframework.core.convert.converter.Converter; import org.springframework.data.domain.Page; import org.springframework.data.domain.Sort; +import java.util.List; + /** *

Description: 物联网 Mqtt 主题类别 Service Jpa 实现

* @@ -68,6 +70,12 @@ public class JpaMqttCategoryService implements MqttCategoryService { return pages.map(toMqttCategory::convert); } + @Override + public List findAll() { + List domains = delegate.findAll(); + return domains.stream().map(toMqttCategory::convert).toList(); + } + @Override public MqttCategory save(MqttCategory domain) { HerodotusMqttCategory entity = delegate.save(fromMqttCategory.convert(domain)); -- Gitee From 0f1e279881820c184689149f53bb76b3441c85a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=81=E5=8C=A0=E5=90=9B?= Date: Tue, 7 Jul 2026 16:37:51 +0800 Subject: [PATCH 17/24] =?UTF-8?q?[=E6=96=B0=E5=A2=9E]=20=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=20Mqtt=20=E8=B4=A6=E6=88=B7=E3=80=81=E7=B1=BB=E5=88=AB?= =?UTF-8?q?=E5=8F=8A=E6=8E=88=E6=9D=83=E7=AE=A1=E7=90=86=20REST=20?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/sqls/iot-standalone-data-mysql.sql | 2 +- .../src/main/resources/sqls/iot-standalone-data-postgresql.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-mysql.sql b/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-mysql.sql index 03d6307..6b3d046 100644 --- a/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-mysql.sql +++ b/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-mysql.sql @@ -204,7 +204,7 @@ INSERT INTO `iot_product_category` (`category_id`, `create_time`, `update_time`, -- ---------------------------- -- Table data for iot_product -- ---------------------------- -INSERT INTO `iot_product` (`product_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `authentication`, `protocol`, `networking`, `node`, `photo_url`, `product_key`, `product_name`, `productsecret`, `quantity`, `registration`, `is_release`, `verification`, `category_id`) VALUES ('8452271e-e42e-4a59-af80-3ea3c83247ea', '2025-04-28 21:20:27.432', '2025-04-28 21:20:27.432', 'system', 0, 'system', NULL, 1, b'1', 0, NULL, NULL, 2, 0, NULL, 'apktestadd', '测试物联网产品', '9f3026f4beddf8d29f3026f4beddf8d2', 0, b'0', b'0', b'0', NULL); +INSERT INTO `iot_product` (`product_id`, `create_time`, `update_time`, `create_by`, `reversion`, `update_by`, `description`, `ranking`, `is_reserved`, `status`, `authentication`, `protocol`, `networking`, `node`, `photo_url`, `product_key`, `product_name`, `productsecret`, `quantity`, `registration`, `is_release`, `verification`, `category_id`) VALUES ('8452271e-e42e-4a59-af80-3ea3c83247ea', '2025-04-28 21:20:27.432', '2025-04-28 21:20:27.432', 'system', 0, 'system', NULL, 1, b'1', 0, NULL, NULL, 2, 0, NULL, 'apktestadd', '测试物联网产品', '9f3026f4beddf8d29f3026f4beddf8d2', 0, b'0', b'0', b'0', '2bfa5467-b9f5-46dd-acec-f05aaaa00522'); -- ---------------------------- -- Table data for iot_mqtt_account diff --git a/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-postgresql.sql b/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-postgresql.sql index 1513eb2..ca2ac08 100644 --- a/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-postgresql.sql +++ b/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/sqls/iot-standalone-data-postgresql.sql @@ -205,7 +205,7 @@ INSERT INTO "iot_product_category" ("category_id", "create_time", "update_time", -- ---------------------------- -- Table data for iot_product -- ---------------------------- -INSERT INTO "iot_product" ("product_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "authentication", "protocol", "networking", "node", "photo_url", "product_key", "product_name", "productsecret", "quantity", "registration", "is_release", "verification", "category_id") VALUES ('8452271e-e42e-4a59-af80-3ea3c83247ea', '2025-04-28 21:20:27.432', '2025-04-28 21:20:27.432', 'system', 0, 'system', NULL, 1, 't', 0, NULL, NULL, 2, 0, NULL, 'apktestadd', '测试物联网产品', '9f3026f4beddf8d29f3026f4beddf8d2', 0, 'f', 'f', 'f', NULL); +INSERT INTO "iot_product" ("product_id", "create_time", "update_time", "create_by", "reversion", "update_by", "description", "ranking", "is_reserved", "status", "authentication", "protocol", "networking", "node", "photo_url", "product_key", "product_name", "productsecret", "quantity", "registration", "is_release", "verification", "category_id") VALUES ('8452271e-e42e-4a59-af80-3ea3c83247ea', '2025-04-28 21:20:27.432', '2025-04-28 21:20:27.432', 'system', 0, 'system', NULL, 1, 't', 0, NULL, NULL, 2, 0, NULL, 'apktestadd', '测试物联网产品', '9f3026f4beddf8d29f3026f4beddf8d2', 0, 'f', 'f', 'f', '2bfa5467-b9f5-46dd-acec-f05aaaa00522'); -- ---------------------------- -- Table data for iot_mqtt_account -- Gitee From a0e1ba8fbae0d9ceaf42117304284aa41523f20c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=81=E5=8C=A0=E5=90=9B?= Date: Tue, 7 Jul 2026 17:26:28 +0800 Subject: [PATCH 18/24] =?UTF-8?q?[=E4=BC=98=E5=8C=96]=20=E6=94=B9=E8=BF=9B?= =?UTF-8?q?=E7=89=A9=E8=81=94=E7=BD=91=E4=BA=A7=E5=93=81=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=EF=BC=8C=E5=A2=9E=E5=8A=A0=E5=BF=85=E8=A6=81=E7=9A=84=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../persistence/commons/enums/NodeType.java | 8 ++++++++ .../commons/service/ProductService.java | 3 ++- .../logic/service/HerodotusProductService.java | 16 +++++++++------- .../jpa/specification/JpaProductService.java | 5 +++-- .../controller/servlet/ProductController.java | 9 +++++++-- 5 files changed, 29 insertions(+), 12 deletions(-) diff --git a/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/enums/NodeType.java b/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/enums/NodeType.java index 3cf1d0d..f924aa0 100644 --- a/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/enums/NodeType.java +++ b/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/enums/NodeType.java @@ -29,6 +29,7 @@ import cn.herodotus.dante.core.domain.Dictionary; import cn.herodotus.dante.core.domain.DictionaryEnum; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.v3.oas.annotations.media.Schema; +import org.apache.commons.lang3.ObjectUtils; import java.util.ArrayList; import java.util.HashMap; @@ -86,6 +87,13 @@ public enum NodeType implements DictionaryEnum { return DICTIONARIES; } + public static NodeType parse(Integer index) { + if (ObjectUtils.isNotEmpty(index)) { + return NodeType.get(index); + } + return null; + } + @Override public String getValue() { return value; diff --git a/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/service/ProductService.java b/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/service/ProductService.java index edf11b1..19730ed 100644 --- a/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/service/ProductService.java +++ b/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/service/ProductService.java @@ -28,6 +28,7 @@ package cn.herodotus.thingsbrain.persistence.commons.service; import cn.herodotus.dante.data.commons.service.BaseWriteAndPageService; import cn.herodotus.thingsbrain.kernel.tsl.Specification; import cn.herodotus.thingsbrain.persistence.commons.domain.Product; +import cn.herodotus.thingsbrain.persistence.commons.enums.NodeType; import org.springframework.data.domain.Page; import java.util.Optional; @@ -48,7 +49,7 @@ public interface ProductService extends BaseWriteAndPageService */ Optional findByProductKey(String productKey); - Page findByCondition(int pageNumber, int pageSize, String productKey, String productName, String categoryName); + Page findByCondition(int pageNumber, int pageSize, String productKey, String productName, NodeType nodeType, Boolean release, String categoryName); /** * 开启或关闭某个产品的设备动态注册功能。 diff --git a/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/logic/service/HerodotusProductService.java b/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/logic/service/HerodotusProductService.java index b95d799..4122e7f 100644 --- a/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/logic/service/HerodotusProductService.java +++ b/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/logic/service/HerodotusProductService.java @@ -27,11 +27,9 @@ package cn.herodotus.thingsbrain.persistence.jpa.logic.service; import cn.herodotus.dante.data.jpa.repository.BaseJpaRepository; import cn.herodotus.dante.data.jpa.service.AbstractJpaService; +import cn.herodotus.thingsbrain.persistence.commons.enums.NodeType; import cn.herodotus.thingsbrain.persistence.jpa.logic.entity.HerodotusProduct; -import cn.herodotus.thingsbrain.persistence.jpa.logic.entity.HerodotusProductCategory; import cn.herodotus.thingsbrain.persistence.jpa.logic.repository.HerodotusProductRepository; -import jakarta.persistence.criteria.Join; -import jakarta.persistence.criteria.JoinType; import jakarta.persistence.criteria.Predicate; import org.apache.commons.lang3.ObjectUtils; import org.springframework.data.domain.Page; @@ -68,7 +66,7 @@ public class HerodotusProductService extends AbstractJpaService findByCondition(int pageNumber, int pageSize, String productKey, String productName, String categoryName) { + public Page findByCondition(int pageNumber, int pageSize, String productKey, String productName, NodeType nodeType, Boolean release, String categoryName) { Pageable pageable = PageRequest.of(pageNumber, pageSize); Specification specification = (root, criteriaQuery, criteriaBuilder) -> { @@ -83,11 +81,15 @@ public class HerodotusProductService extends AbstractJpaService join = root.join("category", JoinType.LEFT); - predicates.add(criteriaBuilder.equal(join.get("categoryName"), categoryName)); + if (ObjectUtils.isNotEmpty(nodeType)) { + predicates.add(criteriaBuilder.equal(root.get("nodeType"), nodeType)); } + if (ObjectUtils.isNotEmpty(release)) { + predicates.add(criteriaBuilder.equal(root.get("release"), release)); + } + + Predicate[] predicateArray = new Predicate[predicates.size()]; criteriaQuery.where(criteriaBuilder.and(predicates.toArray(predicateArray))); return criteriaQuery.getRestriction(); diff --git a/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/specification/JpaProductService.java b/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/specification/JpaProductService.java index be49509..63039e5 100644 --- a/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/specification/JpaProductService.java +++ b/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/specification/JpaProductService.java @@ -27,6 +27,7 @@ package cn.herodotus.thingsbrain.persistence.jpa.specification; import cn.herodotus.thingsbrain.kernel.tsl.Specification; import cn.herodotus.thingsbrain.persistence.commons.domain.Product; +import cn.herodotus.thingsbrain.persistence.commons.enums.NodeType; import cn.herodotus.thingsbrain.persistence.commons.service.ProductService; import cn.herodotus.thingsbrain.persistence.jpa.converter.FromProductConverter; import cn.herodotus.thingsbrain.persistence.jpa.converter.ToProductConverter; @@ -87,8 +88,8 @@ public class JpaProductService implements ProductService { } @Override - public Page findByCondition(int pageNumber, int pageSize, String productKey, String productName, String categoryName) { - Page pages = delegate.findByCondition(pageNumber, pageSize, productKey, productName, categoryName); + public Page findByCondition(int pageNumber, int pageSize, String productKey, String productName, NodeType nodeType, Boolean release, String categoryName) { + Page pages = delegate.findByCondition(pageNumber, pageSize, productKey, productName, nodeType, release, categoryName); return pages.map(toProduct::convert); } diff --git a/thingsbrain-platform/thingsbrain-platform-rest/src/main/java/cn/herodotus/thingsbrain/platform/rest/controller/servlet/ProductController.java b/thingsbrain-platform/thingsbrain-platform-rest/src/main/java/cn/herodotus/thingsbrain/platform/rest/controller/servlet/ProductController.java index 16e64d9..b5c88eb 100644 --- a/thingsbrain-platform/thingsbrain-platform-rest/src/main/java/cn/herodotus/thingsbrain/platform/rest/controller/servlet/ProductController.java +++ b/thingsbrain-platform/thingsbrain-platform-rest/src/main/java/cn/herodotus/thingsbrain/platform/rest/controller/servlet/ProductController.java @@ -32,6 +32,7 @@ import cn.herodotus.dante.web.annotation.AccessLimited; import cn.herodotus.dante.web.annotation.Idempotent; import cn.herodotus.thingsbrain.link.commons.definition.SpecificationManager; import cn.herodotus.thingsbrain.persistence.commons.domain.Product; +import cn.herodotus.thingsbrain.persistence.commons.enums.NodeType; import cn.herodotus.thingsbrain.persistence.commons.service.ProductService; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; @@ -86,7 +87,9 @@ public class ProductController extends AbstractEntityWriteAndPageController> findByCondition( @@ -94,8 +97,10 @@ public class ProductController extends AbstractEntityWriteAndPageController pages = productService.findByCondition(pageNumber, pageSize, productKey, productName, categoryName); + Page pages = productService.findByCondition(pageNumber, pageSize, productKey, productName, NodeType.parse(nodeType), release, categoryName); return resultFromPage(pages); } -- Gitee From ccb054492d566bf8656707fd04b269006c635b30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=81=E5=8C=A0=E5=90=9B?= Date: Tue, 7 Jul 2026 17:37:00 +0800 Subject: [PATCH 19/24] =?UTF-8?q?[=E4=BC=98=E5=8C=96]=20=E6=94=B9=E8=BF=9B?= =?UTF-8?q?=E7=89=A9=E8=81=94=E7=BD=91=E8=AE=BE=E5=A4=87=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=EF=BC=8C=E5=A2=9E=E5=8A=A0=E5=BF=85=E8=A6=81=E7=9A=84=E6=90=9C?= =?UTF-8?q?=E7=B4=A2=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../persistence/commons/service/DeviceService.java | 4 +++- .../jpa/logic/service/HerodotusDeviceService.java | 14 +++++++++++--- .../jpa/specification/JpaDeviceService.java | 4 ++-- .../rest/controller/servlet/DeviceController.java | 8 ++++++-- 4 files changed, 22 insertions(+), 8 deletions(-) diff --git a/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/service/DeviceService.java b/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/service/DeviceService.java index e129bf1..36b4e67 100644 --- a/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/service/DeviceService.java +++ b/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/service/DeviceService.java @@ -47,9 +47,11 @@ public interface DeviceService extends BaseWriteAndPageService { * @param pageNumber 当前页数 * @param pageSize 分页大小 * @param productKey 物联网 ProductKey + * @param deviceName 物联网 DeviceName + * @param clientId 设备 ClientId * @return 查询结果 {@link Page} */ - Page findByCondition(int pageNumber, int pageSize, String productKey); + Page findByCondition(int pageNumber, int pageSize, String productKey, String deviceName, String clientId); /** * 根据 clientId 查询设备。ClientId 默认格式为:ProductKey.DeviceName diff --git a/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/logic/service/HerodotusDeviceService.java b/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/logic/service/HerodotusDeviceService.java index 8d43a67..d643d94 100644 --- a/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/logic/service/HerodotusDeviceService.java +++ b/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/logic/service/HerodotusDeviceService.java @@ -33,7 +33,7 @@ import cn.herodotus.thingsbrain.persistence.jpa.logic.repository.HerodotusDevice import jakarta.persistence.criteria.Join; import jakarta.persistence.criteria.JoinType; import jakarta.persistence.criteria.Predicate; -import org.apache.commons.lang3.ObjectUtils; +import org.apache.commons.lang3.StringUtils; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.Pageable; @@ -64,14 +64,22 @@ public class HerodotusDeviceService extends AbstractJpaService findByCondition(int pageNumber, int pageSize, String productKey) { + public Page findByCondition(int pageNumber, int pageSize, String productKey, String deviceName, String clientId) { Pageable pageable = PageRequest.of(pageNumber, pageSize); Specification specification = (root, criteriaQuery, criteriaBuilder) -> { List predicates = new ArrayList<>(); - if (ObjectUtils.isNotEmpty(productKey)) { + if (StringUtils.isNotBlank(deviceName)) { + predicates.add(criteriaBuilder.like(root.get("deviceName"), like(deviceName))); + } + + if (StringUtils.isNotBlank(clientId)) { + predicates.add(criteriaBuilder.like(root.get("clientId"), like(clientId))); + } + + if (StringUtils.isNotBlank(productKey)) { Join join = root.join("product", JoinType.LEFT); predicates.add(criteriaBuilder.equal(join.get("productKey"), productKey)); } diff --git a/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/specification/JpaDeviceService.java b/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/specification/JpaDeviceService.java index 1defc6a..e3fc502 100644 --- a/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/specification/JpaDeviceService.java +++ b/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/specification/JpaDeviceService.java @@ -93,8 +93,8 @@ public class JpaDeviceService implements DeviceService { } @Override - public Page findByCondition(int pageNumber, int pageSize, String productKey) { - Page pages = delegate.findByCondition(pageNumber, pageSize, productKey); + public Page findByCondition(int pageNumber, int pageSize, String productKey, String deviceName, String clientId) { + Page pages = delegate.findByCondition(pageNumber, pageSize, productKey, deviceName, clientId); return pages.map(toDevice::convert); } diff --git a/thingsbrain-platform/thingsbrain-platform-rest/src/main/java/cn/herodotus/thingsbrain/platform/rest/controller/servlet/DeviceController.java b/thingsbrain-platform/thingsbrain-platform-rest/src/main/java/cn/herodotus/thingsbrain/platform/rest/controller/servlet/DeviceController.java index 0119cf4..08c8f91 100644 --- a/thingsbrain-platform/thingsbrain-platform-rest/src/main/java/cn/herodotus/thingsbrain/platform/rest/controller/servlet/DeviceController.java +++ b/thingsbrain-platform/thingsbrain-platform-rest/src/main/java/cn/herodotus/thingsbrain/platform/rest/controller/servlet/DeviceController.java @@ -87,13 +87,17 @@ public class DeviceController extends AbstractEntityWriteAndPageController> findByCondition( @NotNull @RequestParam("pageNumber") Integer pageNumber, @NotNull @RequestParam("pageSize") Integer pageSize, - @RequestParam(value = "productKey", required = false) String productKey) { - Page pages = deviceService.findByCondition(pageNumber, pageSize, productKey); + @RequestParam(value = "productKey", required = false) String productKey, + @RequestParam(value = "deviceName", required = false) String deviceName, + @RequestParam(value = "clientId", required = false) String clientId) { + Page pages = deviceService.findByCondition(pageNumber, pageSize, productKey, deviceName, clientId); return resultFromPage(pages); } -- Gitee From 758f1301fb7b71f994f16eeb2c8d5a7847e8415d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=81=E5=8C=A0=E5=90=9B?= Date: Wed, 8 Jul 2026 15:04:34 +0800 Subject: [PATCH 20/24] =?UTF-8?q?[=E4=BC=98=E5=8C=96]=20=E8=A1=A5=E5=85=85?= =?UTF-8?q?=E7=89=A9=E8=81=94=E4=BA=A7=E5=93=81=E7=AE=A1=E7=90=86=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=20REST=20API?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/ProductCategoryService.java | 10 +++++++ .../commons/service/ProductService.java | 21 +++++++++++++ .../HerodotusProductCategoryService.java | 24 +++++++++++++++ .../service/HerodotusProductService.java | 18 +++++++++++ .../JpaProductCategoryService.java | 8 +++++ .../jpa/specification/JpaProductService.java | 7 +++++ .../servlet/ProductCategoryController.java | 30 +++++++++++++++++++ .../controller/servlet/ProductController.java | 18 +++++++++++ 8 files changed, 136 insertions(+) diff --git a/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/service/ProductCategoryService.java b/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/service/ProductCategoryService.java index e8e68c0..03baae0 100644 --- a/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/service/ProductCategoryService.java +++ b/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/service/ProductCategoryService.java @@ -28,6 +28,8 @@ package cn.herodotus.thingsbrain.persistence.commons.service; import cn.herodotus.dante.data.commons.service.BaseWriteAndPageService; import cn.herodotus.thingsbrain.persistence.commons.domain.ProductCategory; +import java.util.List; + /** *

Description: 物联网产品分类服务定义

* @@ -36,4 +38,12 @@ import cn.herodotus.thingsbrain.persistence.commons.domain.ProductCategory; */ public interface ProductCategoryService extends BaseWriteAndPageService { + /** + * 根据产品类别名称,模糊查询产品类别 + * + * @param name 产品类别名称 + * @return 产品类别列表 {@link ProductCategory} + */ + List findAllByName(String name); + } diff --git a/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/service/ProductService.java b/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/service/ProductService.java index 19730ed..bf288cc 100644 --- a/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/service/ProductService.java +++ b/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/service/ProductService.java @@ -31,6 +31,7 @@ import cn.herodotus.thingsbrain.persistence.commons.domain.Product; import cn.herodotus.thingsbrain.persistence.commons.enums.NodeType; import org.springframework.data.domain.Page; +import java.util.List; import java.util.Optional; /** @@ -49,8 +50,28 @@ public interface ProductService extends BaseWriteAndPageService */ Optional findByProductKey(String productKey); + /** + * 分页模糊条件查询。 + * + * @param pageNumber 当前页数 + * @param pageSize 分页大小 + * @param productKey 物联网 ProductKey + * @param productName 物联网产品名称 + * @param nodeType 节点类型 {@link NodeType} + * @param release 是否发布 + * @param categoryName 产品类型名称 + * @return 查询结果 {@link Page} + */ Page findByCondition(int pageNumber, int pageSize, String productKey, String productName, NodeType nodeType, Boolean release, String categoryName); + /** + * 根据产品 ProductKey,模糊查询产品 + * + * @param productKey 物联网 ProductKey + * @return 产品列表 {@link List } + */ + List findAllByProductKey(String productKey); + /** * 开启或关闭某个产品的设备动态注册功能。 *

diff --git a/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/logic/service/HerodotusProductCategoryService.java b/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/logic/service/HerodotusProductCategoryService.java index 8e8c4b7..e5bce1a 100644 --- a/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/logic/service/HerodotusProductCategoryService.java +++ b/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/logic/service/HerodotusProductCategoryService.java @@ -29,8 +29,14 @@ import cn.herodotus.dante.data.jpa.repository.BaseJpaRepository; import cn.herodotus.dante.data.jpa.service.AbstractJpaService; import cn.herodotus.thingsbrain.persistence.jpa.logic.entity.HerodotusProductCategory; import cn.herodotus.thingsbrain.persistence.jpa.logic.repository.HerodotusProductCategoryRepository; +import jakarta.persistence.criteria.Predicate; +import org.apache.commons.lang3.ObjectUtils; +import org.springframework.data.jpa.domain.Specification; import org.springframework.stereotype.Service; +import java.util.ArrayList; +import java.util.List; + /** *

Description: 物联网产品分类 Jpa 存储 Service

* @@ -50,4 +56,22 @@ public class HerodotusProductCategoryService extends AbstractJpaService getRepository() { return herodotusProductCategoryRepository; } + + public List findAllByName(String name) { + + Specification specification = (root, criteriaQuery, criteriaBuilder) -> { + + List predicates = new ArrayList<>(); + + if (ObjectUtils.isNotEmpty(name)) { + predicates.add(criteriaBuilder.like(root.get("name"), like(name))); + } + + Predicate[] predicateArray = new Predicate[predicates.size()]; + criteriaQuery.where(criteriaBuilder.and(predicates.toArray(predicateArray))); + return criteriaQuery.getRestriction(); + }; + + return this.findAll(specification); + } } diff --git a/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/logic/service/HerodotusProductService.java b/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/logic/service/HerodotusProductService.java index 4122e7f..cc981d0 100644 --- a/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/logic/service/HerodotusProductService.java +++ b/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/logic/service/HerodotusProductService.java @@ -97,4 +97,22 @@ public class HerodotusProductService extends AbstractJpaService findAllByProductKey(String productKey) { + + Specification specification = (root, criteriaQuery, criteriaBuilder) -> { + + List predicates = new ArrayList<>(); + + if (ObjectUtils.isNotEmpty(productKey)) { + predicates.add(criteriaBuilder.like(root.get("productKey"), like(productKey))); + } + + Predicate[] predicateArray = new Predicate[predicates.size()]; + criteriaQuery.where(criteriaBuilder.and(predicates.toArray(predicateArray))); + return criteriaQuery.getRestriction(); + }; + + return this.findAll(specification); + } } diff --git a/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/specification/JpaProductCategoryService.java b/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/specification/JpaProductCategoryService.java index 05ae3a9..9ffbbd7 100644 --- a/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/specification/JpaProductCategoryService.java +++ b/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/specification/JpaProductCategoryService.java @@ -35,6 +35,8 @@ import org.springframework.core.convert.converter.Converter; import org.springframework.data.domain.Page; import org.springframework.data.domain.Sort; +import java.util.List; + /** *

Description: 物联网产品分类 Service Jpa 实现

* @@ -75,4 +77,10 @@ public class JpaProductCategoryService implements ProductCategoryService { public void deleteById(String id) { delegate.deleteById(id); } + + @Override + public List findAllByName(String name) { + List domains = delegate.findAllByName(name); + return domains.stream().map(toProductCategory::convert).toList(); + } } diff --git a/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/specification/JpaProductService.java b/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/specification/JpaProductService.java index 63039e5..e8dd623 100644 --- a/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/specification/JpaProductService.java +++ b/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/specification/JpaProductService.java @@ -40,6 +40,7 @@ import org.springframework.core.convert.converter.Converter; import org.springframework.data.domain.Page; import org.springframework.data.domain.Sort; +import java.util.List; import java.util.Optional; /** @@ -100,6 +101,12 @@ public class JpaProductService implements ProductService { .map(this.toProduct::convert); } + @Override + public List findAllByProductKey(String productKey) { + List domains = delegate.findAllByProductKey(productKey); + return domains.stream().map(toProduct::convert).toList(); + } + @Override public Product switchAuthentication(Product domain) { diff --git a/thingsbrain-platform/thingsbrain-platform-rest/src/main/java/cn/herodotus/thingsbrain/platform/rest/controller/servlet/ProductCategoryController.java b/thingsbrain-platform/thingsbrain-platform-rest/src/main/java/cn/herodotus/thingsbrain/platform/rest/controller/servlet/ProductCategoryController.java index 223c4fa..d496be5 100644 --- a/thingsbrain-platform/thingsbrain-platform-rest/src/main/java/cn/herodotus/thingsbrain/platform/rest/controller/servlet/ProductCategoryController.java +++ b/thingsbrain-platform/thingsbrain-platform-rest/src/main/java/cn/herodotus/thingsbrain/platform/rest/controller/servlet/ProductCategoryController.java @@ -25,15 +25,28 @@ package cn.herodotus.thingsbrain.platform.rest.controller.servlet; +import cn.herodotus.dante.core.domain.Result; import cn.herodotus.dante.data.commons.service.BaseWriteAndPageService; import cn.herodotus.dante.data.rest.servlet.AbstractEntityWriteAndPageController; +import cn.herodotus.dante.web.annotation.AccessLimited; import cn.herodotus.thingsbrain.persistence.commons.domain.ProductCategory; import cn.herodotus.thingsbrain.persistence.commons.service.ProductCategoryService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Parameters; +import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.responses.ApiResponse; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.tags.Tags; +import org.springframework.http.MediaType; +import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; +import java.util.List; + /** *

Description: 物联网产品品类接口

* @@ -59,4 +72,21 @@ public class ProductCategoryController extends AbstractEntityWriteAndPageControl public BaseWriteAndPageService getService() { return productCategoryService; } + + @AccessLimited + @Operation(summary = "根据产品类别名称模糊查询产品类别", description = "根据产品类别名称模糊查询产品类别", + responses = { + @ApiResponse(description = "产品类别列表", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, schema = @Schema(implementation = Result.class))), + @ApiResponse(responseCode = "204", description = "查询成功,未查到数据"), + @ApiResponse(responseCode = "500", description = "查询失败") + + }) + @Parameters({ + @Parameter(name = "name", required = true, description = "物联网产品类别名称"), + }) + @GetMapping("/list") + public Result> findAllByName(@RequestParam(value = "name") String name) { + List products = productCategoryService.findAllByName(name); + return result(products); + } } diff --git a/thingsbrain-platform/thingsbrain-platform-rest/src/main/java/cn/herodotus/thingsbrain/platform/rest/controller/servlet/ProductController.java b/thingsbrain-platform/thingsbrain-platform-rest/src/main/java/cn/herodotus/thingsbrain/platform/rest/controller/servlet/ProductController.java index b5c88eb..c31d191 100644 --- a/thingsbrain-platform/thingsbrain-platform-rest/src/main/java/cn/herodotus/thingsbrain/platform/rest/controller/servlet/ProductController.java +++ b/thingsbrain-platform/thingsbrain-platform-rest/src/main/java/cn/herodotus/thingsbrain/platform/rest/controller/servlet/ProductController.java @@ -48,6 +48,7 @@ import org.springframework.data.domain.Page; import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.*; +import java.util.List; import java.util.Map; import java.util.Optional; @@ -104,6 +105,23 @@ public class ProductController extends AbstractEntityWriteAndPageController> findAllByProductKey(@RequestParam(value = "productKey") String productKey) { + List products = productService.findAllByProductKey(productKey); + return result(products); + } + @AccessLimited @Operation(summary = "根据ProductKey查询物联网产品", description = "通过ProductKey查询物联网产品", responses = { -- Gitee From 7dd655534b85150aa60f7b57c1aa485a570b29f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=81=E5=8C=A0=E5=90=9B?= Date: Tue, 14 Jul 2026 12:24:36 +0800 Subject: [PATCH 21/24] =?UTF-8?q?[=E4=BF=AE=E5=A4=8D]=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E7=89=A9=E6=A8=A1=E5=9E=8B=20JSON=20=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E5=BA=8F=E5=88=97=E5=8C=96=E5=90=8E=E5=8C=85?= =?UTF-8?q?=E5=90=AB=20'\'=20=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jackson/JsonToObjectSerializer.java | 49 ----------------- .../jackson/ObjectToJsonDeserializer.java | 52 ------------------- .../commons/domain/AbstractTslArgument.java | 6 ++- .../HerodotusProductCategoryService.java | 6 +-- .../JpaProductCategoryService.java | 2 +- 5 files changed, 8 insertions(+), 107 deletions(-) delete mode 100644 thingsbrain-kernel/thingsbrain-kernel-commons/src/main/java/cn/herodotus/thingsbrain/kernel/commons/jackson/JsonToObjectSerializer.java delete mode 100644 thingsbrain-kernel/thingsbrain-kernel-commons/src/main/java/cn/herodotus/thingsbrain/kernel/commons/jackson/ObjectToJsonDeserializer.java diff --git a/thingsbrain-kernel/thingsbrain-kernel-commons/src/main/java/cn/herodotus/thingsbrain/kernel/commons/jackson/JsonToObjectSerializer.java b/thingsbrain-kernel/thingsbrain-kernel-commons/src/main/java/cn/herodotus/thingsbrain/kernel/commons/jackson/JsonToObjectSerializer.java deleted file mode 100644 index 182e262..0000000 --- a/thingsbrain-kernel/thingsbrain-kernel-commons/src/main/java/cn/herodotus/thingsbrain/kernel/commons/jackson/JsonToObjectSerializer.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2020-2030 码匠君 - * - * ThingsBrain licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * ThingsBrain 是 Dante Cloud 系统生态产品,采用 APACHE LICENSE 2.0 开源协议,您在使用过程中,需要注意以下几点: - * - * 1. 请不要删除和修改根目录下的LICENSE文件。 - * 2. 请不要删除和修改 ThingsBrain 源码头部的版权声明。 - * 3. 请保留源码和相关描述文件的项目出处,作者声明等。 - * 4. 分发源码时候,请注明软件出处 - * 5. 在修改包名,模块名称,项目代码等时,请注明软件出处 - * 6. 若您的项目无法满足以上几点,可申请商业授权 - */ - -package cn.herodotus.thingsbrain.kernel.commons.jackson; - -import tools.jackson.core.JacksonException; -import tools.jackson.core.JsonGenerator; -import tools.jackson.databind.SerializationContext; -import tools.jackson.databind.ser.std.StdSerializer; - -/** - *

Description: JSON 字符串转成 Attribute 格式

- * - * @author : gengwei.zheng - * @date : 2024/9/21 15:15 - */ -public class JsonToObjectSerializer extends StdSerializer { - - protected JsonToObjectSerializer() { - super(String.class); - } - - @Override - public void serialize(String value, JsonGenerator generator, SerializationContext provider) throws JacksonException { - generator.writePOJO(value); - } -} diff --git a/thingsbrain-kernel/thingsbrain-kernel-commons/src/main/java/cn/herodotus/thingsbrain/kernel/commons/jackson/ObjectToJsonDeserializer.java b/thingsbrain-kernel/thingsbrain-kernel-commons/src/main/java/cn/herodotus/thingsbrain/kernel/commons/jackson/ObjectToJsonDeserializer.java deleted file mode 100644 index 7d53893..0000000 --- a/thingsbrain-kernel/thingsbrain-kernel-commons/src/main/java/cn/herodotus/thingsbrain/kernel/commons/jackson/ObjectToJsonDeserializer.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2020-2030 码匠君 - * - * ThingsBrain licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * ThingsBrain 是 Dante Cloud 系统生态产品,采用 APACHE LICENSE 2.0 开源协议,您在使用过程中,需要注意以下几点: - * - * 1. 请不要删除和修改根目录下的LICENSE文件。 - * 2. 请不要删除和修改 ThingsBrain 源码头部的版权声明。 - * 3. 请保留源码和相关描述文件的项目出处,作者声明等。 - * 4. 分发源码时候,请注明软件出处 - * 5. 在修改包名,模块名称,项目代码等时,请注明软件出处 - * 6. 若您的项目无法满足以上几点,可申请商业授权 - */ - -package cn.herodotus.thingsbrain.kernel.commons.jackson; - -import tools.jackson.core.JacksonException; -import tools.jackson.core.JsonParser; -import tools.jackson.databind.DeserializationContext; -import tools.jackson.databind.JsonNode; -import tools.jackson.databind.deser.std.StdDeserializer; - -/** - *

Description: 物模型数据属性转成 JSON 字符串反序列化器

- * - * @author : gengwei.zheng - * @date : 2024/9/21 4:30 - */ -public class ObjectToJsonDeserializer extends StdDeserializer { - - protected ObjectToJsonDeserializer() { - super(String.class); - } - - @Override - public String deserialize(JsonParser parser, DeserializationContext context) throws JacksonException { - JsonNode jsonNode = context.readTree(parser); - ; - return jsonNode.toString(); - } -} diff --git a/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/domain/AbstractTslArgument.java b/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/domain/AbstractTslArgument.java index 34466e1..82d7207 100644 --- a/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/domain/AbstractTslArgument.java +++ b/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/domain/AbstractTslArgument.java @@ -25,6 +25,8 @@ package cn.herodotus.thingsbrain.persistence.commons.domain; +import cn.herodotus.dante.core.jackson.JsonToStringDeserializer; +import cn.herodotus.dante.core.jackson.StringToJsonSerializer; import cn.herodotus.dante.data.commons.entity.AbstractAuditEntity; import cn.herodotus.thingsbrain.kernel.commons.jackson.JsonToObjectSerializer; import cn.herodotus.thingsbrain.kernel.commons.jackson.ObjectToJsonDeserializer; @@ -59,8 +61,8 @@ public abstract class AbstractTslArgument extends AbstractAuditEntity { * Specs 为 JSON 字符串,增加下面的序列化器避免,发送给前端的 JSON 出现 '\' */ @Schema(name = "数据描述", description = "采用JSON字符串形式存储属性规格描述内容") - @JsonDeserialize(using = ObjectToJsonDeserializer.class) - @JsonSerialize(using = JsonToObjectSerializer.class) + @JsonDeserialize(using = JsonToStringDeserializer.class) + @JsonSerialize(using = StringToJsonSerializer.class) private String specs; public String getIdentifier() { diff --git a/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/logic/service/HerodotusProductCategoryService.java b/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/logic/service/HerodotusProductCategoryService.java index e5bce1a..4dc30c7 100644 --- a/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/logic/service/HerodotusProductCategoryService.java +++ b/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/logic/service/HerodotusProductCategoryService.java @@ -57,14 +57,14 @@ public class HerodotusProductCategoryService extends AbstractJpaService findAllByName(String name) { + public List findAllByCategoryName(String categoryName) { Specification specification = (root, criteriaQuery, criteriaBuilder) -> { List predicates = new ArrayList<>(); - if (ObjectUtils.isNotEmpty(name)) { - predicates.add(criteriaBuilder.like(root.get("name"), like(name))); + if (ObjectUtils.isNotEmpty(categoryName)) { + predicates.add(criteriaBuilder.like(root.get("categoryName"), like(categoryName))); } Predicate[] predicateArray = new Predicate[predicates.size()]; diff --git a/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/specification/JpaProductCategoryService.java b/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/specification/JpaProductCategoryService.java index 9ffbbd7..7cbb1b3 100644 --- a/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/specification/JpaProductCategoryService.java +++ b/thingsbrain-persistence/thingsbrain-persistence-jpa/src/main/java/cn/herodotus/thingsbrain/persistence/jpa/specification/JpaProductCategoryService.java @@ -80,7 +80,7 @@ public class JpaProductCategoryService implements ProductCategoryService { @Override public List findAllByName(String name) { - List domains = delegate.findAllByName(name); + List domains = delegate.findAllByCategoryName(name); return domains.stream().map(toProductCategory::convert).toList(); } } -- Gitee From 255248b5e4edcd32d9594ecdcdcb9ac97972c2d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=81=E5=8C=A0=E5=90=9B?= Date: Tue, 14 Jul 2026 14:54:43 +0800 Subject: [PATCH 22/24] =?UTF-8?q?[=E4=BF=AE=E5=A4=8D]=20=E9=87=8D=E6=96=B0?= =?UTF-8?q?=E5=BC=80=E5=90=AF=20JPA=20open-in-view=20=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E5=A4=8D=20JPA=20=E5=85=B3=E8=81=94=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=AD=98=E5=82=A8=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/application.yaml b/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/application.yaml index b5711a6..8ca8fb9 100644 --- a/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/application.yaml +++ b/thingsbrain-platform/thingsbrain-monolith-application/src/main/resources/application.yaml @@ -127,7 +127,7 @@ spring: database: postgresql database-platform: ${spring.jpa.database} generate-ddl: true - open-in-view: false + open-in-view: true hibernate: # DDL mode. This is actually a shortcut for the "hibernate.hbm2ddl.auto" property. Default to "create-drop" when using an embedded database, "none" otherwise.spring.jpa.hibernate.ddl-auto=update ddl-auto: update @@ -384,7 +384,7 @@ spring: database: postgresql database-platform: ${spring.jpa.database} generate-ddl: true - open-in-view: false + open-in-view: true hibernate: # DDL mode. This is actually a shortcut for the "hibernate.hbm2ddl.auto" property. Default to "create-drop" when using an embedded database, "none" otherwise.spring.jpa.hibernate.ddl-auto=update ddl-auto: update @@ -615,7 +615,7 @@ spring: database: h2 database-platform: ${spring.jpa.database} generate-ddl: true - open-in-view: false + open-in-view: true defer-datasource-initialization: true hibernate: # DDL mode. This is actually a shortcut for the "hibernate.hbm2ddl.auto" property. Default to "create-drop" when using an embedded database, "none" otherwise.spring.jpa.hibernate.ddl-auto=update @@ -887,7 +887,7 @@ spring: database: h2 database-platform: ${spring.jpa.database} generate-ddl: true - open-in-view: false + open-in-view: true defer-datasource-initialization: true hibernate: # DDL mode. This is actually a shortcut for the "hibernate.hbm2ddl.auto" property. Default to "create-drop" when using an embedded database, "none" otherwise.spring.jpa.hibernate.ddl-auto=update -- Gitee From 373798c45a910a56a0dd0b4882cfd367f2d83ad6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=81=E5=8C=A0=E5=90=9B?= Date: Tue, 14 Jul 2026 23:24:05 +0800 Subject: [PATCH 23/24] =?UTF-8?q?[=E5=8D=87=E7=BA=A7]=20Nacos=20=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E5=8D=87=E7=BA=A7=E8=87=B3=203.2.3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- .../persistence/commons/domain/AbstractTslArgument.java | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 8918940..edc21a9 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Spring Cloud 2025.1.2 Spring Cloud Alibaba 2025.1.0.0 Spring Cloud Tencent 2.1.2.0-2025.0.2 - Nacos 3.2.2 + Nacos 3.2.3

码匠君 diff --git a/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/domain/AbstractTslArgument.java b/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/domain/AbstractTslArgument.java index 82d7207..5297ef0 100644 --- a/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/domain/AbstractTslArgument.java +++ b/thingsbrain-persistence/thingsbrain-persistence-commons/src/main/java/cn/herodotus/thingsbrain/persistence/commons/domain/AbstractTslArgument.java @@ -28,8 +28,6 @@ package cn.herodotus.thingsbrain.persistence.commons.domain; import cn.herodotus.dante.core.jackson.JsonToStringDeserializer; import cn.herodotus.dante.core.jackson.StringToJsonSerializer; import cn.herodotus.dante.data.commons.entity.AbstractAuditEntity; -import cn.herodotus.thingsbrain.kernel.commons.jackson.JsonToObjectSerializer; -import cn.herodotus.thingsbrain.kernel.commons.jackson.ObjectToJsonDeserializer; import cn.herodotus.thingsbrain.kernel.tsl.enums.ArgumentType; import com.google.common.base.MoreObjects; import io.swagger.v3.oas.annotations.media.Schema; -- Gitee From f5d8f0e2f320603aecc6282a6a37932ab0eb8dd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A0=81=E5=8C=A0=E5=90=9B?= Date: Wed, 15 Jul 2026 17:57:15 +0800 Subject: [PATCH 24/24] =?UTF-8?q?=E2=99=BF=20feat:=20v4.1.0.4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 主要更新 - [升级] Spring Boot Admin 版本升级至 4.1.2 - [升级] Nacos 版本升级至 3.2.3 - [升级] Debezimu 版本升级至 3.6 - 其它更新 - [新增] 新增 Mqtt 账户、类别及授权管理数据库初始化脚本 - [新增] 新增 Mqtt 账户、类别及授权管理 REST 接口 - [新增] 前端表格统一增加最后修改人、修改时间等审计字段 - [新增] Mqtt Account 实体新增索引配置,以提升查询效率 - [新增] 新增 Spring Data Query by Example 场景处理工具类 - [修复] 修复 Quasar 版本前端组件依赖版本错误引起启动报错问题 - [修复] 修复单体版引入模块错误 - [修复] 修复在 Vite 8 环境下,Vuetify layers.css 配置在 build 环境下顺序错误引起样式显示不正确问题 - [修复] 修复物模型 JSON 数据字段序列化后包含 '\' 问题 - [修复] 修复前端 Vuetify 版本 v-select 在 dialog 中不显示菜单问题 - [修复] 重新开启 JPA open-in-view 配置,修复 JPA 关联数据存储错误 - [重构] 调整 Mqtt 主题类别与主题权限多对多主从关系,以便于关系配置,减少前端数据传输及关联 - [重构] 前端三级路由页面重构为指定名称和 useRoute() 混合模式,提升页面返回稳定性,规避单独使用 useRoute() 偶发出现 inject() inject() can only be used inside setup() or functional components. 问题 - [优化] 优化代码命名及日志输入内容标识 - [优化] 补充前端需要展示的 Enum 字典类 - [优化] 优化useEditFinish 支持手动指定 route,以避免不同环境下 useRoute() 会失效问题 - [优化] 优化 central-publishing-maven-plugin 插件配置,以减少发布时上传 checksum 文件数量 - [优化] 改进物联网产品搜索,增加必要的搜索条件 - [优化] 改进物联网设备搜索,增加必要的搜索条件 - [优化] 补充物联产品管理相关 REST API - [优化] 删除前端工程无用代码 useEditFinish hooks - [升级] docker/login-action 版本升级至 4.4.0 - [更新] IP 地址数据库数据更新至 2026.07.08 - [升级] kafka docker 镜像版本升级至 4.3.1 - [升级] grafana docker 镜像版本升级至 13.1.0 - [升级] loki docker 镜像版本升级至 3.7.3 - [升级] alloy docker 镜像版本升级至 v1.17.1 - [升级] emqx docker 镜像版本升级至 6.2.2 - [升级] node-red docker 镜像版本升级至 5.0.1 - [升级] influxdb docker 镜像版本升级至 3.10.1 - [升级] influxdb3-ui docker 镜像版本升级至 1.9.0 - [升级] clickhouse docker 镜像版本升级至 26.5.5.8 - 依赖更新 - [升级] alipay-sdk-java 版本升级至 4.40.909.ALL - [升级] bcpkix-jdk18on 版本升级至 1.85 - [升级] bcprov-jdk18on 版本升级至 1.85 - [升级] hutool 版本升级至 7.0.0-M7 - [升级] json-schema-validator 版本升级至 3.0.6 - [升级] langchain4j 版本升级至 1.17.2 - [升级] mybatis-plus 版本升级至 3.5.17 - [升级] software.amazon.awssdk 版本升级至 2.48.0 - [升级] software.amazon.awssdk.crt 版本升级至 0.47.3 - [升级] weixin java 版本升级至 4.8.4-20260715.115028 - [升级] webauthn4j 版本升级至 0.31.8.RELEASE - [升级] quasar webjars 版本升级至 2.21.2 - [升级] hutool 5.X 版本升级至 5.8.47 --- README.md | 10 +++++----- pom.xml | 2 +- thingsbrain-dependencies/pom.xml | 2 +- thingsbrain-kernel/pom.xml | 2 +- thingsbrain-kernel/thingsbrain-kernel-commons/pom.xml | 2 +- thingsbrain-kernel/thingsbrain-kernel-link/pom.xml | 2 +- thingsbrain-kernel/thingsbrain-kernel-tsl/pom.xml | 2 +- thingsbrain-link/pom.xml | 2 +- .../thingsbrain-link-autoconfigure/pom.xml | 2 +- thingsbrain-link/thingsbrain-link-commons/pom.xml | 2 +- thingsbrain-link/thingsbrain-link-manager/pom.xml | 2 +- thingsbrain-link/thingsbrain-link-storage/pom.xml | 2 +- thingsbrain-mqtt/pom.xml | 2 +- .../thingsbrain-mqtt-autoconfigure/pom.xml | 2 +- thingsbrain-mqtt/thingsbrain-mqtt-commons/pom.xml | 2 +- thingsbrain-mqtt/thingsbrain-mqtt-inbound/pom.xml | 2 +- thingsbrain-mqtt/thingsbrain-mqtt-outbound/pom.xml | 2 +- thingsbrain-nosql/pom.xml | 2 +- .../thingsbrain-nosql-autoconfigure/pom.xml | 2 +- thingsbrain-nosql/thingsbrain-nosql-influxdb3/pom.xml | 2 +- thingsbrain-persistence/pom.xml | 2 +- .../thingsbrain-persistence-autoconfigure/pom.xml | 2 +- .../thingsbrain-persistence-commons/pom.xml | 2 +- .../thingsbrain-persistence-jpa/pom.xml | 2 +- thingsbrain-platform/pom.xml | 2 +- .../thingsbrain-monolith-application/pom.xml | 2 +- .../thingsbrain-platform-authentication/pom.xml | 2 +- .../thingsbrain-platform-autoconfigure/pom.xml | 2 +- .../thingsbrain-platform-commons/pom.xml | 2 +- thingsbrain-platform/thingsbrain-platform-rest/pom.xml | 2 +- 30 files changed, 34 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index edc21a9..70669d5 100644 --- a/README.md +++ b/README.md @@ -15,11 +15,11 @@ 码匠君 License Apache 2.0 Java 25 - ThingsBrain 4.1.0.3 - Version 4.1.0.3 - Dante Engine 4.1.0.3 - Dante Cloud UI 4.1.0.3 - Dante Cloud UI(New) 4.1.0.3 + ThingsBrain 4.1.0.4 + Version 4.1.0.4 + Dante Engine 4.1.0.4 + Dante Cloud UI 4.1.0.4 + Dante Cloud UI(New) 4.1.0.4 Github star Github fork Gitee star diff --git a/pom.xml b/pom.xml index e3a8f24..5bb7da9 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ cn.herodotus.ecosystem herodotus-ecosystem-parent - 4.1.0.3 + 4.1.0.4 diff --git a/thingsbrain-dependencies/pom.xml b/thingsbrain-dependencies/pom.xml index 229f602..8d1c3c6 100644 --- a/thingsbrain-dependencies/pom.xml +++ b/thingsbrain-dependencies/pom.xml @@ -32,7 +32,7 @@ cn.herodotus.ecosystem herodotus-ecosystem-parent - 4.1.0.3 + 4.1.0.4 diff --git a/thingsbrain-kernel/pom.xml b/thingsbrain-kernel/pom.xml index 179efc1..79d45d6 100644 --- a/thingsbrain-kernel/pom.xml +++ b/thingsbrain-kernel/pom.xml @@ -7,7 +7,7 @@ cn.herodotus.thingsbrain thingsbrain - 4.1.0.3 + 4.1.0.4 thingsbrain-kernel diff --git a/thingsbrain-kernel/thingsbrain-kernel-commons/pom.xml b/thingsbrain-kernel/thingsbrain-kernel-commons/pom.xml index 3fb40e8..2d8d3e3 100644 --- a/thingsbrain-kernel/thingsbrain-kernel-commons/pom.xml +++ b/thingsbrain-kernel/thingsbrain-kernel-commons/pom.xml @@ -31,7 +31,7 @@ cn.herodotus.thingsbrain thingsbrain-kernel - 4.1.0.3 + 4.1.0.4 thingsbrain-kernel-commons diff --git a/thingsbrain-kernel/thingsbrain-kernel-link/pom.xml b/thingsbrain-kernel/thingsbrain-kernel-link/pom.xml index 1c36076..18d08a7 100644 --- a/thingsbrain-kernel/thingsbrain-kernel-link/pom.xml +++ b/thingsbrain-kernel/thingsbrain-kernel-link/pom.xml @@ -6,7 +6,7 @@ cn.herodotus.thingsbrain thingsbrain-kernel - 4.1.0.3 + 4.1.0.4 thingsbrain-kernel-link diff --git a/thingsbrain-kernel/thingsbrain-kernel-tsl/pom.xml b/thingsbrain-kernel/thingsbrain-kernel-tsl/pom.xml index 049ab4b..773ec4f 100644 --- a/thingsbrain-kernel/thingsbrain-kernel-tsl/pom.xml +++ b/thingsbrain-kernel/thingsbrain-kernel-tsl/pom.xml @@ -7,7 +7,7 @@ cn.herodotus.thingsbrain thingsbrain-kernel - 4.1.0.3 + 4.1.0.4 thingsbrain-kernel-tsl diff --git a/thingsbrain-link/pom.xml b/thingsbrain-link/pom.xml index ca96d12..5536443 100644 --- a/thingsbrain-link/pom.xml +++ b/thingsbrain-link/pom.xml @@ -6,7 +6,7 @@ cn.herodotus.thingsbrain thingsbrain - 4.1.0.3 + 4.1.0.4 thingsbrain-link diff --git a/thingsbrain-link/thingsbrain-link-autoconfigure/pom.xml b/thingsbrain-link/thingsbrain-link-autoconfigure/pom.xml index ba34f5d..c6cf382 100644 --- a/thingsbrain-link/thingsbrain-link-autoconfigure/pom.xml +++ b/thingsbrain-link/thingsbrain-link-autoconfigure/pom.xml @@ -6,7 +6,7 @@ cn.herodotus.thingsbrain thingsbrain-link - 4.1.0.3 + 4.1.0.4 thingsbrain-link-autoconfigure diff --git a/thingsbrain-link/thingsbrain-link-commons/pom.xml b/thingsbrain-link/thingsbrain-link-commons/pom.xml index 83b4623..150f5ff 100644 --- a/thingsbrain-link/thingsbrain-link-commons/pom.xml +++ b/thingsbrain-link/thingsbrain-link-commons/pom.xml @@ -6,7 +6,7 @@ cn.herodotus.thingsbrain thingsbrain-link - 4.1.0.3 + 4.1.0.4 thingsbrain-link-commons diff --git a/thingsbrain-link/thingsbrain-link-manager/pom.xml b/thingsbrain-link/thingsbrain-link-manager/pom.xml index d8fa70f..ed6d043 100644 --- a/thingsbrain-link/thingsbrain-link-manager/pom.xml +++ b/thingsbrain-link/thingsbrain-link-manager/pom.xml @@ -6,7 +6,7 @@ cn.herodotus.thingsbrain thingsbrain-link - 4.1.0.3 + 4.1.0.4 thingsbrain-link-manager diff --git a/thingsbrain-link/thingsbrain-link-storage/pom.xml b/thingsbrain-link/thingsbrain-link-storage/pom.xml index 6aae77a..ccd246c 100644 --- a/thingsbrain-link/thingsbrain-link-storage/pom.xml +++ b/thingsbrain-link/thingsbrain-link-storage/pom.xml @@ -31,7 +31,7 @@ cn.herodotus.thingsbrain thingsbrain-link - 4.1.0.3 + 4.1.0.4 thingsbrain-link-storage diff --git a/thingsbrain-mqtt/pom.xml b/thingsbrain-mqtt/pom.xml index 8b2f198..5b499db 100644 --- a/thingsbrain-mqtt/pom.xml +++ b/thingsbrain-mqtt/pom.xml @@ -6,7 +6,7 @@ cn.herodotus.thingsbrain thingsbrain - 4.1.0.3 + 4.1.0.4 thingsbrain-mqtt diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-autoconfigure/pom.xml b/thingsbrain-mqtt/thingsbrain-mqtt-autoconfigure/pom.xml index c33de61..6184ebc 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-autoconfigure/pom.xml +++ b/thingsbrain-mqtt/thingsbrain-mqtt-autoconfigure/pom.xml @@ -6,7 +6,7 @@ cn.herodotus.thingsbrain thingsbrain-mqtt - 4.1.0.3 + 4.1.0.4 thingsbrain-mqtt-autoconfigure diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-commons/pom.xml b/thingsbrain-mqtt/thingsbrain-mqtt-commons/pom.xml index 620f85d..db858f7 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-commons/pom.xml +++ b/thingsbrain-mqtt/thingsbrain-mqtt-commons/pom.xml @@ -6,7 +6,7 @@ cn.herodotus.thingsbrain thingsbrain-mqtt - 4.1.0.3 + 4.1.0.4 thingsbrain-mqtt-commons diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/pom.xml b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/pom.xml index c4ad087..e9c70ce 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-inbound/pom.xml +++ b/thingsbrain-mqtt/thingsbrain-mqtt-inbound/pom.xml @@ -6,7 +6,7 @@ cn.herodotus.thingsbrain thingsbrain-mqtt - 4.1.0.3 + 4.1.0.4 thingsbrain-mqtt-inbound diff --git a/thingsbrain-mqtt/thingsbrain-mqtt-outbound/pom.xml b/thingsbrain-mqtt/thingsbrain-mqtt-outbound/pom.xml index ae97ae1..de35daa 100644 --- a/thingsbrain-mqtt/thingsbrain-mqtt-outbound/pom.xml +++ b/thingsbrain-mqtt/thingsbrain-mqtt-outbound/pom.xml @@ -6,7 +6,7 @@ cn.herodotus.thingsbrain thingsbrain-mqtt - 4.1.0.3 + 4.1.0.4 thingsbrain-mqtt-outbound diff --git a/thingsbrain-nosql/pom.xml b/thingsbrain-nosql/pom.xml index f1c5edc..8fd91ae 100644 --- a/thingsbrain-nosql/pom.xml +++ b/thingsbrain-nosql/pom.xml @@ -6,7 +6,7 @@ cn.herodotus.thingsbrain thingsbrain - 4.1.0.3 + 4.1.0.4 thingsbrain-nosql diff --git a/thingsbrain-nosql/thingsbrain-nosql-autoconfigure/pom.xml b/thingsbrain-nosql/thingsbrain-nosql-autoconfigure/pom.xml index 834ba0a..7b18836 100644 --- a/thingsbrain-nosql/thingsbrain-nosql-autoconfigure/pom.xml +++ b/thingsbrain-nosql/thingsbrain-nosql-autoconfigure/pom.xml @@ -6,7 +6,7 @@ cn.herodotus.thingsbrain thingsbrain-nosql - 4.1.0.3 + 4.1.0.4 thingsbrain-nosql-autoconfigure diff --git a/thingsbrain-nosql/thingsbrain-nosql-influxdb3/pom.xml b/thingsbrain-nosql/thingsbrain-nosql-influxdb3/pom.xml index bd11d39..4ecbaa9 100644 --- a/thingsbrain-nosql/thingsbrain-nosql-influxdb3/pom.xml +++ b/thingsbrain-nosql/thingsbrain-nosql-influxdb3/pom.xml @@ -6,7 +6,7 @@ cn.herodotus.thingsbrain thingsbrain-nosql - 4.1.0.3 + 4.1.0.4 thingsbrain-nosql-influxdb3 diff --git a/thingsbrain-persistence/pom.xml b/thingsbrain-persistence/pom.xml index 02b4374..8cc0477 100644 --- a/thingsbrain-persistence/pom.xml +++ b/thingsbrain-persistence/pom.xml @@ -6,7 +6,7 @@ cn.herodotus.thingsbrain thingsbrain - 4.1.0.3 + 4.1.0.4 thingsbrain-persistence diff --git a/thingsbrain-persistence/thingsbrain-persistence-autoconfigure/pom.xml b/thingsbrain-persistence/thingsbrain-persistence-autoconfigure/pom.xml index c06bd31..0499e68 100644 --- a/thingsbrain-persistence/thingsbrain-persistence-autoconfigure/pom.xml +++ b/thingsbrain-persistence/thingsbrain-persistence-autoconfigure/pom.xml @@ -6,7 +6,7 @@ cn.herodotus.thingsbrain thingsbrain-persistence - 4.1.0.3 + 4.1.0.4 thingsbrain-persistence-autoconfigure diff --git a/thingsbrain-persistence/thingsbrain-persistence-commons/pom.xml b/thingsbrain-persistence/thingsbrain-persistence-commons/pom.xml index 30c7942..37f76d9 100644 --- a/thingsbrain-persistence/thingsbrain-persistence-commons/pom.xml +++ b/thingsbrain-persistence/thingsbrain-persistence-commons/pom.xml @@ -6,7 +6,7 @@ cn.herodotus.thingsbrain thingsbrain-persistence - 4.1.0.3 + 4.1.0.4 thingsbrain-persistence-commons diff --git a/thingsbrain-persistence/thingsbrain-persistence-jpa/pom.xml b/thingsbrain-persistence/thingsbrain-persistence-jpa/pom.xml index 34cf1c4..f923072 100644 --- a/thingsbrain-persistence/thingsbrain-persistence-jpa/pom.xml +++ b/thingsbrain-persistence/thingsbrain-persistence-jpa/pom.xml @@ -6,7 +6,7 @@ cn.herodotus.thingsbrain thingsbrain-persistence - 4.1.0.3 + 4.1.0.4 thingsbrain-persistence-jpa diff --git a/thingsbrain-platform/pom.xml b/thingsbrain-platform/pom.xml index 2b64079..4c2863e 100644 --- a/thingsbrain-platform/pom.xml +++ b/thingsbrain-platform/pom.xml @@ -6,7 +6,7 @@ cn.herodotus.thingsbrain thingsbrain - 4.1.0.3 + 4.1.0.4 thingsbrain-platform diff --git a/thingsbrain-platform/thingsbrain-monolith-application/pom.xml b/thingsbrain-platform/thingsbrain-monolith-application/pom.xml index 4243121..2d97715 100644 --- a/thingsbrain-platform/thingsbrain-monolith-application/pom.xml +++ b/thingsbrain-platform/thingsbrain-monolith-application/pom.xml @@ -6,7 +6,7 @@ cn.herodotus.thingsbrain thingsbrain-platform - 4.1.0.3 + 4.1.0.4 thingsbrain-monolith-application diff --git a/thingsbrain-platform/thingsbrain-platform-authentication/pom.xml b/thingsbrain-platform/thingsbrain-platform-authentication/pom.xml index 3a33896..a335523 100644 --- a/thingsbrain-platform/thingsbrain-platform-authentication/pom.xml +++ b/thingsbrain-platform/thingsbrain-platform-authentication/pom.xml @@ -6,7 +6,7 @@ cn.herodotus.thingsbrain thingsbrain-platform - 4.1.0.3 + 4.1.0.4 thingsbrain-platform-authentication diff --git a/thingsbrain-platform/thingsbrain-platform-autoconfigure/pom.xml b/thingsbrain-platform/thingsbrain-platform-autoconfigure/pom.xml index 92b9c82..bb1cdf1 100644 --- a/thingsbrain-platform/thingsbrain-platform-autoconfigure/pom.xml +++ b/thingsbrain-platform/thingsbrain-platform-autoconfigure/pom.xml @@ -6,7 +6,7 @@ cn.herodotus.thingsbrain thingsbrain-platform - 4.1.0.3 + 4.1.0.4 thingsbrain-platform-autoconfigure diff --git a/thingsbrain-platform/thingsbrain-platform-commons/pom.xml b/thingsbrain-platform/thingsbrain-platform-commons/pom.xml index db6e879..43af131 100644 --- a/thingsbrain-platform/thingsbrain-platform-commons/pom.xml +++ b/thingsbrain-platform/thingsbrain-platform-commons/pom.xml @@ -6,7 +6,7 @@ cn.herodotus.thingsbrain thingsbrain-platform - 4.1.0.3 + 4.1.0.4 thingsbrain-platform-commons diff --git a/thingsbrain-platform/thingsbrain-platform-rest/pom.xml b/thingsbrain-platform/thingsbrain-platform-rest/pom.xml index d6db82b..85adfe8 100644 --- a/thingsbrain-platform/thingsbrain-platform-rest/pom.xml +++ b/thingsbrain-platform/thingsbrain-platform-rest/pom.xml @@ -6,7 +6,7 @@ cn.herodotus.thingsbrain thingsbrain-platform - 4.1.0.3 + 4.1.0.4 thingsbrain-platform-rest -- Gitee