long setCacheList(final String key, final T dataList) {
+ Long count = redisTemplate.opsForList().rightPushAll(key, dataList);
+ return count == null ? 0 : count;
+ }
+}
diff --git a/mobai-event-common/src/main/java/com/mobai/vehcile/config/MsgConfig.java b/mobai-event-common/src/main/java/com/mobai/vehcile/config/MsgConfig.java
new file mode 100644
index 0000000..5cc02ce
--- /dev/null
+++ b/mobai-event-common/src/main/java/com/mobai/vehcile/config/MsgConfig.java
@@ -0,0 +1,20 @@
+package com.mobai.vehcile.config;
+
+import com.mobai.vehcile.event.constants.VehicleConstants;
+import org.springframework.amqp.core.FanoutExchange;
+import org.springframework.context.annotation.Bean;
+
+/**
+ * @author Mobai
+ * @className MsgConfig
+ * @description 描述
+ * @date 2024/6/14 20:38
+ */
+public class MsgConfig {
+
+
+ @Bean
+ public FanoutExchange vehicleEventExchange() {
+ return new FanoutExchange(VehicleConstants.VEHICLE_EVENT_EXCHANGE);
+ }
+}
diff --git a/mobai-event-common/src/main/java/com/mobai/vehcile/event/constants/VehicleConstants.java b/mobai-event-common/src/main/java/com/mobai/vehcile/event/constants/VehicleConstants.java
new file mode 100644
index 0000000..7e06b31
--- /dev/null
+++ b/mobai-event-common/src/main/java/com/mobai/vehcile/event/constants/VehicleConstants.java
@@ -0,0 +1,20 @@
+package com.mobai.vehcile.event.constants;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import lombok.experimental.SuperBuilder;
+
+/**
+ * @author Mobai
+ * @className VehicleConstants
+ * @description 描述
+ * @date 2024/6/14 20:32
+ */
+
+public class VehicleConstants {
+
+ public static final String VEHICLE_EVENT_EXCHANGE = "vehicle.event" ;
+
+}
diff --git a/mobai-event-common/src/main/java/org/springframework/boot/autoconfigure/AutoConfiguration.java b/mobai-event-common/src/main/java/org/springframework/boot/autoconfigure/AutoConfiguration.java
new file mode 100644
index 0000000..6e0aca1
--- /dev/null
+++ b/mobai-event-common/src/main/java/org/springframework/boot/autoconfigure/AutoConfiguration.java
@@ -0,0 +1,105 @@
+/*
+ * Copyright 2012-2023 the original author or authors.
+ *
+ * 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
+ *
+ * https://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.
+ */
+
+package org.springframework.boot.autoconfigure;
+
+import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
+import org.springframework.boot.context.annotation.ImportCandidates;
+import org.springframework.context.annotation.AnnotationBeanNameGenerator;
+import org.springframework.context.annotation.AnnotationConfigApplicationContext;
+import org.springframework.context.annotation.Conditional;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.core.annotation.AliasFor;
+import org.springframework.core.io.support.SpringFactoriesLoader;
+
+import java.lang.annotation.*;
+
+/**
+ * Indicates that a class provides configuration that can be automatically applied by
+ * Spring Boot. Auto-configuration classes are regular
+ * {@link Configuration @Configuration} with the exception that
+ * {@literal Configuration#proxyBeanMethods() proxyBeanMethods} is always {@code false}.
+ *
+ * They are located using {@link ImportCandidates} and the {@link SpringFactoriesLoader}
+ * mechanism (keyed against {@link EnableAutoConfiguration}).
+ *
+ * Generally auto-configuration classes are marked as {@link Conditional @Conditional}
+ * (most often using {@link ConditionalOnClass @ConditionalOnClass} and
+ * {@link ConditionalOnMissingBean @ConditionalOnMissingBean} annotations).
+ *
+ * @author Moritz Halbritter
+ * @see EnableAutoConfiguration
+ * @see AutoConfigureBefore
+ * @see AutoConfigureAfter
+ * @see Conditional
+ * @see ConditionalOnClass
+ * @see ConditionalOnMissingBean
+ * @since 2.7.0
+ */
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+@Configuration(proxyBeanMethods = false)
+@AutoConfigureBefore
+@AutoConfigureAfter
+public @interface AutoConfiguration {
+
+ /**
+ * Explicitly specify the name of the Spring bean definition associated with the
+ * {@code @AutoConfiguration} class. If left unspecified (the common case), a bean
+ * name will be automatically generated.
+ *
+ * The custom name applies only if the {@code @AutoConfiguration} class is picked up
+ * through component scanning or supplied directly to an
+ * {@link AnnotationConfigApplicationContext}. If the {@code @AutoConfiguration} class
+ * is registered as a traditional XML bean definition, the name/id of the bean element
+ * will take precedence.
+ * @return the explicit component name, if any (or empty String otherwise)
+ * @see AnnotationBeanNameGenerator
+ */
+ @AliasFor(annotation = Configuration.class)
+ String value() default "";
+
+ /**
+ * The auto-configure classes that should have not yet been applied.
+ * @return the classes
+ */
+ @AliasFor(annotation = AutoConfigureBefore.class, attribute = "value")
+ Class>[] before() default {};
+
+ /**
+ * The names of the auto-configure classes that should have not yet been applied.
+ * @return the class names
+ */
+ @AliasFor(annotation = AutoConfigureBefore.class, attribute = "name")
+ String[] beforeName() default {};
+
+ /**
+ * The auto-configure classes that should have already been applied.
+ * @return the classes
+ */
+ @AliasFor(annotation = AutoConfigureAfter.class, attribute = "value")
+ Class>[] after() default {};
+
+ /**
+ * The names of the auto-configure classes that should have already been applied.
+ * @return the class names
+ */
+ @AliasFor(annotation = AutoConfigureAfter.class, attribute = "name")
+ String[] afterName() default {};
+
+}
diff --git a/mobai-event-common/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/mobai-event-common/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
new file mode 100644
index 0000000..e943b13
--- /dev/null
+++ b/mobai-event-common/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
@@ -0,0 +1 @@
+com.mobai.vehcile.config.MsgConfig
diff --git a/mobai-event-iotDBDemo/pom.xml b/mobai-event-iotDBDemo/pom.xml
new file mode 100644
index 0000000..93c6037
--- /dev/null
+++ b/mobai-event-iotDBDemo/pom.xml
@@ -0,0 +1,68 @@
+
+
+ 4.0.0
+
+ com.mobai
+ event-analysis
+ 1.0.0
+
+
+ mobai-event-iotDBDemo
+
+
+ 17
+ 17
+ UTF-8
+
+
+
+
+ org.apache.iotdb
+ iotdb-session
+ 0.14.0-preview1
+
+
+
+ cn.hutool
+ hutool-all
+ 5.6.3
+
+
+
+ com.alibaba
+ fastjson
+ 1.2.83
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+
+ org.projectlombok
+ lombok
+ true
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+ org.junit.vintage
+ junit-vintage-engine
+
+
+
+
+ com.mobai
+ mobai-event-common
+ 1.0.0
+ compile
+
+
+
+
diff --git a/mobai-event-iotDBDemo/src/main/java/com/mobai/IotDBApplication.java b/mobai-event-iotDBDemo/src/main/java/com/mobai/IotDBApplication.java
new file mode 100644
index 0000000..d37022d
--- /dev/null
+++ b/mobai-event-iotDBDemo/src/main/java/com/mobai/IotDBApplication.java
@@ -0,0 +1,13 @@
+package com.mobai;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+
+@SpringBootApplication
+public class IotDBApplication {
+ public static void main(String[] args) {
+
+ SpringApplication.run(IotDBApplication.class);
+ }
+}
diff --git a/mobai-event-iotDBDemo/src/main/java/com/mobai/config/IotDBSessionConfig.java b/mobai-event-iotDBDemo/src/main/java/com/mobai/config/IotDBSessionConfig.java
new file mode 100644
index 0000000..d0d6bf9
--- /dev/null
+++ b/mobai-event-iotDBDemo/src/main/java/com/mobai/config/IotDBSessionConfig.java
@@ -0,0 +1,186 @@
+package com.mobai.config;
+
+import lombok.extern.log4j.Log4j2;
+import org.apache.iotdb.rpc.IoTDBConnectionException;
+import org.apache.iotdb.rpc.StatementExecutionException;
+import org.apache.iotdb.session.Session;
+import org.apache.iotdb.session.SessionDataSet;
+import org.apache.iotdb.session.util.Version;
+import org.apache.iotdb.tsfile.file.metadata.enums.TSDataType;
+import org.apache.iotdb.tsfile.write.record.Tablet;
+import org.apache.iotdb.tsfile.write.schema.MeasurementSchema;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.stereotype.Component;
+
+import java.rmi.ServerException;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * description: iotdb 配置工具类(常用部分,如需要可以自行扩展)
+ * 注意:可以不需要创建分组,插入时默认前两个节点名称为分组名称 比如: root.a1eaKSRpRty.CA3013A303A25467 或者
+ * root.a1eaKSRpRty.CA3013A303A25467.heart 他们的分组都为 root.a1eaKSRpRty
+ * author: zhouhong
+ */
+@Log4j2
+@Component
+@Configuration
+public class IotDBSessionConfig {
+
+ private static Session session;
+ private static final String LOCAL_HOST = "175.24.138.82";
+ @Bean
+ public Session getSession() throws IoTDBConnectionException, StatementExecutionException {
+ if (session == null) {
+ log.info("正在连接iotdb.......");
+ session = new Session.Builder().host(LOCAL_HOST).port(6667).username("root").password("root").version(Version.V_0_13).build();
+ session.open(false);
+ session.setFetchSize(100);
+ log.info("iotdb连接成功~");
+ // 设置时区
+ session.setTimeZone("+08:00");
+ }
+ return session;
+ }
+
+ /**
+ * description: 带有数据类型的添加操作 - insertRecord没有指定类型
+ * author: zhouhong
+ * @param * @param deviceId:节点路径如:root.a1eaKSRpRty.CA3013A303A25467
+ * time:时间戳
+ * measurementsList:物理量 即:属性
+ * type:数据类型: BOOLEAN((byte)0), INT32((byte)1),INT64((byte)2),FLOAT((byte)3),DOUBLE((byte)4),TEXT((byte)5),VECTOR((byte)6);
+ * valuesList:属性值 --- 属性必须与属性值一一对应
+ * @return
+ */
+ public void insertRecordType(String deviceId, Long time,List measurementsList, TSDataType type,List