Commit 4f327fa9 by 杨林龙

更新保存数据逻辑 60秒保存一次数据

1 parent d0728f1f
......@@ -39,7 +39,7 @@ public class TransitHandleService {
/**
* 间隔时间
*/
private static final int STEP = 3000;
private static final int STEP = 60000;
/**
......@@ -78,7 +78,7 @@ public class TransitHandleService {
}
// 当数据大小为500个 或者 时间间隔3秒 的时候 保存一次
if (deviceLocationMap.size() >= 500 || System.currentTimeMillis() >= tempTime + STEP) {
if (System.currentTimeMillis() >= tempTime + STEP) {
log.info("开始插入或者更新Gps和基站的数据大小===" + deviceLocationMap.size());
remoteDeviceLocationService.saveOrUpdateDeviceLocationData(deviceLocationMap.values());
// 清空缓存map
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!