Commit cb1892fc by 杨林龙

增加参数判断

1 parent a0585fad
......@@ -356,6 +356,9 @@ public class GpsBsLocationServiceImpl implements GpsBsLocationService {
*/
@Override
public String getAddressBylngAndLat(String lat, String lng) {
if (StringUtils.isEmpty(lat) || StringUtils.isEmpty(lng)) {
return "";
}
return hdaoGpsComponent.mapGeoConvert(lat, lng);
}
......
......@@ -31,7 +31,8 @@ public class GpsBsLocationServiceImplTest {
@Test
public void getLocationOfAlarmTime() {
// List<GpsLocation> lastGpsBsHistoryBySn = gpsBsLocationService.getLastGpsBsHistoryBySn("1700151515", DeviceTypeRelationEnum.GPS, "2021-12-03 15:54:07", "2021-12-03 15:54:17");
GpsBsData locationOfAlarmTime = gpsBsLocationService.getLocationOfAlarmTime("1700151515", DeviceTypeRelationEnum.GPS, "2021-12-03 15:54:07", "2021-12-03 15:54:17");
// GpsBsData locationOfAlarmTime = gpsBsLocationService.getLocationOfAlarmTime("1700151515", DeviceTypeRelationEnum.GPS, "2021-12-03 15:54:07", "2021-12-03 15:54:17");
GpsBsData locationOfAlarmTime = gpsBsLocationService.getLocationOfAlarmTime("1700151515", DeviceTypeRelationEnum.GPS, "2021-12-22 10:45:23", "2021-12-22 10:45:33");
System.out.println("locationOfAlarmTime = " + JSON.toJSONString(locationOfAlarmTime));
}
}
\ 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!