diff --git a/iot-dao/iot-data-model/pom.xml b/iot-dao/iot-data-model/pom.xml
index eba07622..8b287a3d 100644
--- a/iot-dao/iot-data-model/pom.xml
+++ b/iot-dao/iot-data-model/pom.xml
@@ -5,9 +5,9 @@
iot-dao
cc.iotkit
- 0.5.0-SNAPSHOT
+ 0.5.1-SNAPSHOT
- 0.5.0-SNAPSHOT
+ 0.5.1-SNAPSHOT
4.0.0
iot-data-model
diff --git a/iot-dao/iot-data-service/pom.xml b/iot-dao/iot-data-service/pom.xml
index a48c2b8c..2de342e0 100644
--- a/iot-dao/iot-data-service/pom.xml
+++ b/iot-dao/iot-data-service/pom.xml
@@ -5,10 +5,10 @@
iot-dao
cc.iotkit
- 0.5.0-SNAPSHOT
+ 0.5.1-SNAPSHOT
4.0.0
- 0.5.0-SNAPSHOT
+ 0.5.1-SNAPSHOT
iot-data-service
diff --git a/iot-dao/iot-data-serviceImpl-cache/pom.xml b/iot-dao/iot-data-serviceImpl-cache/pom.xml
index 79161757..e8907de6 100644
--- a/iot-dao/iot-data-serviceImpl-cache/pom.xml
+++ b/iot-dao/iot-data-serviceImpl-cache/pom.xml
@@ -5,10 +5,10 @@
iot-dao
cc.iotkit
- 0.5.0-SNAPSHOT
+ 0.5.1-SNAPSHOT
4.0.0
- 0.5.0-SNAPSHOT
+ 0.5.1-SNAPSHOT
iot-data-serviceImpl-cache
diff --git a/iot-dao/iot-data-serviceImpl-rdb/pom.xml b/iot-dao/iot-data-serviceImpl-rdb/pom.xml
index cfd6a0c8..bc27179f 100644
--- a/iot-dao/iot-data-serviceImpl-rdb/pom.xml
+++ b/iot-dao/iot-data-serviceImpl-rdb/pom.xml
@@ -5,9 +5,9 @@
iot-dao
cc.iotkit
- 0.5.0-SNAPSHOT
+ 0.5.1-SNAPSHOT
- 0.5.0-SNAPSHOT
+ 0.5.1-SNAPSHOT
4.0.0
iot-data-serviceImpl-rdb
diff --git a/iot-dao/iot-temporal-service/pom.xml b/iot-dao/iot-temporal-service/pom.xml
index 66820e0a..506dbb3a 100644
--- a/iot-dao/iot-temporal-service/pom.xml
+++ b/iot-dao/iot-temporal-service/pom.xml
@@ -5,10 +5,10 @@
iot-dao
cc.iotkit
- 0.5.0-SNAPSHOT
+ 0.5.1-SNAPSHOT
4.0.0
- 0.5.0-SNAPSHOT
+ 0.5.1-SNAPSHOT
iot-temporal-service
diff --git a/iot-dao/iot-temporal-serviceImpl-es/pom.xml b/iot-dao/iot-temporal-serviceImpl-es/pom.xml
index 0e6f4829..bdbbb71e 100644
--- a/iot-dao/iot-temporal-serviceImpl-es/pom.xml
+++ b/iot-dao/iot-temporal-serviceImpl-es/pom.xml
@@ -5,7 +5,7 @@
iot-dao
cc.iotkit
- 0.5.0-SNAPSHOT
+ 0.5.1-SNAPSHOT
4.0.0
diff --git a/iot-dao/iot-temporal-serviceImpl-iotdb/pom.xml b/iot-dao/iot-temporal-serviceImpl-iotdb/pom.xml
new file mode 100644
index 00000000..2c342d2a
--- /dev/null
+++ b/iot-dao/iot-temporal-serviceImpl-iotdb/pom.xml
@@ -0,0 +1,57 @@
+
+
+
+ iot-dao
+ cc.iotkit
+ 0.5.1-SNAPSHOT
+
+ 4.0.0
+
+ iot-temporal-serviceImpl-iotdb
+
+
+
+
+ cc.iotkit
+ iot-temporal-service
+
+
+
+ cc.iotkit
+ iot-data-serviceImpl-cache
+
+
+
+
+
+ org.apache.iotdb
+ iotdb-session
+ 1.2.2
+
+
+
+ org.springframework
+ spring-context
+
+
+
+ org.projectlombok
+ lombok
+ provided
+
+
+
+ com.fasterxml.jackson.core
+ jackson-annotations
+
+
+
+ io.github.linpeilie
+ mapstruct-plus-spring-boot-starter
+
+
+
+
+
\ No newline at end of file
diff --git a/iot-dao/iot-temporal-serviceImpl-iotdb/src/main/java/cc/iotkit/temporal/iotdb/config/IotDbConf.java b/iot-dao/iot-temporal-serviceImpl-iotdb/src/main/java/cc/iotkit/temporal/iotdb/config/IotDbConf.java
new file mode 100644
index 00000000..22576eae
--- /dev/null
+++ b/iot-dao/iot-temporal-serviceImpl-iotdb/src/main/java/cc/iotkit/temporal/iotdb/config/IotDbConf.java
@@ -0,0 +1,38 @@
+package cc.iotkit.temporal.iotdb.config;
+
+
+import org.apache.iotdb.session.pool.SessionPool;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * iotdb数据库配置
+ *
+ * @author sjg
+ */
+@Configuration
+public class IotDbConf {
+
+ @Value("${spring.iotdb-datasource.host}")
+ private String host;
+
+ @Value("${spring.iotdb-datasource.port}")
+ private int port;
+
+ @Value("${spring.iotdb-datasource.username}")
+ private String username;
+
+ @Value("${spring.iotdb-datasource.password}")
+ private String password;
+
+ @Bean
+ public SessionPool getSession() {
+ return new SessionPool.Builder()
+ .host(host)
+ .port(port)
+ .user(username)
+ .password(password)
+ .build();
+ }
+}
diff --git a/iot-dao/iot-temporal-serviceImpl-iotdb/src/main/java/cc/iotkit/temporal/iotdb/dao/IotDbTemplate.java b/iot-dao/iot-temporal-serviceImpl-iotdb/src/main/java/cc/iotkit/temporal/iotdb/dao/IotDbTemplate.java
new file mode 100644
index 00000000..e0971fd1
--- /dev/null
+++ b/iot-dao/iot-temporal-serviceImpl-iotdb/src/main/java/cc/iotkit/temporal/iotdb/dao/IotDbTemplate.java
@@ -0,0 +1,74 @@
+package cc.iotkit.temporal.iotdb.dao;
+
+import lombok.Data;
+import lombok.SneakyThrows;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.iotdb.isession.pool.SessionDataSetWrapper;
+import org.apache.iotdb.session.pool.SessionPool;
+import org.apache.iotdb.tsfile.read.common.Field;
+import org.apache.iotdb.tsfile.read.common.RowRecord;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author sjg
+ */
+@Slf4j
+@Component
+@Data
+public class IotDbTemplate {
+
+ @Autowired
+ private SessionPool sessionPool;
+
+ private static String group = "root.iotkit";
+
+ private String getPath(String productKey, String deviceId) {
+ return group + "." + productKey + "." + deviceId;
+ }
+
+ /**
+ * 对齐插入时序序列
+ * @param productKey 产品key
+ * @param deviceId 设备id
+ * @param time 数据时间
+ * @param data 数据键值对
+ */
+ @SneakyThrows
+ public void insert(String productKey, String deviceId, long time, Map data) {
+ String path = getPath(productKey, deviceId);
+ List measurements = new ArrayList<>();
+ // 需要服务器做类型判断
+ List values = new ArrayList<>();
+ for (String key : data.keySet()) {
+ measurements.add(key);
+ values.add(String.valueOf(data.get(key)));
+ }
+ //对齐插入,使用PREVIOUS填充查询
+ sessionPool.insertAlignedRecord(path, time, measurements, values);
+ }
+
+ @SneakyThrows
+ public List