|
@@ -11,6 +11,7 @@ import org.influxdb.dto.Point;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.time.ZoneId;
|
|
import java.time.ZoneId;
|
|
|
|
+import java.time.temporal.ChronoUnit;
|
|
import java.util.concurrent.TimeUnit;
|
|
import java.util.concurrent.TimeUnit;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
@@ -41,6 +42,7 @@ public class DataServiceImpl implements DataService {
|
|
if (CollectionUtils.isEmpty(data.getDataValues())) return false;
|
|
if (CollectionUtils.isEmpty(data.getDataValues())) return false;
|
|
//获取时间戳
|
|
//获取时间戳
|
|
long timestamp = data.getDateTime()
|
|
long timestamp = data.getDateTime()
|
|
|
|
+ .truncatedTo(ChronoUnit.MINUTES)
|
|
.atZone(ZoneId.systemDefault())
|
|
.atZone(ZoneId.systemDefault())
|
|
.toInstant()
|
|
.toInstant()
|
|
.toEpochMilli();
|
|
.toEpochMilli();
|