|
@@ -24,6 +24,7 @@ import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.ObjectUtils;
|
|
import org.apache.commons.lang3.ObjectUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
@@ -56,6 +57,9 @@ public class IotSendMessageService extends SuperService {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private GateWay2DeviceDao gateWay2DeviceDao;
|
|
private GateWay2DeviceDao gateWay2DeviceDao;
|
|
|
|
|
|
|
|
|
|
+ // 保存90天
|
|
|
|
|
+ @Value("${artemisstore.time}")
|
|
|
|
|
+ public Long ttlMill = 30 * 24L * 60 * 60 * 1000L;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* 发送信息
|
|
* 发送信息
|
|
@@ -113,7 +117,7 @@ public class IotSendMessageService extends SuperService {
|
|
|
}
|
|
}
|
|
|
entity.setDeviceId(deviceInfo.getDeviceId());
|
|
entity.setDeviceId(deviceInfo.getDeviceId());
|
|
|
entity.setDeviceInfo(deviceInfo);
|
|
entity.setDeviceInfo(deviceInfo);
|
|
|
- entity.setTtl(new Date(System.currentTimeMillis() + OperationMessageService.ttlMill));
|
|
|
|
|
|
|
+ entity.setTtl(new Date(System.currentTimeMillis() + ttlMill));
|
|
|
entity.setReceiveTime(System.currentTimeMillis());
|
|
entity.setReceiveTime(System.currentTimeMillis());
|
|
|
entity.setReceiveTimeStr(DateUtils.paresTime(System.currentTimeMillis(), DateUtils.FORMAT_LONG));
|
|
entity.setReceiveTimeStr(DateUtils.paresTime(System.currentTimeMillis(), DateUtils.FORMAT_LONG));
|
|
|
operationMessageDao.save(entity);
|
|
operationMessageDao.save(entity);
|