Commit 98c0b8aa by 杨林龙

减少gps基站保存时间间隔

1 parent 1453f4e6
......@@ -73,7 +73,7 @@ public class TransitHandleService {
deviceLocationMap.put(deviceLocationDto.getSn(), deviceLocationCache);
// 当数据大小为100个的时候 保存一次
if (deviceLocationMap.size() == 100 || System.currentTimeMillis() >= tempTime + STEP) {
if (deviceLocationMap.size() >= 500 || 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!