Commit f3c701b9 authored by 喻春霖's avatar 喻春霖

fixed

parent 74b4b318
...@@ -94,11 +94,11 @@ public class StatisticsController { ...@@ -94,11 +94,11 @@ public class StatisticsController {
}); });
dataList.sort((o1, o2) -> Long.valueOf(o1.getCount() - o2.getCount()).intValue()); dataList.sort((o1, o2) -> Long.valueOf(o1.getCount() - o2.getCount()).intValue());
List<StatItem> result = dataList; List<StatItem> result = dataList;
if(topN != null && topN > 0){ // if(topN != null && topN > 0){
if(topN < result.size()){ // if(topN < result.size()){
result = result.subList(0, topN); // result = result.subList(0, topN);
} // }
} // }
return MapMessage.successMessage().add("data", result); return MapMessage.successMessage().add("data", result);
} }
......
...@@ -251,7 +251,7 @@ ...@@ -251,7 +251,7 @@
var _this = this; var _this = this;
$.ajax({ $.ajax({
type: 'GET', type: 'GET',
url: baseUrl + '/logstatistics/auth_apps', url: baseUrl + '/statistics/auth_apps',
success: function (result) { success: function (result) {
_this.appList = _this.appList.concat(result.data) _this.appList = _this.appList.concat(result.data)
}, },
......
...@@ -219,7 +219,7 @@ public class AuthLogDao extends StaticCacheDimensionDocumentMongoDao<AuthLog, St ...@@ -219,7 +219,7 @@ public class AuthLogDao extends StaticCacheDimensionDocumentMongoDao<AuthLog, St
if(item.containsKey("yearMonthDay")){ if(item.containsKey("yearMonthDay")){
data.setYearMonthDay(item.getString("yearMonthDay").getValue()); data.setYearMonthDay(item.getString("yearMonthDay").getValue());
} }
if(item.containsKey("hour") ){ if(item.containsKey("hour") && item.get("hour") != null ){
data.setHour(item.getInt32("hour").getValue()); data.setHour(item.getInt32("hour").getValue());
} }
if(item.containsKey("count")){ if(item.containsKey("count")){
......
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