|
@@ -184,6 +184,7 @@ public class MqttMsgService {
|
|
} else{
|
|
} else{
|
|
//计算当前和最近之间时间,若超过1秒,删除之前的存储的,重新计数存储当前的
|
|
//计算当前和最近之间时间,若超过1秒,删除之前的存储的,重新计数存储当前的
|
|
String lastContent = (String)redisUtil.hget(RedisKeyConstant.PEOPLEEVENT_ACTIVE_INFO,lastIndex + "@" + careDevice.getDevCode() + "_" + tid );
|
|
String lastContent = (String)redisUtil.hget(RedisKeyConstant.PEOPLEEVENT_ACTIVE_INFO,lastIndex + "@" + careDevice.getDevCode() + "_" + tid );
|
|
|
|
+ logger.warn("lastIndex:{},lastContent:{}",lastIndex,lastContent);
|
|
long duration = (date.getTime() - Long.parseLong(lastContent.split("_")[0]));
|
|
long duration = (date.getTime() - Long.parseLong(lastContent.split("_")[0]));
|
|
logger.warn("lastIndex:{},duration:{}",lastIndex,duration);
|
|
logger.warn("lastIndex:{},duration:{}",lastIndex,duration);
|
|
if (duration > 3000) { //超过1秒,删除之前的存储的,从头开始
|
|
if (duration > 3000) { //超过1秒,删除之前的存储的,从头开始
|