Commit 90fe71bf by huangjy

fix:添加缓存

parent 3b9d5b82
......@@ -20,6 +20,7 @@ import com.makeit.utils.LongTimestampUtil;
import com.makeit.utils.data.convert.JsonUtil;
import com.makeit.utils.data.convert.StreamUtil;
import com.makeit.utils.old.StringUtils;
import com.sun.jmx.snmp.Timestamp;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.RandomUtils;
......@@ -160,8 +161,8 @@ public class IotProductDeviceService extends IotCommonService {
int movebodyRandomLong = RandomUtils.nextInt(40,90);
deviceInfoContentBreathe = new DeviceInfoContentBreathe();
LocalDateTime localDateTime = startTime.plusMinutes(i);
long timeStamp = localDateTime.toInstant(ZoneOffset.UTC).toEpochMilli();
deviceInfoContentBreathe.setTimestamp(timeStamp);
Timestamp timestamp = new Timestamp(localDateTime.atZone(ZoneId.systemDefault()).toInstant().toEpochMilli());
deviceInfoContentBreathe.setTimestamp(timestamp.getDateTime());
DeviceInfoContentBreathe.Properties properties = new DeviceInfoContentBreathe.Properties();
properties.setBr(brRandomLong);
properties.setHr(hrRandomLong);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment