diff --git a/src/main/java/com/nis/web/dao/dashboard/TrafficUaStatisticDao.xml b/src/main/java/com/nis/web/dao/dashboard/TrafficUaStatisticDao.xml index 42dce7d..baf3f6e 100644 --- a/src/main/java/com/nis/web/dao/dashboard/TrafficUaStatisticDao.xml +++ b/src/main/java/com/nis/web/dao/dashboard/TrafficUaStatisticDao.xml @@ -43,7 +43,7 @@ SELECT SUM(link_num) count FROM traffic_ua_statistic WHERE bs_type !=0 and os_type=#{osType} - and os_type not in + and bs_type not in #{singleType} @@ -74,7 +74,7 @@ SELECT SUM(link_num) count FROM traffic_ua_statistic WHERE os_type !=0 and bs_type=#{bsType} - and bs_type not in + and os_type not in #{singleType} diff --git a/src/main/java/com/nis/web/service/restful/DashboardService.java b/src/main/java/com/nis/web/service/restful/DashboardService.java index f67d4ac..09ba427 100644 --- a/src/main/java/com/nis/web/service/restful/DashboardService.java +++ b/src/main/java/com/nis/web/service/restful/DashboardService.java @@ -271,11 +271,13 @@ public class DashboardService extends BaseService{ for (Map map : list) { bsType.add(map.get("bsType")); } - Map others = new HashMap(); - others = trafficUaStatisticDao.systemOthers(bsType,osType,statTime); - if(others!=null&&others.size()>0){ - others.put("bsType", "-1"); - list.add(others); + if(list.size()>10) { + Map others = new HashMap(); + others = trafficUaStatisticDao.systemOthers(bsType,osType,statTime); + if(others!=null&&others.size()>0){ + others.put("bsType", "-1"); + list.add(others); + } } } } @@ -320,11 +322,13 @@ public class DashboardService extends BaseService{ for (Map map : list) { osType.add(map.get("osType")); } - Map others = new HashMap(); - others = trafficUaStatisticDao.browserOthers(osType,bsType,statTime); - if(others!=null&&others.size()>0){ - others.put("osType", "-1"); - list.add(others); + if(list.size()>10) { + Map others = new HashMap(); + others = trafficUaStatisticDao.browserOthers(osType,bsType,statTime); + if(others!=null&&others.size()>0){ + others.put("osType", "-1"); + list.add(others); + } } } } @@ -372,11 +376,13 @@ public class DashboardService extends BaseService{ for (Map map : list) { webIdList.add(map.get("webId")); } - Map others = new HashMap(); - others = trafficHttpStatisticDao.websiteDomainOthers(webIdList,websiteServiceId,statTime); - if(others!=null&&others.size()>0){ - others.put("webId", "-1"); - list.add(others); + if(list.size()>10) { + Map others = new HashMap(); + others = trafficHttpStatisticDao.websiteDomainOthers(webIdList,websiteServiceId,statTime); + if(others!=null&&others.size()>0){ + others.put("webId", "-1"); + list.add(others); + } } } }