Commit c6433e96 by 杨林龙

优化Gps基站消费逻辑

1 parent 46928f6a
...@@ -268,6 +268,9 @@ public class TransitHandleService { ...@@ -268,6 +268,9 @@ public class TransitHandleService {
return "gpsbs_" + sn + "_" + type; return "gpsbs_" + sn + "_" + type;
} }
/**
* 同步数据库中的设备上点数据到redis
*/
public void syncAllDeviceLocationData() { public void syncAllDeviceLocationData() {
log.info("同步数据库中的上点数据到redis开始==="); log.info("同步数据库中的上点数据到redis开始===");
List<DeviceLocationDto> deviceLocationList = remoteDeviceLocationService.getAllDeviceLocationData(); List<DeviceLocationDto> deviceLocationList = remoteDeviceLocationService.getAllDeviceLocationData();
......
...@@ -41,4 +41,10 @@ public class RemoteDeviceLocationServiceTest { ...@@ -41,4 +41,10 @@ public class RemoteDeviceLocationServiceTest {
remoteDeviceLocationService.saveOrUpdateDeviceLocationData(deviceLocationDtos); remoteDeviceLocationService.saveOrUpdateDeviceLocationData(deviceLocationDtos);
System.out.println("更新成功==="); System.out.println("更新成功===");
} }
@Test
public void getAllDeviceLocationData() {
List<DeviceLocationDto> deviceLocationDtoList = remoteDeviceLocationService.getAllDeviceLocationData();
System.out.println("deviceLocationDtoList = " + JSON.toJSONString(deviceLocationDtoList));
}
} }
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!