Commit abdc2f8d by 杨林龙

添加异常日志

1 parent 4bce0607
...@@ -34,6 +34,7 @@ public class DeviceLocationService { ...@@ -34,6 +34,7 @@ public class DeviceLocationService {
*/ */
public void saveOrUpdateDeviceLocationData(Collection<DeviceLocationDto> deviceLocationDtoList) { public void saveOrUpdateDeviceLocationData(Collection<DeviceLocationDto> deviceLocationDtoList) {
for (DeviceLocationDto deviceLocationDto : deviceLocationDtoList) { for (DeviceLocationDto deviceLocationDto : deviceLocationDtoList) {
try {
DeviceLocation locationBySn = deviceLocationMapper.getDeviceLocationBySn(deviceLocationDto.getSn()); DeviceLocation locationBySn = deviceLocationMapper.getDeviceLocationBySn(deviceLocationDto.getSn());
if (ObjectUtil.isNull(locationBySn)) { if (ObjectUtil.isNull(locationBySn)) {
DeviceLocation deviceLocation = new DeviceLocation(); DeviceLocation deviceLocation = new DeviceLocation();
...@@ -44,6 +45,10 @@ public class DeviceLocationService { ...@@ -44,6 +45,10 @@ public class DeviceLocationService {
mergeData(locationBySn, deviceLocationDto); mergeData(locationBySn, deviceLocationDto);
deviceLocationMapper.updateByPrimaryKeySelective(locationBySn); deviceLocationMapper.updateByPrimaryKeySelective(locationBySn);
} }
} catch (Exception e) {
log.error("设备号:" + deviceLocationDto.getSn() + "查询异常===" + e.getMessage());
e.printStackTrace();
}
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!