Commit 164f2741 authored by 赵啸非's avatar 赵啸非

添加统计日志

parent 2e695069
...@@ -192,7 +192,7 @@ public class SiteStatTaskImpl implements ITaskExcuteService { ...@@ -192,7 +192,7 @@ public class SiteStatTaskImpl implements ITaskExcuteService {
if (resp.getCode() == 1) { if (resp.getCode() == 1) {
List<SitePdu> sitePduList = resp.getData().getData(); List<SitePdu> sitePduList = resp.getData().getData();
for (SitePdu site : sitePduList) { for (SitePdu site : sitePduList) {
if (!ObjectUtils.isEmpty(site.getId())) continue;
StopWatch allStopWatch = new StopWatch("allStopWatch"); StopWatch allStopWatch = new StopWatch("allStopWatch");
StopWatch pjqStopWatch = new StopWatch("pjqStopWatch"); StopWatch pjqStopWatch = new StopWatch("pjqStopWatch");
StopWatch pdjStopWatch = new StopWatch("pdjStopWatch"); StopWatch pdjStopWatch = new StopWatch("pdjStopWatch");
...@@ -219,9 +219,11 @@ public class SiteStatTaskImpl implements ITaskExcuteService { ...@@ -219,9 +219,11 @@ public class SiteStatTaskImpl implements ITaskExcuteService {
statLogEntity.setSiteName(site.getSiteName()); statLogEntity.setSiteName(site.getSiteName());
AccessQuery accessQuery = new AccessQuery(); AccessQuery accessQuery = new AccessQuery();
accessQuery.setSiteId(site.getId()); accessQuery.setSiteId(site.getId() == null ? 0L : site.getId());
AccessEntity accessEntity = accessService.selectOne(accessQuery); AccessEntity accessEntity = accessService.selectOne(accessQuery);
if (!ObjectUtils.isEmpty(accessEntity)) {
statLogEntity.setAccessId(accessEntity.getId()); statLogEntity.setAccessId(accessEntity.getId());
}
statLogEntity.setStatStartTime(new Date()); statLogEntity.setStatStartTime(new Date());
statLogEntity.setType(AccessTypeEnum.评价器.getValue()); statLogEntity.setType(AccessTypeEnum.评价器.getValue());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment