Commit 31f6de8d by 向延琳

修改日志级别

1 parent a6528837
...@@ -50,7 +50,7 @@ public class JourneyService { ...@@ -50,7 +50,7 @@ public class JourneyService {
} }
DeviceJourney journey = deviceJourneyMapper.selectBySnAndBeginTime(deviceJourneyDTO.getSn(), deviceJourneyDTO.getBeginTime()); DeviceJourney journey = deviceJourneyMapper.selectBySnAndBeginTime(deviceJourneyDTO.getSn(), deviceJourneyDTO.getBeginTime());
long t2 = System.currentTimeMillis(); long t2 = System.currentTimeMillis();
log.info("重复校验时间{}", t2 - t1); log.debug("重复校验时间{}", t2 - t1);
if(Objects.nonNull(journey)) { if(Objects.nonNull(journey)) {
log.warn("该设备同样的开始时间行程数据已经存在" + log.warn("该设备同样的开始时间行程数据已经存在" +
"sn: " + deviceJourneyDTO.getSn() + "beginTime:" + DateUtils.formatNormal(deviceJourneyDTO.getBeginTime())); "sn: " + deviceJourneyDTO.getSn() + "beginTime:" + DateUtils.formatNormal(deviceJourneyDTO.getBeginTime()));
...@@ -62,12 +62,12 @@ public class JourneyService { ...@@ -62,12 +62,12 @@ public class JourneyService {
Long createdBy = Optional.ofNullable(vehicle).map(Vehicle::getCreatedBy).orElse(null); Long createdBy = Optional.ofNullable(vehicle).map(Vehicle::getCreatedBy).orElse(null);
Long updatedBy = Optional.ofNullable(vehicle).map(Vehicle::getUpdatedBy).orElse(null); Long updatedBy = Optional.ofNullable(vehicle).map(Vehicle::getUpdatedBy).orElse(null);
long t3 = System.currentTimeMillis(); long t3 = System.currentTimeMillis();
log.info("获取创建人时间{}", t3 - t2); log.debug("获取创建人时间{}", t3 - t2);
//从关联表从获取关联id //从关联表从获取关联id
Long vdId = vehicleService.getVdId(deviceJourneyDTO.getSn()); Long vdId = vehicleService.getVdId(deviceJourneyDTO.getSn());
long t4 = System.currentTimeMillis(); long t4 = System.currentTimeMillis();
log.info("获取创建人时间{}", t4 - t3); log.debug("获取创建人时间{}", t4 - t3);
//行程信息入库 //行程信息入库
DeviceJourney deviceJourney = convertTo(deviceJourneyDTO, vdId, createdBy, updatedBy); DeviceJourney deviceJourney = convertTo(deviceJourneyDTO, vdId, createdBy, updatedBy);
...@@ -77,7 +77,7 @@ public class JourneyService { ...@@ -77,7 +77,7 @@ public class JourneyService {
log.info("vdId{}", vdId); log.info("vdId{}", vdId);
if(Objects.isNull(vdId)) { if(Objects.isNull(vdId)) {
log.warn("该设备没有绑定车辆" + deviceJourneyDTO.getSn()); log.warn("该设备没有绑定车辆" + deviceJourneyDTO.getSn());
log.info("同步里程总耗时{}", t4 - t1); log.debug("同步里程总耗时{}", t4 - t1);
return; return;
} }
...@@ -85,11 +85,11 @@ public class JourneyService { ...@@ -85,11 +85,11 @@ public class JourneyService {
DeviceJourneyOverview overviewDO = buildOverviewWitheJourney(deviceJourneyDTO, vdId, createdBy, updatedBy); DeviceJourneyOverview overviewDO = buildOverviewWitheJourney(deviceJourneyDTO, vdId, createdBy, updatedBy);
DeviceJourneyOverview overview = deviceJourneyOverviewMapper.selectBySnAndVdId(deviceJourneyDTO.getSn(), vdId); DeviceJourneyOverview overview = deviceJourneyOverviewMapper.selectBySnAndVdId(deviceJourneyDTO.getSn(), vdId);
long t5 = System.currentTimeMillis(); long t5 = System.currentTimeMillis();
log.info("行程入库时间{}", t5 - t4); log.debug("行程入库时间{}", t5 - t4);
if (Objects.isNull(overview)) { if (Objects.isNull(overview)) {
//本设备的第一条里程数据 //本设备的第一条里程数据
deviceJourneyOverviewMapper.insert(overviewDO); deviceJourneyOverviewMapper.insert(overviewDO);
log.info("同步里程总耗时{}", t5 - t1); log.debug("同步里程总耗时{}", t5 - t1);
return; return;
} }
overview.setDistance(overview.getDistance() + overviewDO.getDistance()); overview.setDistance(overview.getDistance() + overviewDO.getDistance());
...@@ -97,7 +97,7 @@ public class JourneyService { ...@@ -97,7 +97,7 @@ public class JourneyService {
overview.setUpdatedDate(new Date()); overview.setUpdatedDate(new Date());
deviceJourneyOverviewMapper.updateByPrimaryKeySelective(overview); deviceJourneyOverviewMapper.updateByPrimaryKeySelective(overview);
long t6 = System.currentTimeMillis(); long t6 = System.currentTimeMillis();
log.info("同步里程和总里程总耗时{}", t6 - t1); log.debug("同步里程和总里程总耗时{}", t6 - t1);
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!