Commit e19283fe by 毛树良

<fix>:优化推送

1 parent 74a32d0b
......@@ -72,6 +72,9 @@ public class TrafficDataConvertHandler {
//设置违法数据
for (TrafficMongoModel trafficMongoModel : trafficMongoModels) {
MotorVehicleObj.MotorVehicleObject vehicle = tranferToMotorVehicleObject(trafficMongoModel);
if (vehicle == null) {
continue;
}
vehicleList.add(vehicle);
if ("".equals(infoIds.toString())) {
......@@ -80,6 +83,9 @@ public class TrafficDataConvertHandler {
infoIds.append("," + vehicle.getMotorVehicleID());
}
}
if (CollectionUtils.isEmpty(vehicleList)) {
return null;
}
vehicleObj.setMotorVehicleObject(vehicleList);
subNotifObj.setInfoIDs(infoIds.toString());
......@@ -349,7 +355,7 @@ public class TrafficDataConvertHandler {
ResponseEntity<String> responseEntity = restTemplate.getForEntity(geturl, String.class);
if (responseEntity.getStatusCodeValue() == 200) {
String picget = responseEntity.getBody();
log.info("图片服务查询响应videoget={}", picget);
log.info("图片服务查询[{}],响应videoget={}", pic_unid, picget);
if (StringUtils.isNotBlank(picget)) {
JSONObject picJson = JSONObject.parseObject(picget);
if (picJson != null && StringUtils.isNotBlank(picJson.getString("pic_url"))) {
......@@ -357,7 +363,7 @@ public class TrafficDataConvertHandler {
}
}
} else {
log.info("error-------------图片服务查询响应失败");
log.info("error-------------图片服务查询响应失败[{}]", pic_unid);
}
return "";
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!