Commit bb79dd0f LN

1.增加重连处理

1 个父辈 aa41a5d9
...@@ -919,6 +919,7 @@ public class BaseDeviceHandler implements IDeviceHandler { ...@@ -919,6 +919,7 @@ public class BaseDeviceHandler implements IDeviceHandler {
needSaveToMongo = statusBean.needSaveToMongo(); needSaveToMongo = statusBean.needSaveToMongo();
} }
statusBean.setTime(System.currentTimeMillis()); statusBean.setTime(System.currentTimeMillis());
statusBean.setOfflineTime(-1);
Map<String, BoxStatusBean> statusOfBoxes = statusBeanToSave.getBoxStatus(); Map<String, BoxStatusBean> statusOfBoxes = statusBeanToSave.getBoxStatus();
statusBean.setBoxStatus(statusOfBoxes); statusBean.setBoxStatus(statusOfBoxes);
......
...@@ -36,7 +36,9 @@ public class EquipmentCache { ...@@ -36,7 +36,9 @@ public class EquipmentCache {
map.put(equipment.getCid(), equipment); map.put(equipment.getCid(), equipment);
} }
allEquipment = map; allEquipment = map;
log.info("加载所有设备["+all.size()+"]信息到缓存"); if(all.size()>0) {
log.info("加载所有设备[" + all.size() + "]信息到缓存");
}
} }
} }
} }
......
...@@ -204,6 +204,7 @@ public class DevicesStatusUtil { ...@@ -204,6 +204,7 @@ public class DevicesStatusUtil {
StatusBean statusBean = new StatusBean(); StatusBean statusBean = new StatusBean();
statusBean.setCid(cid); statusBean.setCid(cid);
statusBean.setTime(System.currentTimeMillis()); statusBean.setTime(System.currentTimeMillis());
statusBean.setOfflineTime(-1);
statusBean.setMsgList(msgs); statusBean.setMsgList(msgs);
clientMsgs.put(cid, statusBean); clientMsgs.put(cid, statusBean);
return statusBean; return statusBean;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!